Saturday, 6 October 2012

CE-PE Routing: Configuring using BGP - I

CE-PE Routing: Configuring using BGP - I
·         There are many options for CE-PE routing.
·         In this post, let me configure routing between CE-PE using protocol BGP

·         In PE router, we need to enable BGP under address-family ipv4 vrf <VPN_NAME>
·         In CE router, we need to enable BGP normally under ipv4 address-family.
·         Let me take a basic topology to configure this:
 
VRF Configuration:

CE1-PE1 Link
CE1#show run int ser1/0
Building configuration...

Current configuration : 87 bytes
!
interface Serial1/0
 ip address 10.1.13.1 255.255.255.0
 serial restart-delay 0
end

CE1#

PE1#show run | begin ip vrf
ip vrf VPN_A
 rd 100:1
 route-target export 100:1
 route-target import 100:1
!
PE1#show run int ser1/0
Building configuration...

Current configuration : 112 bytes
!
interface Serial1/0
 ip vrf forwarding VPN_A
 ip address 10.1.13.3 255.255.255.0
 serial restart-delay 0
end

PE1#
PE1#ping vrf VPN_A 10.1.13.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.13.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 36/64/104 ms
PE1#

CE2-PE2 Link:

CE2#show run int ser1/0
Building configuration...

Current configuration : 87 bytes
!
interface Serial1/0
 ip address 10.1.24.2 255.255.255.0
 serial restart-delay 0
end

CE2#

PE2#show run | begin ip vrf
ip vrf VPN_A
 rd 100:1
 route-target export 100:1
 route-target import 100:1
!
PE2#show run int ser1/0
Building configuration...

Current configuration : 112 bytes
!
interface Serial1/0
 ip vrf forwarding VPN_A
 ip address 10.1.24.4 255.255.255.0
 serial restart-delay 0
end

PE2#
PE2#ping vrf VPN_A 10.1.24.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.24.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/47/80 ms
PE2#

Observation:
·         CE1-PE1 link is up
·         CE2-PE2 link is up

Configuring MPLS in the Core, between PE1-PE2:

PE1(config)#int ser1/1
PE1(config-if)#mpls ip
PE1(config-if)#
*Mar  1 03:25:17.079: %LDP-5-NBRCHG: LDP Neighbor 4.4.4.4:0 (1) is UP
PE1(config-if)#

PE2(config)#int ser1/1
PE2(config-if)#mpls ip
PE2(config-if)#
*Mar  1 01:58:25.191: %LDP-5-NBRCHG: LDP Neighbor 3.3.3.3:0 (1) is UP
PE2(config-if)#

Configuring OSPF as IGP between PE1-PE2:

PE1#show run | begin router ospf
router ospf 1
 log-adjacency-changes
 network 3.3.3.3 0.0.0.0 area 0
 network 10.1.34.3 0.0.0.0 area 0
!
PE2#show run | begin router ospf
router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes
 network 4.4.4.4 0.0.0.0 area 0
 network 10.1.34.4 0.0.0.0 area 0
!
PE1#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 100 percent (5/5), round-trip min/avg/max = 20/56/88 ms
PE1#
PE2#ping 3.3.3.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/56/76 ms
PE2#

Configuring BGP-(ebgp between CE-PE and vpnv4 ibgp between PE1-PE2)

CE1#show run | begin router bgp
router bgp 100
 no synchronization
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 network 1.1.1.1 mask 255.255.255.255
 neighbor 10.1.13.3 remote-as 200
 no auto-summary
!
PE1#show run | begin router bgp
router bgp 200
 bgp router-id 3.3.3.3
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 4.4.4.4 remote-as 200
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 10.1.13.1 remote-as 100
 !
 address-family vpnv4
  neighbor 4.4.4.4 activate
  neighbor 4.4.4.4 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf VPN_A
  neighbor 10.1.13.1 remote-as 100
  neighbor 10.1.13.1 activate
  no synchronization
 exit-address-family
!
CE2#show run | begin router bgp
router bgp 100
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 2.2.2.2 mask 255.255.255.255
 neighbor 10.1.24.4 remote-as 200
 no auto-summary
!
PE2#show run | begin router bgp
router bgp 200
 bgp router-id 4.4.4.4
 no bgp default ipv4-unicast
 bgp log-neighbor-changes
 neighbor 3.3.3.3 remote-as 200
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 10.1.24.2 remote-as 100
 !
 address-family vpnv4
  neighbor 3.3.3.3 activate
  neighbor 3.3.3.3 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf VPN_A
  neighbor 10.1.24.2 remote-as 100
  neighbor 10.1.24.2 activate
  no synchronization
 exit-address-family
!
CE1#show ip bgp sum
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 2, main routing table version 2
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 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 2) using 32 bytes of memory
BGP using 452 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.13.3       4   200     118     120        2    0    0 01:42:13        0
CE1#
CE1#show ip bgp
BGP table version is 2, 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
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
CE1#
PE1#show ip bgp all sum
For address family: VPNv4 Unicast
BGP router identifier 3.3.3.3, local AS number 200
BGP table version is 8, main routing table version 8
2 network entries using 280 bytes of memory
2 path entries using 136 bytes of memory
4/2 BGP path/bestpath attribute entries using 496 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
1 BGP extended 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
Bitfield cache entries: current 2 (at peak 2) using 64 bytes of memory
BGP using 1024 total bytes of memory
BGP activity 3/1 prefixes, 4/2 paths, scan interval 15 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
4.4.4.4         4   200      23      23        8    0    0 00:18:16        1
10.1.13.1       4   100     121     119        8    0    0 01:43:06        1
PE1#
PE1#show ip bgp vpnv4 all
BGP table version is 8, 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
Route Distinguisher: 100:1 (default for vrf VPN_A)
*> 1.1.1.1/32       10.1.13.1                0             0 100 i
*>i2.2.2.2/32       4.4.4.4                  0    100      0 100 i
PE1#
PE1#ping vrf VPN_A 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/49/116 ms
PE1#

CE2#show ip bgp sum
BGP router identifier 2.2.2.2, local AS number 100
BGP table version is 2, main routing table version 2
1 network entries using 120 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 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 452 total bytes of memory
BGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
10.1.24.4       4   200      32      32        2    0    0 00:28:20        0
CE2#
CE2#show ip bgp
BGP table version is 2, 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
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
CE2#

PE2#show ip bgp all sum
For address family: VPNv4 Unicast
BGP router identifier 4.4.4.4, local AS number 200
BGP table version is 4, main routing table version 4
2 network entries using 280 bytes of memory
2 path entries using 136 bytes of memory
4/2 BGP path/bestpath attribute entries using 496 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
1 BGP extended 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
Bitfield cache entries: current 2 (at peak 2) using 64 bytes of memory
BGP using 1024 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 15 secs

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.3.3.3         4   200      24      24        4    0    0 00:19:29        1
10.1.24.2       4   100      32      32        4    0    0 00:28:44        1
PE2#
PE2#show ip bgp vpnv4 all
BGP table version is 4, 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
Route Distinguisher: 100:1 (default for vrf VPN_A)
*>i1.1.1.1/32       3.3.3.3                  0    100      0 100 i
*> 2.2.2.2/32       10.1.24.2                0             0 100 i
PE2#
PE2#ping vrf VPN_A 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/52/88 ms
PE2#

Observation:
·         EBGP between CE1-PE1 and CE2-PE2 is up.
·         IBGP between PE1-PE2 is up
·         CE1 is advertising 1.1.1.1/32 into BGP and PE1 is able to ping it.
·         CE2 is advertising 1.1.1.1/32 into BGP and PE2 is able to ping it.

Now, lets check the CE routers for the routes:

CE1(config-if)#do show ip route
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
C       1.1.1.1 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.13.0 is directly connected, Serial1/0
CE1(config-if)#

CE2#show ip route
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

     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.24.0 is directly connected, Serial1/0
CE2#

Observation:
·         We don’t see any other customer site routesL
·         CE1 is not getting CE2’s loopback 2.2.2.2/32
·         CE2 is not getting CE1’s loopback 1.1.1.1/32

Lets see the BGP debugs in CE routers:

CE1#debug ip bgp updates
CE1#
CE1#clear ip bgp *
CE1#
*Mar  1 02:03:39.935: %BGP-5-ADJCHANGE: neighbor 10.1.13.3 Down User reset
*Mar  1 02:03:41.083: %BGP-5-ADJCHANGE: neighbor 10.1.13.3 Up
CE1#
*Mar  1 02:03:41.191: BGP(0): 10.1.13.3 rcv UPDATE w/ attr: nexthop 10.1.13.3, origin i, originator 0.0.0.0, path 200 100, community , extended community
*Mar  1 02:03:41.195: BGP(0): 10.1.13.3 rcv UPDATE about 2.2.2.2/32 -- DENIED due to: AS-PATH contains our own AS;
*Mar  1 02:03:42.111: BGP(0): 10.1.13.3 rcv UPDATE about 2.2.2.2/32 -- withdrawn
CE1#

CE2#debug ip bgp updates

CE2#clear ip bgp *
CE2#
*Mar  1 00:36:46.163: %BGP-5-ADJCHANGE: neighbor 10.1.24.4 Down User reset
CE2#
*Mar  1 00:36:47.355: %BGP-5-ADJCHANGE: neighbor 10.1.24.4 Up
CE2#
*Mar  1 00:36:56.791: BGP: Import walker start version 0, end version 1
*Mar  1 00:36:56.791: BGP: ... start import cfg version = 0
*Mar  1 00:36:57.599: BGP(0): nettable_walker 2.2.2.2/32 route sourced locally
CE2#
*Mar  1 00:37:08.031: BGP(0): 10.1.24.4 rcv UPDATE w/ attr: nexthop 10.1.24.4, origin i, originator 0.0.0.0, path 200 100, community , extended community
*Mar  1 00:37:08.035: BGP(0): 10.1.24.4 rcv UPDATE about 1.1.1.1/32 -- DENIED due to: AS-PATH contains our own AS;
CE2#
*Mar  1 00:37:18.135: BGP(0): 10.1.24.4 send UPDATE (format) 2.2.2.2/32, next 10.1.24.2, metric 0, path Local
CE2#

Observation:
·         This is expected because of AS-PATH is working as loop prevention mechanism
·         CE routers are denying the routes from other CE as they see their own AS number in the AS-PATH

·         Very interesting, what to do now?????
·         Don’t you worry, we have 2 ways to get the routes from other CE

·         First method is to use AS-OVERRIDE in PE routers, so that PE router will change the AS number to its own while forwarding the updates to CE
·         2nd method is to use allowas-in option in CE routers, so that CE routers will ignore the same AS number in the AS-PATH

·         Lets see the configuration of AS-OVERRIDE in PE routers:

PE1(config)#router bgp 200
PE1(config-router)#address-family ipv4 vrf VPN_A
PE1(config-router-af)#neighbor 10.1.13.1 as-override
PE1(config-router-af)#
*Mar  1 02:04:58.207: %BGP-5-ADJCHANGE: neighbor 10.1.13.1 vpn vrf VPN_A Down AS-override change
PE1(config-router-af)#
*Mar  1 02:04:59.923: %BGP-5-ADJCHANGE: neighbor 10.1.13.1 vpn vrf VPN_A Up
PE1(config-router-af)#

PE2(config)#router bgp 200
PE2(config-router)#address-family ipv4 vrf VPN_A
PE2(config-router-af)#neighbor 10.1.24.2 as-override
PE2(config-router-af)#
*Mar  1 00:38:44.259: %BGP-5-ADJCHANGE: neighbor 10.1.24.2 vpn vrf VPN_A Down AS-override change
*Mar  1 00:38:45.047: %BGP-5-ADJCHANGE: neighbor 10.1.24.2 vpn vrf VPN_A Up
PE2(config-router-af)#

Now, lets see the routing tables in CE routers:

CE1#show ip route
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
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 10.1.13.3, 00:01:31
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.13.0 is directly connected, Serial1/0
CE1#ping 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
CE1#
CE1#show 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
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
*> 2.2.2.2/32       10.1.13.3                              0 200 200 i
CE1#
CE2#show ip route
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 10.1.24.4, 00:00:59
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.24.0 is directly connected, Serial1/0
CE2#
CE2#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
CE2#
CE2#show 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
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       10.1.24.4                              0 200 200 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
CE2#trac

Observation:
·         Now, CE routers got the routes from other CE routers
·         But ping failsL
·         But, for the successful ping we must have routes from end-end path
·         In this case, we don’t have the CE-PE serial links in the other CE
·         Solution is to redistribute the CE-PE link into vrf BGP in PE routers


PE1(config)#router bgp 200
PE1(config-router)#address-family ipv4 vrf VPN_A
PE1(config-router-af)#redistribute connected
PE1(config-router-af)#

PE2(config)#router bgp 200
PE2(config-router)#address-family ipv4 vrf VPN_A
PE2(config-router-af)#redistribute connected
PE2(config-router-af)#

Now, let see the routing tables for CE routers:

CE1#show ip route
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
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 10.1.13.3, 00:19:49
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.13.0 is directly connected, Serial1/0
B       10.1.24.0 [20/0] via 10.1.13.3, 00:19:49
CE1#
CE1#ping 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/125/196 ms
CE1#

CE2#show ip route
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 10.1.24.4, 00:20:19
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
B       10.1.13.0 [20/0] via 10.1.24.4, 00:20:19
C       10.1.24.0 is directly connected, Serial1/0
CE2#
CE2#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 100/164/212 ms
CE2#

Observation:
·         Now, CE routers have the route for the other CE-PE link
·         CE1 is able to ping CE2’S loopback 2.2.2.2/32
·         CE2 is able to ping CE1’s loopback 1.1.1.1/32

Now, let’s see the configuration for ALLOWAS-IN in CE routers:

PE1(config-if)#router bgp 200
PE1(config-router)#address-family ipv4 vrf VPN_A
PE1(config-router-af)#no neighbor 10.1.13.1 as-override
PE1(config-router-af)#


PE2(config-if)#router bgp 200
PE2(config-router)#address-family ipv4 vrf VPN_A
PE2(config-router-af)#no neighbor 10.1.24.2 as-override
PE2(config-router-af)#

CE1(config)#router bgp 100
CE1(config-router)#neighbor 10.1.13.3 allowas-in
CE1(config-router)#

CE2(config)#router bgp 100
CE2(config-router)#neighbor 10.1.24.4 allowas-in
CE2(config-router)#

CE1#show ip route
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
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 10.1.13.3, 00:01:05
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.13.0 is directly connected, Serial1/0
B       10.1.24.0 [20/0] via 10.1.13.3, 00:01:33
CE1#show ip bgp
BGP table version is 27, 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
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
*> 2.2.2.2/32       10.1.13.3                              0 200 100 i
r> 10.1.13.0/24     10.1.13.3                0             0 200 ?
*> 10.1.24.0/24     10.1.13.3                              0 200 ?
CE1#
CE1#ping 2.2.2.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 104/157/228 ms
CE1#

CE2#show ip route
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 10.1.24.4, 00:02:39
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
B       10.1.13.0 [20/0] via 10.1.24.4, 00:02:58
C       10.1.24.0 is directly connected, Serial1/0
CE2#
CE2#show ip bgp
BGP table version is 27, 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
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.1/32       10.1.24.4                              0 200 100 i
*> 2.2.2.2/32       0.0.0.0                  0         32768 i
*> 10.1.13.0/24     10.1.24.4                              0 200 ?
r> 10.1.24.0/24     10.1.24.4                0             0 200 ?
CE2#
CE2#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/138/228 ms
CE2#
Observation:
·         Now, CE routers have the route for the other CE-PE link
·         CE1 is able to ping CE2’S loopback 2.2.2.2/32
·         CE2 is able to ping CE1’s loopback 1.1.1.1/32

Let me configure BGP Site Of Origin attribute in the next post -->

No comments:

Post a Comment