My Countingdown

Tuesday, December 13, 2011

Lab 7. BGP Confederation



In BGP confederation, we make sub AS in AS. So likely all peering using eBGP. eBGP does not need full mesh! R1, R2, and R4 have same AS 124. But then R1 & R4 are in sub AS 12402 and R2 is in sub AS 12401. Let's practice 

R1#
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.1 255.255.255.0
 no shu
!
interface Serial0/0
 ip address 14.14.14.1 255.255.255.0
 no shu
!
router bgp 12402
 bgp confederation identifier 124
 bgp confederation peers 12401
 neighbor 12.12.12.2 remote-as 12401
 neighbor 12.12.12.2 next-hop-self
 neighbor 14.14.14.4 remote-as 12402
 neighbor 14.14.14.4 next-hop-self
 net 1.1.1.1 mask 255.255.255.255

R4#
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface Serial0/0
 ip address 14.14.14.4 255.255.255.0
 no shu
!
router bgp 12402
 bgp confederation identifier 124
 neighbor 14.14.14.1 remote-as 12402
 net 4.4.4.4 mask 255.255.255.255

R2#
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
 ip address 12.12.12.2 255.255.255.0
 no shu
!
interface Serial0/0
 ip address 23.23.23.2 255.255.255.0
 no shu
!
router bgp 12401
 bgp confederation identifier 124
 bgp confederation peers 12402
 neighbor 12.12.12.1 remote-as 12402
 neighbor 12.12.12.1 next-hop-self
 neighbor 23.23.23.3 remote-as 3
 net 2.2.2.2 mask 255.255.255.255

R3#
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Serial0/0
 ip address 23.23.23.3 255.255.255.0
 no shu
!
router bgp 3
 neighbor 23.23.23.2 remote-as 124
 net 3.3.3.3 mask 255.255.255.255

Verify routing table and BGP

R3(config-router)#do sh ip rout
Codes: 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

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
B       1.1.1.1 [20/0] via 23.23.23.2, 00:10:06
     2.0.0.0/32 is subnetted, 1 subnets
B       2.2.2.2 [20/0] via 23.23.23.2, 00:10:06
     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 [20/0] via 23.23.23.2, 00:05:12
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, Serial0/0

R3(config-router)#do sh ip bgp
BGP table version is 5, 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
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       23.23.23.2                             0 124 i
*> 2.2.2.2/32       23.23.23.2               0             0 124 i
*> 3.3.3.3/32       0.0.0.0                     0         32768 i
*> 4.4.4.4/32       23.23.23.2                             0 124 i

R3(config-router)#do sh ip bgp summ
BGP router identifier 3.3.3.3, local AS number 3
BGP table version is 5, main routing table version 5
4 network entries using 480 bytes of memory
4 path entries using 208 bytes of memory
4/3 BGP path/bestpath attribute entries using 496 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
Bitfield cache entries: current 1 (at peak 1) using 32 bytes of memory
BGP using 1240 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   124      17             14           5        0      0      00:10:47        3

Make sure ping is ok

R3(config-router)#do ping 4.4.4.4 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

Oupsss.... please use source loopback

R3(config-router)#do ping 4.4.4.4 sou 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
Packet sent with a source address of 3.3.3.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/55/88 ms

R4(config-router)#do ping 3.3.3.3 sou lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/65/132 ms

No comments:

Post a Comment