cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

How to configure MPLS L3 with BGP AS OVERRIDE?

180
Views
0
Helpful
0
Comments
Edgar c Francis
Beginner

BGP has a simple loop prevention mechanism for external BGP. When you see your own Autonomous system number in the AS path, we do not accept the prefix. This mechanism is fine for Internet routing but there are some other scenarios where this might be an issue. 



EdgarcFrancis_0-1628753641394.jpeg

 






In our topology no routes get installed because the CE routers receive the routes with its own AS coming from other sites.(5500). So as per BGP it will not install the routes in the BGP table. Its simple if the customer has the same ASN at different sites, the CE routers drop the BGP routes.

The CE routers drop the BGP update as it sees that its own ASN 5500 is in the update.This behavior is the default behavior of BGP and is a prevention mechanism against loops in BGP

 

EdgarcFrancis_1-1628753639897.png

 

 

However, we have an easier solution is available and it involves having the PE router replace the customer ASN in the AS path with the ASN of the service provider. The command that you need to configure on the PE router to override the ASN is neighbor-address as-override.  



  1. 1. Introduction of MPLS

    2.What is MPLS Label distributing protocol (LDP) ? How LDP works?

    3.how to configure MPLS LDP Peering ?

    4.What is MPLS L3 VPN ? How to configure?

    5.How to configure MPLS L3 VPN with RIPv2 ?

    6.How to configure MPLS L3 VPN with EIGRP ?

    7.How to configure MPLS L3 VPN with OSPF ?

    8.What is OSPF Sham Links? how to configure OSPF Sham Links?

9.How to configure MPLS L3 with BGP AS OVERRIDE?

 

Let see the configuration :-

Topology: 

 

 

 

EdgarcFrancis_2-1628753640165.png

 

Goal:



  • configure the topology as per the diagram 
  • assign the IP addresses to their interfaces
  • configure IGP (OSPF 1) inside MPLS SP core 
  • configure MPLS LDP on router 1_2_3 
  • configure labels (99-199_200-299_300-399)
  • configure VRF A-1 on router 1 and VRF A-2 on router 3
  • configure RD and RT  value 500:1 on both the sites
  • configure on router 1 assign fastethernet facing CE under VRF A-1
  • configure on router 3 assign fastethernet facing CE under VRF A-2
  • Configure the loopbacks with exact mask to exchange the routes 
  • Configure Routing between PE and CE using EBGP  on the both ends. 
  • Configure  AS- 6123 for SP core , AS 5500 for both the customer sites 
  • ensure that PE routers(R1,and R3) should be able to ping CE routers (R4 and R5) LAN interfaces receptively
  • .configure VPNv4 peering between Router1  and Router 3
  • configure AS-OVERRIDE on Router 1 and Router 3
  • make sure router install the routes in BGP table....

 

 

 

R1(config)#Interface fastethernet 0/0

R1(config-if)#Ip address 10.1.1.1   255.0.0.0

R1(config-if)#No shutdown

R1(config-if)# keepalive

R1(config-if)#Exit



R1(config)#Interface serial 4/0

R1(config-if)#Ip address  1.1.1.1 255.0.0.0

R1(config-if)#No shutdown

R1(config-if)#Exit

 

R1(config)#Interface serial 4/2

R1(config-if)#Ip address  3.3.3.2 255.0.0.0

R1(config-if)#No shutdown

R1(config-if)#Exit

 

R1(config)#Interface loopback 0

R1(config-if)#Ip address 192.168.10.1 255.255.255.0

R1(config-if)#Exit

 

R1(config)#Interface loopback  1

R1(config-if)#Ip address 192.168.11.1 255.255.255.0

R1(config-if)#Exit

R1(config)#Interface loopback  2

R1(config-if)#Ip address 192.168.12.1 255.255.255.0

R1(config-if)#Exit

R1(config)#Interface loopback 3

R1(config-if)#Ip address 192.168.13.1  255.255.255.0

R1(config-if)#Exit

 

R2(config)#Interface fastethernet 0/0

R2(config-if)#Ip address 20.1.1.1   255.0.0.0

R2(config-if)#No shutdown

R2(config-if)#keepalive

R2(config-if)#Exit

R2(config)#Interface serial 4/0

R2(config-if)#Ip address  1.1.1.2 255.0.0.0

R2(config-if)#No shutdown

R2(config-if)#Exit

 

R2(config)#Interface serial 4/1

R2(config-if)#Ip address  2.2.2.1 255.0.0.0

R2(config-if)#No shutdown

R2(config-if)#Exit

 

R2(config)#Interface loopback 0

R2(config-if)#Ip address 192.168.20.1 255.255.255.0

R2(config-if)#Exit

R2(config)#Interface loopback  1

R2(config-if)#Ip address 192.168.21.1 255.255.255.0

R2(config-if)#Exit

R2(config)#Interface loopback  2

R2(config-if)#Ip address 192.168.22.1 255.255.255.0

R2(config-if)#Exit

R2(config)#Interface loopback 3

R2(config-if)#Ip address 192.168.23.1  255.255

 

R3(config)#Interface fastethernet 0/0

R3(config-if)#Ip address 30.1.1.1   255.0.0.0

R3(config-if)#No shutdown

R3(config-if)# keepalive

R3(config-if)#Exit



R3(config)#Interface serial 4/1

R3(config-if)#Ip address  2.2.2.2 255.0.0.0

R3(config-if)#No shutdown

R3(config-if)#Exit

R3(config)#Interface serial 4/2

R3(config-if)#Ip address  3.3.3.1 255.0.0.0

R3(config-if)#No shutdown

R3(config-if)#Exit

 

R3(config)#Interface loopback 0

R3(config-if)#Ip address 192.168.30.1 255.255.255.0

R3(config-if)#Exit

R3(config)#

R3(config)#Interface loopback  1

R3(config-if)#Ip address 192.168.31.1 255.255.255.0

R3(config-if)#Exit

R3(config)#Interface loopback  2

R3(config-if)#Ip address 192.168.32.1 255.255.255.0

R3(config-if)#Exit

R3(config)#Interface loopback 3

R3(config-if)#Ip address 192.168.33.1  255.255.

R3(config-if)#Exit

 

R4(config)#interface fastEthernet 0/0

R4(config-if)#ip address 30.1.1.2 255.0.0.0

R4(config-if)#no shutdown

R4(config-if)#exit

 

R4(config)#interface loopback 0

R4(config-if)#ip address 192.168.40.1 255.255.255.0

R4(config-if)#exit

 

R5(config)#Interface fastethernet 0/0

R5(config-if)#Ip address 10.1.1.2   255.0.0.0

R5(config-if)#shutdown

R5(config-if)#Exit

 

R5(config)#Interface loopback 0

R5(config-if)#Ip address 192.168.50.1  255.255.255.0

R5(config-if)#Exit



R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up

Serial4/0              1.1.1.1         YES manual up                    up

Serial4/2              3.3.3.2         YES manual up                    up
Loopback0              192.168.10.1    YES manual up                    up
Loopback1              192.168.11.1    YES manual up                    up
Loopback2              192.168.12.1    YES manual up                    up
Loopback3              192.168.13.1    YES manual up                    up

R2#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        20.1.1.1        YES manual up                    up

Serial4/0              1.1.1.2         YES manual up                    up

Serial4/1              2.2.2.1         YES manual up                    up

Loopback0              192.168.20.1    YES manual up                    up

Loopback1              192.168.21.1    YES manual up                    up

Loopback2              192.168.22.1    YES manual up                    up

Loopback3              192.168.23.1    YES manual up                    up

 

R3#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        30.1.1.1        YES manual up                    up

Serial4/1              2.2.2.2         YES manual up                    up

Serial4/2              3.3.3.1         YES manual up                    up

Loopback0              192.168.30.1    YES manual up                    up

Loopback1              192.168.31.1    YES manual up                    up

Loopback2              192.168.32.1    YES manual up                    up

Loopback3              192.168.33.1    YES manual up                    up



R4#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        30.1.1.2        YES manual up                    up

Loopback0              192.168.40.1    YES manual up                    up



 

R5#show ip interface  brief

Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        10.1.1.2        YES manual up                    up

Loopback0              192.168.50.1    YES manual up                    up

 

R1(config)#router ospf 1

R1(config-router)#network 1.0.0.0 0.255.255.255 area 0

R1(config-router)#network 3.0.0.0 0.255.255.255 area 0

R1(config-router)#network 192.168.10.0 255.0.0.0 area 0

R1(config-router)#network 192.168.11.0 255.0.0.0 area 0

R1(config-router)#network 192.168.12.0 255.0.0.0 area 0

R1(config-router)#network 192.168.13.0 255.0.0.0 area 0

R1(config-router)#end

 

R2(config)#router ospf 1

R2(config-router)#network 20.0.0.0 0.255.255.255 area 0

R2(config-router)#network 1.0.0.0 0.255.255.255 area 0

R2(config-router)#network 2.0.0.0 0.255.255.255 area 0

R2(config-router)#network 192.168.20.0 255.0.0.0 area 0

R2(config-router)#network 192.168.21.0 255.0.0.0 area 0

R2(config-router)#network 192.168.22.0 255.0.0.0 area 0

R2(config-router)#network 192.168.23.0 255.0.0.0 area 0

R2(config-router)#end

 

R3(config)#router ospf 1

R3(config-router)#network 2.0.0.0 0.255.255.255 area 0

R3(config-router)#network 3.0.0.0 0.255.255.255 area 0

R3(config-router)#network 192.168.30.0 255.0.0.0 area 0

R3(config-router)#network 192.168.31.0 255.0.0.0 area 0

R3(config-router)#network 192.168.32.0 255.0.0.0 area 0

R3(config-router)#network 192.168.33.0 255.0.0.0 area 0

R3(config-router)#end



R1#show ip route ospf

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, l - LISP

       + - replicated route, % - next hop override

Gateway of last resort is not set

 

O     2.0.0.0/8 [110/128] via 3.3.3.1, 01:14:38, Serial4/2

                [110/128] via 1.1.1.2, 01:14:38, Serial4/0

O     20.0.0.0/8 [110/65] via 1.1.1.2, 01:14:38, Serial4/0

      192.168.20.0/32 is subnetted, 1 subnets

O        192.168.20.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0

      192.168.21.0/32 is subnetted, 1 subnets

O        192.168.21.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0

      192.168.22.0/32 is subnetted, 1 subnets

O        192.168.22.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0

      192.168.23.0/32 is subnetted, 1 subnets

O        192.168.23.1 [110/65] via 1.1.1.2, 01:14:38, Serial4/0

O     192.168.30.0/24 [110/65] via 3.3.3.1, 01:14:38, Serial4/2

      192.168.31.0/32 is subnetted, 1 subnets

O        192.168.31.1 [110/65] via 3.3.3.1, 01:14:38, Serial4/2

      192.168.32.0/32 is subnetted, 1 subnets

O        192.168.32.1 [110/65] via 3.3.3.1, 01:14:38, Serial4/2

      192.168.33.0/32 is subnetted, 1 subnets

O        192.168.33.1 [110/65] via 3.3.3.1, 01:14:38, Serial4/2

 

R3#show ip route ospf

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, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

O     1.0.0.0/8 [110/128] via 3.3.3.2, 01:18:05, Serial4/2

                [110/128] via 2.2.2.1, 01:18:05, Serial4/1

O     20.0.0.0/8 [110/65] via 2.2.2.1, 01:18:05, Serial4/1

O     192.168.10.0/24 [110/65] via 3.3.3.2, 01:18:05, Serial4/2

      192.168.11.0/32 is subnetted, 1 subnets

O        192.168.11.1 [110/65] via 3.3.3.2, 01:18:05, Serial4/2

      192.168.12.0/32 is subnetted, 1 subnets

O        192.168.12.1 [110/65] via 3.3.3.2, 01:18:05, Serial4/2

      192.168.13.0/32 is subnetted, 1 subnets

O        192.168.13.1 [110/65] via 3.3.3.2, 01:18:05, Serial4/2

      192.168.20.0/32 is subnetted, 1 subnets

O        192.168.20.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1

      192.168.21.0/32 is subnetted, 1 subnets

O        192.168.21.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1

      192.168.22.0/32 is subnetted, 1 subnets

O        192.168.22.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1

      192.168.23.0/32 is subnetted, 1 subnets

O        192.168.23.1 [110/65] via 2.2.2.1, 01:18:05, Serial4/1



R1(config)#mpls label protocol ldp
R1(config)#mpls label range 99 199
R1(config)#mpls ldp router-id loopback 0
R1(config)#exit

R1(config)#interface serial 4/0
R1(config-if)#mpls ip
R1(config-if)#exit

R1(config)#interface serial 4/2
R1(config-if)#mpls ip
R1(config-if)#exit

 

R2(config)#mpls label protocol ldp
R2(config)#mpls label range 200 299
R2(config)#mpls ldp router-id loopback 0
R2(config)#exit

R2(config)#interface serial 4/0
R2(config-if)#mpls ip
R2(config-if)#exit

R2(config)#interface serial 4/1
R2(config-if)#mpls ip
R2(config-if)#exit


R3(config)#mpls label protocol ldp
R3(config)#mpls label range 300 399
R3(config)#mpls ldp router-id loopback 0
R3(config)#exit

 

R3(config)#interface serial 4/1
R3(config-if)#mpls ip
R3(config-if)#exit


R3(config)#interface serial 4/2
R3(config-if)#mpls ip
R3(config-if)#exit

 

R1#show mpls ldp neighbor
    Peer LDP Ident: 192.168.20.1:0; Local LDP Ident 192.168.10.1:0
        TCP connection: 192.168.20.1.41723 - 192.168.10.1.646
        State: Oper; Msgs sent/rcvd: 190/188; Downstream
        Up time: 02:23:12
        LDP discovery sources:
          Serial4/0, Src IP addr: 1.1.1.2
        Addresses bound to peer LDP Ident:
          20.1.1.1        1.1.1.2         2.2.2.1         192.168.20.1
          192.168.21.1    192.168.22.1    192.168.23.1
    Peer LDP Ident: 192.168.30.1:0; Local LDP Ident 192.168.10.1:0
        TCP connection: 192.168.30.1.27403 - 192.168.10.1.646
        State: Oper; Msgs sent/rcvd: 186/184; Downstream
        Up time: 02:20:31
        LDP discovery sources:
          Serial4/2, Src IP addr: 3.3.3.1
        Addresses bound to peer LDP Ident:
          2.2.2.2         3.3.3.1         192.168.30.1    192.168.31.1
          192.168.32.1    192.168.33.1



R2#show mpls ldp neighbor

    Peer LDP Ident: 192.168.10.1:0; Local LDP Ident 192.168.20.1:0

        TCP connection: 192.168.10.1.646 - 192.168.20.1.41723

        State: Oper; Msgs sent/rcvd: 189/192; Downstream

        Up time: 02:24:22

        LDP discovery sources:

          Serial4/0, Src IP addr: 1.1.1.1

        Addresses bound to peer LDP Ident:

          1.1.1.1         3.3.3.2         192.168.10.1    192.168.11.1

          192.168.12.1    192.168.13.1

    Peer LDP Ident: 192.168.30.1:0; Local LDP Ident 192.168.20.1:0

        TCP connection: 192.168.30.1.64637 - 192.168.20.1.646

        State: Oper; Msgs sent/rcvd: 187/189; Downstream

        Up time: 02:22:00

        LDP discovery sources:

          Serial4/1, Src IP addr: 2.2.2.2

        Addresses bound to peer LDP Ident:

          2.2.2.2         3.3.3.1         192.168.30.1    192.168.31.1

          192.168.32.1    192.168.33.1

 

R3#show mpls ldp neighbor

    Peer LDP Ident: 192.168.20.1:0; Local LDP Ident 192.168.30.1:0

        TCP connection: 192.168.20.1.646 - 192.168.30.1.64637

        State: Oper; Msgs sent/rcvd: 190/188; Downstream

        Up time: 02:22:52

        LDP discovery sources:

          Serial4/1, Src IP addr: 2.2.2.1

        Addresses bound to peer LDP Ident:

          20.1.1.1        1.1.1.2         2.2.2.1         192.168.20.1

          192.168.21.1    192.168.22.1    192.168.23.1

    Peer LDP Ident: 192.168.10.1:0; Local LDP Ident 192.168.30.1:0

        TCP connection: 192.168.10.1.646 - 192.168.30.1.27403

        State: Oper; Msgs sent/rcvd: 187/189; Downstream

        Up time: 02:22:33

        LDP discovery sources:

          Serial4/2, Src IP addr: 3.3.3.2

        Addresses bound to peer LDP Ident:

          1.1.1.1         3.3.3.2         192.168.10.1    192.168.11.1

          192.168.12.1    192.168.13.1

 

R(config)#ip vrf A-1

R1(config-vrf)#rd 500:1

R1(config-vrf)#route-target import 500:1

R1(config-vrf)#route-target export 500:1

R1(config-vrf)#exit

R3(config)#ip vrf A-2

R3(config-vrf)#rd 500:1

R3(config-vrf)#route-target both 500:1

R3(config-vrf)#exit

 

R1(config)#interface fastethernet 0/0

R1(config-if)#ip vrf forwarding A-1

 

% Interface FastEthernet0/0 IPv4 disabled and address(es) removed due to enabling VRF A-1



R1(config-if)#ip address 10.1.1.1 255.0.0.0

R1(config-if)#no shutdown

R1(config-if)#exit

 

R3(config)#interface fastethernet 0/0

R3(config-if)#ip vrf forwarding A-2

 

% Interface FastEthernet0/0 IPv4 disabled and address(es) removed due to enabling VRF A-2

 

R3(config-if)#ip address 30.1.1.1 255.0.0.0

R3(config-if)#exit


R1#show run | section vrf
ip vrf A-1
 rd 500:1
 route-target export 500:1
 route-target import 500:1
 ip vrf forwarding A-1

 

R3#show run | section vrf

ip vrf A-2

 rd 500:1

 route-target export 500:1

 route-target import 500:1

 ip vrf forwarding A-2

 

R1(config)#interface loopback 0
R1(config-if)# ip ospf network point-to-point
R1(config-if)#end

 

R3(config)#interface loopback 0
R3(config-if)# ip ospf network point-to-point
R3(config-if)#end


R4(config)#router ospf 1
R4(config-router)#network 192.168.40.0 255.0.0.0 area 0
R4(config-router)#network 30.0.0.0 0.255.255.255 area 0
R4(config-router)#end



R1(config)#router ospf 11 vrf A-1

R1(config-router)#network 10.0.0.0 0.255.255.255 area 0

R1(config-router)#exit

 

*Mar 20 00:18:20.379: %OSPF-5-ADJCHG: Process 11, Nbr 192.168.40.1 on FastEthernet0/0 from LOADING to FULL, Loading Done

 

 

 

R1#show ip ospf 1 neighbor

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

192.168.33.1      0   FULL/  -        00:00:33    3.3.3.1         Serial4/2

192.168.23.1      0   FULL/  -        00:00:38    1.1.1.2         Serial4/0

R1#show ip ospf 11 neighbor

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

192.168.40.1      1   FULL/DR         00:00:33    10.1.1.2        FastEthernet0/0



 

 

 

R1#ping vrf A-1 192.168.40.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/46/100 ms



R1(config)#router bgp 6123
R1(config-router)#no bgp default ipv4-unicast
R1(config-router)#neighbor 192.168.30.1 remote-as 6123
R1(config-router)#neighbor 192.168.30.1 update-source loopback 0
R1(config-router)#address-family vpnv4 unicast
R1(config-router-af)#neighbor 192.168.30.1 activate
R1(config-router-af)#neighbor 192.168.30.1 send-community extended
R1(config-router-af)#neighbor 192.168.30.1 next-hop-self
R1(config-router-af)#end

 


R3(config)#router bgp 6123
R3(config-router)#no bgp default ipv4-unicast
R3(config-router)#neighbor 192.168.10.1 remote-as 6123
R3(config-router)#neighbor 192.168.10.1 update-source loopback 0
R3(config-router)#address-family vpnv4 unicast
R3(config-router-af)#neighbor 192.168.10.1 activate
R3(config-router-af)#neighbor 192.168.10.1 send-community extended
R3(config-router-af)#neighbor 192.168.10.1 next-hop-self
R3(config-router-af)#end

 

R4(config)#router bgp 5500

R4(config-router)#neighbor 30.1.1.1 remote-as 6123

R4(config-router)#network 192.168.40.0 mask 255.255.255.0

R4(config-router)#network 30.0.0.0 mask 255.0.0.0

R4(config-router)#no auto-summary

R4(config-router)#no synchronization

R4(config-router)#exit

 

 

R5(config)#router bgp 5500

R5(config-router)#neighbor 10.1.1.1 remote-as 6123

R5(config-router)#no auto-summary

R5(config-router)#no synchronization

R5(config-router)#network 192.168.50.1 mask 255.255.255.255

R5(config-router)#network 10.0.0.0 mask 255.0.0.0

R5(config-router)#network 192.168.50.0 mask 255.255.255.0

R5(config-router)#exit



R3#show ip bgp vpnv4 all summary

BGP router identifier 192.168.33.1, local AS number 6123

BGP table version is 8, main routing table version 8

4 network entries using 624 bytes of memory

5 path entries using 400 bytes of memory

5/4 BGP path/bestpath attribute entries using 720 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

BGP using 1792 total bytes of memory

BGP activity 4/0 prefixes, 5/0 paths, scan interval 60 secs

 

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

30.1.1.2        4         5500      89      89        8    0    0 01:16:41        2

192.168.10.1    4         6123      79      79        8    0    0 01:07:23        2

 

R3#show ip bgp vpnv4 all

BGP table version is 8, local router ID is 192.168.33.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

 

     Network          Next Hop            Metric LocPrf Weight Path

Route Distinguisher: 500:1 (default for vrf A-2)

 *>i 10.0.0.0         192.168.10.1             0    100      0 i

 *>  30.0.0.0         0.0.0.0                  0         32768 ?

 *                    30.1.1.2                 0             0 5500 i

 *>  192.168.40.0     30.1.1.2                 0             0 5500 i

 *>i 192.168.50.0     192.168.10.1             0    100      0 5500 i


R3#show ip route vrf A-2

 

Routing Table: A-2

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, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

B     10.0.0.0/8 [200/0] via 192.168.10.1, 01:08:49

      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C        30.0.0.0/8 is directly connected, FastEthernet0/0

L        30.1.1.1/32 is directly connected, FastEthernet0/0

B     192.168.40.0/24 [20/0] via 30.1.1.2, 01:18:07

B     192.168.50.0/24 [200/0] via 192.168.10.1, 01:08:49

 

R1#show ip bgp vpnv4 all summary

BGP router identifier 192.168.13.1, local AS number 6123

BGP table version is 7, main routing table version 7

4 network entries using 624 bytes of memory

5 path entries using 400 bytes of memory

5/4 BGP path/bestpath attribute entries using 720 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

BGP using 1792 total bytes of memory

BGP activity 4/0 prefixes, 5/0 paths, scan interval 60 secs

 

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

10.1.1.2        4         5500     101     104        7    0    0 01:27:49        2

192.168.30.1    4         6123      82      82        7    0    0 01:09:36        2

 

 

R1#show ip bgp vpnv4 all

BGP table version is 7, local router ID is 192.168.13.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found



     Network          Next Hop            Metric LocPrf Weight Path

Route Distinguisher: 500:1 (default for vrf A-1)

 *   10.0.0.0         10.1.1.2                 0             0 5500 i

 *>                   0.0.0.0                  0         32768 i

 *>i 30.0.0.0         192.168.30.1             0    100      0 ?

 *>i 192.168.40.0     192.168.30.1             0    100      0 5500 i

 *>  192.168.50.0     10.1.1.2                 0             0 5500 i

 

R1#show ip route vrf A-1

 

Routing Table: A-1

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, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C        10.0.0.0/8 is directly connected, FastEthernet0/0

L        10.1.1.1/32 is directly connected, FastEthernet0/0

B     30.0.0.0/8 [200/0] via 192.168.30.1, 01:10:29

B     192.168.40.0/24 [200/0] via 192.168.30.1, 01:10:29

B     192.168.50.0/24 [20/0] via 10.1.1.2, 01:28:42

 

 

R1#ping VRF A-1 192.168.40.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.40.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 124/151/208 ms


R1#ping VRF A-1 192.168.50.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/65/84 ms

 


R1#show ip bgp VPNV4 ALL

BGP table version is 7, local router ID is 192.168.13.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,

              x best-external, a additional-path, c RIB-compressed,

Origin codes: i - IGP, e - EGP, ? - incomplete

RPKI validation codes: V valid, I invalid, N Not found

 

     Network          Next Hop            Metric LocPrf Weight Path

Route Distinguisher: 500:1 (default for vrf A-1)

 *   10.0.0.0         10.1.1.2                 0             0 5500 i

 *>                   0.0.0.0                  0         32768 i

 *>i 30.0.0.0         192.168.30.1             0    100      0 ?

 *>i 192.168.40.0     192.168.30.1             0    100      0 5500 i

 *>  192.168.50.0     10.1.1.2                 0             0 5500 i

 

R1#show ip bgp VPNV4 ALL SUmmary

BGP router identifier 192.168.13.1, local AS number 6123

BGP table version is 7, main routing table version 7

4 network entries using 624 bytes of memory

5 path entries using 400 bytes of memory

5/4 BGP path/bestpath attribute entries using 720 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

BGP using 1792 total bytes of memory

BGP activity 4/0 prefixes, 5/0 paths, scan interval 60 secs

 

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

10.1.1.2        4         5500     104     107        7    0    0 01:30:43        2

192.168.30.1    4         6123      85      85        7    0    0 01:12:31        2



 

 

R5#SHOW 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, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C        10.0.0.0/8 is directly connected, FastEthernet0/0

L        10.1.1.2/32 is directly connected, FastEthernet0/0

B     30.0.0.0/8 [20/0] via 10.1.1.1, 01:13:19

      192.168.50.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.50.0/24 is directly connected, Loopback0

L        192.168.50.1/32 is directly connected, Loopback0

(from the above we see 192.168.40.1 network is not install in router 5 because of loop prevention )

 

 

R1(config)#router bgp 6123

R1(config-router)#address-family ipv4 vrf A-1

R1(config-router-af)#neighbor 10.1.1.2 as-override

R1(config-router-af)#exit

 

 

R3(config)#router bgp 6123

R3(config-router)#address-family ipv4 vrf A-2

R3(config-router-af)#neighbor 30.1.1.2 as-override

R3(config-router-af)#exit

 

 

R5#SHOW 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, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C        10.0.0.0/8 is directly connected, FastEthernet0/0

L        10.1.1.2/32 is directly connected, FastEthernet0/0

B     30.0.0.0/8 [20/0] via 10.1.1.1, 01:16:48

B     192.168.40.0/24 [20/0] via 10.1.1.1, 00:01:27

      192.168.50.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.50.0/24 is directly connected, Loopback0

L        192.168.50.1/32 is directly connected, Loopback0

 

 

R4#show 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, l - LISP

       + - replicated route, % - next hop override



Gateway of last resort is not set

 

B     10.0.0.0/8 [20/0] via 30.1.1.1, 01:17:11

      30.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C        30.0.0.0/8 is directly connected, FastEthernet0/0

L        30.1.1.2/32 is directly connected, FastEthernet0/0

      192.168.40.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.40.0/24 is directly connected, Loopback0

L        192.168.40.1/32 is directly connected, Loopback0

B     192.168.50.0/24 [20/0] via 30.1.1.1, 00:00:26


(after configuring OVERRIDE router 4 and 5 successfully installed routes in their table)