Tuesday, 11 April 2017

No Advertise Community Configuration example - BGP



R1:-

interface Loopback0
 ip address 1.1.1.1 255.255.255.255

interface FastEthernet2/0
Description “ Connected to R2”
 ip address 12.12.12.1 255.255.255.0
 no shut

router bgp 1
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 12.12.12.2 remote-as 2
 neighbor 12.12.12.2 send-community both  --<< Without it Community will not send to neighbor
 neighbor 12.12.12.2 route-map setCommunity out
 no auto-summary

route-map setCommunity permit 10
 set community no-advertise

R2:-

interface Loopback0
 ip address 2.2.2.2 255.255.255.255

interface FastEthernet0/0
Description " Connected to R3"
 ip address 23.23.23.2 255.255.255.0
no shut

interface FastEthernet1/0
Description “Connected to R5”
 ip address 25.25.25.2 255.255.255.0
no shut

interface FastEthernet2/0
Description “Connected to R1”
 ip address 12.12.12.2 255.255.255.0
no shut

Router eigrp 2    ----<< To provide connectivity between AS2 Routers
 network 23.23.23.2 0.0.0.0

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 2.2.2.2 mask 255.255.255.255
 neighbor 12.12.12.1 remote-as 1
 neighbor 23.23.23.3 remote-as 2
 neighbor 23.23.23.3 next-hop-self
 neighbor 23.23.23.3 send-community both
 neighbor 25.25.25.5 remote-as 3
 no auto-summary

R3:-

interface Loopback0
 ip address 3.3.3.3 255.255.255.255

interface FastEthernet0/1
Description “Connected to R4”
 ip address 34.34.34.3 255.255.255.0
 no shut


interface FastEthernet0/0
Description “Connected to R3”
 ip address 23.23.23.3 255.255.255.0
no shut

router eigrp 2
 network 23.23.23.3 0.0.0.0
 network 34.34.34.3 0.0.0.0

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 3.3.3.3 mask 255.255.255.255
 neighbor 23.23.23.2 remote-as 2
 neighbor 23.23.23.2 route-reflector-client  --<< R3 is RR for R2 and R4
 neighbor 34.34.34.4 remote-as 2
 neighbor 34.34.34.4 route-reflector-client --<< R3 is RR for R2 and R4
 neighbor 34.34.34.4 send-community both
 no auto-summary

R4:-

interface Loopback0
 ip address 4.4.4.4 255.255.255.255

interface FastEthernet0/1
Description “Connected to R4”
 ip address 34.34.34.4 255.255.255.0
no shut

router eigrp 2
 network 34.34.34.4 0.0.0.0

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 4.4.4.4 mask 255.255.255.255
 neighbor 34.34.34.3 remote-as 2
  no auto-summary

R5:-

interface Loopback0
 ip address 5.5.5.5 255.255.255.255

interface FastEthernet1/0
Description “Connected to R2”
 ip address 25.25.25.5 255.255.255.0

router bgp 3
 no synchronization
 bgp log-neighbor-changes
 network 5.5.5.5 mask 255.255.255.255
 neighbor 25.25.25.2 remote-as 2
 no auto-summary

Verification:-

R1:-

R1#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [20/0] via 12.12.12.2, 00:31:49
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [20/0] via 12.12.12.2, 00:11:38
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [20/0] via 12.12.12.2, 00:31:18
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet2/0
L        12.12.12.1/32 is directly connected, FastEthernet2/0
R1#sh ip bgp
BGP table version is 5, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       0.0.0.0                  0         32768 I  --<<<  R1 advertising Lo0
*> 2.2.2.2/32       12.12.12.2               0             0 2 i
*> 3.3.3.3/32       12.12.12.2                             0 2 i
*> 5.5.5.5/32       12.12.12.2                             0 2 3 i

R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 5, main routing table version 5
4 network entries using 512 bytes of memory
4 path entries using 208 bytes of memory
4/4 BGP path/bestpath attribute entries using 496 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1264 total bytes of memory
BGP activity 4/0 prefixes, 4/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4            2      40      41        5    0    0 00:33:03        3

R2:-

R2#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
B        1.1.1.1 [20/0] via 12.12.12.1, 00:24:33
      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [200/0] via 23.23.23.3, 00:12:16
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [20/0] via 25.25.25.5, 00:32:26
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet2/0
L        12.12.12.2/32 is directly connected, FastEthernet2/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/0
L        23.23.23.2/32 is directly connected, FastEthernet0/0
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.2/32 is directly connected, FastEthernet1/0
R2#sh ip bgp
BGP table version is 6, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       12.12.12.1               0             0 1 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*>i3.3.3.3/32       23.23.23.3               0    100      0 i
* i4.4.4.4/32       34.34.34.4               0    100      0 i
*> 5.5.5.5/32       25.25.25.5               0             0 3 i

R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 2
BGP table version is 6, main routing table version 6
5 network entries using 640 bytes of memory
5 path entries using 260 bytes of memory
4/4 BGP path/bestpath attribute entries using 496 bytes of memory
1 BGP rrinfo entries using 24 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
1 BGP community entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1492 total bytes of memory
BGP activity 5/0 prefixes, 5/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4            1      41      41        6    0    0 00:33:42        1
23.23.23.3      4            2      19      19        6    0    0 00:12:24        2
25.25.25.5      4            3      41      41        6    0    0 00:33:01        1
R2#sh ip bgp 1.1.1.1
BGP routing table entry for 1.1.1.1/32, version 5
Paths: (1 available, best #1, table default, not advertised to any peer)
  Not advertised to any peer
  1
    12.12.12.1 from 12.12.12.1 (1.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Community: no-advertise  -<<< Learning Community which is set on R1


R3:-

R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 2
BGP table version is 6, main routing table version 6
4 network entries using 512 bytes of memory
4 path entries using 208 bytes of memory
3/3 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1116 total bytes of memory
BGP activity 4/0 prefixes, 4/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
23.23.23.2      4            2      20      20        6    0    0 00:12:56        2
34.34.34.4      4            2      18      21        6    0    0 00:12:53        1

R3#sh ip bgp --<<< No R1 Route advertised from R2 to R5

BGP table version is 6, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i2.2.2.2/32       23.23.23.2               0    100      0 i
*> 3.3.3.3/32       0.0.0.0                  0         32768 i
*>i4.4.4.4/32       34.34.34.4               0    100      0 i
*>i5.5.5.5/32       23.23.23.2               0    100      0 3 i

R3#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [200/0] via 23.23.23.2, 00:12:57
      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback0
      4.0.0.0/32 is subnetted, 1 subnets
B        4.4.4.4 [200/0] via 34.34.34.4, 00:12:57
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [200/0] via 23.23.23.2, 00:12:57
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet2/0
L        12.12.12.2/32 is directly connected, FastEthernet2/0
      23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        23.23.23.0/24 is directly connected, FastEthernet0/0
L        23.23.23.3/32 is directly connected, FastEthernet0/0
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.2/32 is directly connected, FastEthernet1/0
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet0/1
L        34.34.34.3/32 is directly connected, FastEthernet0/1
R3#

R4:-

R4#sh ip bgp summary
BGP router identifier 4.4.4.4, local AS number 2
BGP table version is 5, main routing table version 5
4 network entries using 512 bytes of memory
4 path entries using 208 bytes of memory
3/3 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP rrinfo entries using 24 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1140 total bytes of memory
BGP activity 4/0 prefixes, 4/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
34.34.34.3      4            2      21      19        5    0    0 00:13:19        3
R4#sh ip bgp
BGP table version is 5, 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, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i2.2.2.2/32       23.23.23.2               0    100      0 i
*>i3.3.3.3/32       34.34.34.3               0    100      0 i
*> 4.4.4.4/32       0.0.0.0                  0         32768 i
*>i5.5.5.5/32       23.23.23.2               0    100      0 3 i
R4#sh ip rou
R4#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [200/0] via 23.23.23.2, 00:13:22
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [200/0] via 34.34.34.3, 00:13:22
      4.0.0.0/32 is subnetted, 1 subnets
C        4.4.4.4 is directly connected, Loopback0
      5.0.0.0/32 is subnetted, 1 subnets
B        5.5.5.5 [200/0] via 23.23.23.2, 00:13:22
      23.0.0.0/24 is subnetted, 1 subnets
D        23.23.23.0 [90/30720] via 34.34.34.3, 00:14:36, FastEthernet0/1
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet0/1
L        34.34.34.4/32 is directly connected, FastEthernet0/1
      45.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        45.45.45.0/24 is directly connected, FastEthernet2/0
L        45.45.45.4/32 is directly connected, FastEthernet2/0
R4#

R5:-

R5#sh ip bgp summary
BGP router identifier 5.5.5.5, local AS number 3
BGP table version is 5, main routing table version 5
3 network entries using 384 bytes of memory
3 path entries using 156 bytes of memory
3/3 BGP path/bestpath attribute entries using 372 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 936 total bytes of memory
BGP activity 3/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
25.25.25.2      4            2      43      42        5    0    0 00:34:31        2

R5#sh ip bgp--<<< No R1 Route advertised from R2 to R5

BGP table version is 5, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       25.25.25.2               0             0 2 i
*> 3.3.3.3/32       25.25.25.2                             0 2 i
*> 5.5.5.5/32       0.0.0.0                  0         32768 i

R5#sh ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
B        2.2.2.2 [20/0] via 25.25.25.2, 00:34:03
      3.0.0.0/32 is subnetted, 1 subnets
B        3.3.3.3 [20/0] via 25.25.25.2, 00:13:52
      5.0.0.0/32 is subnetted, 1 subnets
C        5.5.5.5 is directly connected, Loopback0
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0

L        25.25.25.5/32 is directly connected, FastEthernet1/0

No comments:

Post a Comment