Wednesday 28 December 2016

BGP CHAPTER 3

BGP CHAPTER 3
QUESTIONS:
8. How to advertise network with redistribute command in BGP ?
9. While using redistribution use ip-prefix list ?
10. Use automatic-aggregation & manual summarization ?
Solution:

8. How to advertise network with redistribute command in BGP ?
9. While using redistribution use ip-prefix list ?
diag:--<>

Advertise 1.1.1.1-4 out of 1.1.1.1-6 from AS 123 to AS 444 using
redistribution.
Strategy:
from R1 : send networks 1.1.1.1-6/32 & filter these routes at R2
on R2 make route-map , send network 1.1.1.1-4 via redistribute keyword
& rest of network via IGP option.
on R1
router bgp 123
 redistribute connected

on R2
!
R2#sh run | se ip prefix
ip prefix-list LOOPBACK_OF_R1 seq 10 permit 1.1.1.1/32
ip prefix-list LOOPBACK_OF_R1 seq 20 permit 1.1.1.2/32
ip prefix-list LOOPBACK_OF_R1 seq 30 permit 1.1.1.3/32
ip prefix-list LOOPBACK_OF_R1 seq 40 permit 1.1.1.4/32
R2#sh run | se route-map
 neighbor 4.4.4.4 route-map FILTER out
route-map FILTER permit 10
 match ip address prefix-list LOOPBACK_OF_R1
route-map FILTER permit 20
 set origin igp
!
R2#sh run | se bgp
router bgp 123
 neighbor 4.4.4.4 update-source Loopback1
 neighbor 4.4.4.4 route-map FILTER out
 no auto-summary
!
check output on ISP1
!
ISP1#sh ip bgp
BGP table version is 13, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       2.2.2.2                                0 123 ?
*> 1.1.1.2/32       2.2.2.2                                0 123 ?
*> 1.1.1.3/32       2.2.2.2                                0 123 ?
*> 1.1.1.4/32       2.2.2.2                                0 123 ?
*> 1.1.1.5/32       2.2.2.2                                0 123 i
*> 1.1.1.6/32       2.2.2.2                                0 123 i
*> 4.4.4.1/32       0.0.0.0                  0         32768 i
*> 4.4.4.2/32       0.0.0.0                  0         32768 i
*> 4.4.4.3/32       0.0.0.0                  0         32768 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
*> 10.1.12.0/24     2.2.2.2                                0 123 i
*> 10.1.13.0/24     2.2.2.2                                0 123 i
!

10. Use automatic-aggregation & manual summarization ?

Same diagram as above:
While sending 1.1.1.1-6/32 network from R2 to ISP1 first do the
automatic summarization then manual-summarization with null0 options.
---->

on R2
R2(config-router)#aggregate-address 1.1.1.0 255.255.255.248
on ISP1
ISP1#sh ip bgp
BGP table version is 14, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/29       2.2.2.2                  0             0 123 i
*> 1.1.1.1/32       2.2.2.2                                0 123 ?
*> 1.1.1.2/32       2.2.2.2                                0 123 ?
*> 1.1.1.3/32       2.2.2.2                                0 123 ?
*> 1.1.1.4/32       2.2.2.2                                0 123 ?
*> 1.1.1.5/32       2.2.2.2                                0 123 i
*> 1.1.1.6/32       2.2.2.2                                0 123 i
*> 4.4.4.1/32       0.0.0.0                  0         32768 i
*> 4.4.4.2/32       0.0.0.0                  0         32768 i
*> 4.4.4.3/32       0.0.0.0                  0         32768 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
*> 10.1.12.0/24     2.2.2.2                                0 123 i
*> 10.1.13.0/24     2.2.2.2                                0 123 i

u will get summary but all other routes are shown , if we use the
R2(config-router)#aggregate-address 1.1.1.0 255.255.255.248 summary-only

then what will happen let us see:
ISP1#sh ip bgp
BGP table version is 8, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/29       2.2.2.2                  0             0 123 i
*> 4.4.4.1/32       0.0.0.0                  0         32768 i
*> 4.4.4.2/32       0.0.0.0                  0         32768 i
*> 4.4.4.3/32       0.0.0.0                  0         32768 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
*> 10.1.12.0/24     2.2.2.2                                0 123 i
*> 10.1.13.0/24     2.2.2.2                                0 123 i

it suppress all the 1.1.1.0 network.
------> but this is not the way in production network in production
we are using manual summarization .
!
R2(config-router)#do sh run | se ip route
ip route 1.1.1.0 255.255.255.248 Null0
ip route 4.4.4.4 255.255.255.255 10.1.24.4
!
R2(config-router)#do sh run | se bgp
router bgp 123
 redistribute static
!
ISP1#sh ip bgp
BGP table version is 6, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/29       2.2.2.2                  0             0 123 ?
*> 4.4.4.1/32       0.0.0.0                  0         32768 i
*> 4.4.4.2/32       0.0.0.0                  0         32768 i
*> 4.4.4.3/32       0.0.0.0                  0         32768 i
*  4.4.4.4/32       2.2.2.2                  0             0 123 ?
*>                  0.0.0.0                  0         32768 i

No comments:

Post a Comment