Friday, April 12, 2019

Configuring Dynamic Routing and Route Redistribution Between CE and PE Routers

VPNv4 Route Propagation in the MPLS VPN Network

The VRF separates the customer routes on the PE routers, but how are the prefixes transported across the service provider network? Because, potentially, numerous routes-perhaps hundred of thousands -could be transported, BGP is the ideal candidate because it is a proven and stable routing protocol for carrying that many routes. Just realize that BGP is the standard routing protocol for carrying the complete Internet routing table. Because the customer VPN routes are made unique by adding the RD to each IPv4 route-turning them into vpnv4 routes-all customer routes can safely be transported across the MPLS VPN network.

The PE router receives IPv4 routes from the CE router through an Interior Gateway Protocol (IGP) or external BGP (eBGP). These IPv4 routes from the VPN site are put into the VRF routing table. Which VRF is used depends on the VRF that is configured on the interface on the PE router toward the CE router. These routes are appended with the RD that is assigned to that VRF. Thus, they become vpnv4 routes, which are then put into MP-BGP. BGP takes care of distributing these vpnv4 routes to all PE routers in the MPLS VPN network. On the PE routers, the vpnv4 routes are stripped of the RDs and put into the VRF routing table as IPv4 routes. Whether the vpnv4 route, after stripping off the RD, is put into the VRF depends on whether the RTs allow the import into the VRF. These IPv4 routes are then advertised to the CE router through an IGP or eBGP that is running between the PE and CE router.

Because the service provider that is running the MPLS VPN network runs BGP in one autonomous system, iBGP is running between the PE routers. The propagation from eBGP-running between the PE and CE router-to MP-iBGP in the MPLS VPN network and vice versa is automatic and needs no extra configuration. However, the redistribution of MP-iBGP into the IGP that is running between the PE and CE router is not automatic. You need to configure mutual redistribution between MP-iBGP and the IGP.


1. Configure OSPF and EIGRP dynamic routing protocols on R1-PE1.
R1-PE1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1-PE1(config)#router ospf 2 ?
  vrf  VPN Routing/Forwarding Instance
  <cr>

R1-PE1(config)#router ospf 2 vrf CUSTA
R1-PE1(config-router)#?
Router configuration commands:
  area                   OSPF area parameters
  auto-cost              Calculate OSPF interface cost according to bandwidth
  bfd                    BFD configuration commands
  capability             Enable specific OSPF feature
  compatible             OSPF compatibility list
  default                Set a command to its defaults
  default-information    Control distribution of default information
  default-metric         Set metric of redistributed routes
  discard-route          Enable or disable discard-route installation
  distance               Define an administrative distance
  distribute-list        Filter networks in routing updates
  domain-id              OSPF domain-id
  domain-tag             OSPF domain-tag
  event-log              OSPF Event Logging
  exit                   Exit from routing protocol configuration mode
  help                   Description of the interactive help system
  ignore                 Do not complain about specific event
  interface-id           Source of the interface ID
  ispf                   Enable incremental SPF computation
  limit                  Limit a specific OSPF feature
  local-rib-criteria     Enable or disable usage of local RIB as route criteria
  log-adjacency-changes  Log changes in adjacency state
  max-lsa                maximum number of LSAs OSPF process will receive
  max-metric             Set maximum metric
  maximum-paths          Forward packets over multiple paths
  mpls                   Configure MPLS routing protocol parameters
  neighbor               Specify a neighbor router
  network                Enable routing on an IP network
  no                     Negate a command or set its defaults
  nsf                    Non-stop forwarding
  passive-interface      Suppress routing updates on an interface
  prefix-suppression     OSPF prefix suppression
  priority               OSPF topology priority
  queue-depth            OSPF Hello/Router process queue depth
  redistribute           Redistribute information from another routing protocol
  router-id              router-id for this OSPF process
  shutdown               Shutdown the OSPF protocol under the current instance
  snmp                   Modify snmp parameters
  summary-address        Configure IP address summaries
  timers                 Adjust routing timers
  traffic-share          How to compute traffic share over alternate paths
  ttl-security           TTL security check

R1-PE1(config-router)#network 172.16.1.0 0.0.0.3 area 0
R1-PE1(config-router)#exit
R1-PE1(config)#router eigrp 100
R1-PE1(config-router)#?
Router configuration commands:
  address-family       Enter Address Family command mode
  auto-summary         Enable automatic network number summarization
  bfd                  BFD configuration commands
  default              Set a command to its defaults
  default-information  Control distribution of default information
  default-metric       Set metric of redistributed routes
  distance             Define an administrative distance
  distribute-list      Filter entries in eigrp updates
  eigrp                EIGRP specific commands
  exit                 Exit from routing protocol configuration mode
  maximum-paths        Forward packets over multiple paths
  metric               Modify metrics and parameters for advertisement
  neighbor             Specify a neighbor router
  network              Enable routing on an IP network
  no                   Negate a command or set its defaults
  offset-list          Add or subtract offset from EIGRP metrics
  passive-interface    Suppress routing updates on an interface
  redistribute         Redistribute IPv4 routes from another routing protocol
  shutdown             Shutdown this instance of EIGRP
  summary-metric       Specify summary to apply metric/filtering
  timers               Adjust routing timers
  traffic-share        How to compute traffic share over alternate paths
  variance             Control load balancing variance

R1-PE1(config-router)#address-family ?
  ipv4  Address Family IPv4

R1-PE1(config-router)#address-family ipv4 ?
  unicast  Address Family Unicast
  vrf      Specify a specific virtual routing/forwarding instance

R1-PE1(config-router)#address-family ipv4 vrf CUSTB ?
  autonomous-system  Specify Address-Family Autonomous System Number
  <cr>

R1-PE1(config-router)#address-family ipv4 vrf CUSTB autonomous-system ?
  <1-65535>  Autonomous System

R1-PE1(config-router)#address-family ipv4 vrf CUSTB autonomous-system 100
R1-PE1(config-router-af)#?
Address Family configuration commands:
  auto-summary         Enable automatic network number summarization
  bfd                  BFD configuration commands
  default              Set a command to its defaults
  default-information  Control distribution of default information
  default-metric       Set metric of redistributed routes
  distance             Define an administrative distance
  distribute-list      Filter entries in eigrp updates
  eigrp                EIGRP specific commands
  exit-address-family  Exit Address Family configuration mode
  help                 Description of the interactive help system
  maximum-paths        Forward packets over multiple paths
  maximum-prefix       Maximum number of prefixes acceptable in aggregate
  metric               Modify metrics and parameters for advertisement
  neighbor             Specify a neighbor router
  network              Enable routing on an IP network
  no                   Negate a command or set its defaults
  offset-list          Add or subtract offset from EIGRP metrics
  passive-interface    Suppress routing updates on an interface
  redistribute         Redistribute IPv4 routes from another routing protocol
  shutdown             Shutdown address family
  summary-metric       Specify summary to apply metric/filtering
  timers               Adjust routing timers
  traffic-share        How to compute traffic share over alternate paths
  variance             Control load balancing variance

R1-PE1(config-router-af)#network 172.16.1.0 0.0.0.255
R1-PE1(config-router-af)#end
R1-PE1#


2. Configure RIPv2 and BGP dynamic routing protocols on R5-PE2.
R5-PE2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R5-PE2(config)#router rip
R5-PE2(config-router)#?
Router configuration commands:
  address-family          Enter Address Family command mode
  auto-summary            Enable automatic network number summarization
  default                 Set a command to its defaults
  default-information     Control distribution of default information
  default-metric          Set metric of redistributed routes
  distance                Define an administrative distance
  distribute-list         Filter networks in routing updates
  exit                    Exit from routing protocol configuration mode
  flash-update-threshold  Specify flash update threshold in second
  help                    Description of the interactive help system
  input-queue             Specify input queue depth
  maximum-paths           Forward packets over multiple paths
  neighbor                Specify a neighbor router
  network                 Enable routing on an IP network
  no                      Negate a command or set its defaults
  offset-list             Add or subtract offset from RIP metrics
  output-delay            Interpacket delay for RIP updates
  passive-interface       Suppress routing updates on an interface
  redistribute            Redistribute information from another routing
                          protocol
  timers                  Adjust routing timers
  traffic-share           How to compute traffic share over alternate paths
  validate-update-source  Perform sanity checks against source address of
                          routing updates
  version                 Set routing protocol version

R5-PE2(config-router)#version ?
  <1-2>  rip version 1 or 2

R5-PE2(config-router)#version 2
R5-PE2(config-router)#address-family ?
  ipv4  Address family

R5-PE2(config-router)#address-family ipv4 ?
  unicast  Address Family Modifier
  vrf      Specify parameters for a VPN Routing/Forwarding instance
  <cr>

R5-PE2(config-router)#address-family ipv4 vrf ?
  WORD  VPN Routing/Forwarding instance name

R5-PE2(config-router)#address-family ipv4 vrf CUSTA
R5-PE2(config-router-af)#?
Router Address Family configuration commands:
  auto-summary            Enable automatic network number summarization
  default                 Set a command to its defaults
  default-information     Control distribution of default information
  default-metric          Set metric of redistributed routes
  distance                Define an administrative distance
  distribute-list         Filter networks in routing updates
  exit-address-family     Exit from Address Family configuration mode
  help                    Description of the interactive help system
  maximum-paths           Forward packets over multiple paths
  neighbor                Specify a neighbor router
  network                 Enable routing on an IP network
  no                      Negate a command or set its defaults
  offset-list             Add or subtract offset from RIP metrics
  redistribute            Redistribute information from another routing
                          protocol
  timers                  Adjust routing timers
  traffic-share           How to compute traffic share over alternate paths
  validate-update-source  Perform sanity checks against source address of
                          routing updates
  version                 Set routing protocol version

R5-PE2(config-router-af)#network 192.168.1.0
R5-PE2(config-router-af)#no auto-summary
R5-PE2(config-router-af)#exit
R5-PE2(config-router)#exit
R5-PE2(config)#router bgp 65000
R5-PE2(config-router)#?
Router configuration commands:
  address-family        Enter Address Family command mode
  aggregate-address     Configure BGP aggregate entries
  auto-summary          Enable automatic network number summarization
  bgp                   BGP specific commands
  default               Set a command to its defaults
  default-information   Control distribution of default information
  default-metric        Set metric of redistributed routes
  distance              Define an administrative distance
  distribute-list       Filter networks in routing updates
  exit                  Exit from routing protocol configuration mode
  help                  Description of the interactive help system
  maximum-paths         Forward packets over multiple paths
  neighbor              Specify a neighbor router
  network               Specify a network to announce via BGP
  no                    Negate a command or set its defaults
  redistribute          Redistribute information from another routing protocol
  route-server-context  Enter route server context command mode
  scope                 Enter scope command mode
  snmp                  Modify snmp parameters
  synchronization       Perform IGP synchronization
  table-map             Map external entry attributes into routing table
  template              Enter template command mode
  timers                Adjust routing timers

R5-PE2(config-router)#address-family ?
  ipv4      Address family
  ipv6      Address family
  l2vpn     Address family
  nsap      Address family
  rtfilter  Address family
  vpnv4     Address family
  vpnv6     Address family

R5-PE2(config-router)#address-family ipv4 ?
  mdt        Address Family modifier
  multicast  Address Family modifier
  mvpn       Address Family modifier
  unicast    Address Family modifier
  vrf        Specify parameters for a VPN Routing/Forwarding instance
  <cr>

R5-PE2(config-router)#address-family ipv4 vrf CUSTB
R5-PE2(config-router-af)#?
Router Address Family configuration commands:
  aggregate-address    Configure BGP aggregate entries
  bgp                  BGP specific commands
  default              Set a command to its defaults
  default-information  Control distribution of default information
  default-metric       Set metric of redistributed routes
  distance             Define an administrative distance
  distribute-list      Filter networks in routing updates
  exit-address-family  Exit from Address Family configuration mode
  help                 Description of the interactive help system
  import               Configure path import
  maximum-paths        Forward packets over multiple paths
  neighbor             Specify a neighbor router
  network              Specify a network to announce via BGP
  no                   Negate a command or set its defaults
  redistribute         Redistribute information from another routing protocol
  snmp                 Modify snmp parameters
  synchronization      Perform IGP synchronization
  table-map            Map external entry attributes into routing table

R5-PE2(config-router-af)#neighbor 192.168.1.2 remote-as 65001       // EBGP PEERING WITH CUSTB-SITE2
R5-PE2(config-router-af)#exit
R5-PE2(config-router)#address-family vpnv4        // IBGP PEERING WITH R1-PE1
R5-PE2(config-router-af)#neighbor 10.1.1.1 ?
  activate                Enable the Address Family for this Neighbor
  advertise               Advertise to this neighbor
  advertisement-interval  Minimum interval between sending BGP routing updates
  allowas-in              Accept as-path with my AS present in it
  capability              Advertise capability to the peer
  distribute-list         Filter updates to/from this neighbor
  dmzlink-bw              Propagate the DMZ link bandwidth
  filter-list             Establish BGP filters
  inherit                 Inherit a template
  inter-as-hybrid         Inter AS Hybrid mode
  maximum-prefix          Maximum number of prefixes accepted from this peer
  next-hop-self           Disable the next hop calculation for this neighbor
  next-hop-unchanged      Propagate next hop unchanged for iBGP paths to this
                          neighbor
  prefix-list             Filter updates to/from this neighbor
  remove-private-as       Remove private AS number from outbound updates
  route-map               Apply route map to neighbor
  route-reflector-client  Configure a neighbor as Route Reflector client
  send-community          Send Community attribute to this neighbor
  slow-peer               Configure slow-peer
  soft-reconfiguration    Per neighbor soft reconfiguration
  soo                     Site-of-Origin extended community
  unsuppress-map          Route-map to selectively unsuppress suppressed routes
  weight                  Set default weight for routes from this neighbor

R5-PE2(config-router-af)#neighbor 10.1.1.1 next-hop-self
R5-PE2(config-router-af)#end
R5-PE2#
*Nov 26 14:49:14.133: %SYS-5-CONFIG_I: Configured from console by console
R5-PE2#clear ip bgp 10.1.1.1      // CLEAR BGP PEER TO REFLECT CHANGES
R5-PE2#
*Nov 26 14:49:32.405: %BGP-5-ADJCHANGE: neighbor 10.1.1.1 Down User reset
*Nov 26 14:49:32.405: %BGP_SESSION-5-ADJCHANGE: neighbor 10.1.1.1 VPNv4 Unicast topology base removed from session  User reset
*Nov 26 14:49:32.409: %BGP_SESSION-5-ADJCHANGE: neighbor 10.1.1.1 IPv4 Unicast topology base removed from session  User reset
*Nov 26 14:49:32.869: %BGP-5-ADJCHANGE: neighbor 10.1.1.1 Up


3. Configure interface IP address and dynamic routing protocol on CE Router (no VRF).
R6#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R6(config)#hostname CUSTA-SITE1
CUSTA-SITE1(config)#interface f1/0
CUSTA-SITE1(config-if)#ip address 172.16.1.2 255.255.255.252      // IP ADDRESS IN GLOBAL ROUTING TABLE; NO NEED TO CONFIGURE VRF
CUSTA-SITE1(config-if)#no shutdown
CUSTA-SITE1(config-if)#
*Nov 26 00:35:48.304: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to up
*Nov 26 00:35:49.304: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
CUSTA-SITE1(config-if)#do ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/19/28 ms
CUSTA-SITE1(config-if)#
CUSTA-SITE1(config-if)#interface loopback1
CUSTA-SITE1(config-if)#
*Nov 26 00:36:04.696: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
CUSTA-SITE1(config-if)#ip address 172.16.1.99 255.255.255.255
CUSTA-SITE1(config-if)#exit
CUSTA-SITE1(config)#router ospf 2      // NO NEED TO CONFIGURE UNDER VRF
CUSTA-SITE1(config-router)#network 172.16.1.0 0.0.0.255 area 0
CUSTA-SITE1(config-router)#
*Nov 26 00:37:17.100: %OSPF-5-ADJCHG: Process 2, Nbr 172.16.1.1 on FastEthernet1/0 from LOADING to FULL, Loading Done
CUSTA-SITE1(config-router)#end
CUSTA-SITE1#
*Nov 26 00:37:33.388: %SYS-5-CONFIG_I: Configured from console by console
CUSTA-SITE1#
CUSTA-SITE1#show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
172.16.1.1        1   FULL/DR         00:00:36    172.16.1.1      FastEthernet1/0


R1-PE1#
*Nov 26 14:56:27.681: %OSPF-5-ADJCHG: Process 2, Nbr 172.16.1.99 on FastEthernet1/0 from LOADING to FULL, Loading Done
R1-PE1#show ip route vrf CUSTA

Routing Table: CUSTA
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

      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C        172.16.1.0/30 is directly connected, FastEthernet1/0
L        172.16.1.1/32 is directly connected, FastEthernet1/0
O        172.16.1.99/32 [110/2] via 172.16.1.2, 00:03:00, FastEthernet1/0


R7#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R7(config)#hostname CUSTB-SITE-1
CUSTB-SITE-1(config)#host CUSTB-SITE1
CUSTB-SITE1(config)#interface f1/1
CUSTB-SITE1(config-if)#ip address 172.16.1.2 255.255.255.252
CUSTB-SITE1(config-if)#no shutdown
CUSTB-SITE1(config-if)#
*Nov 26 00:41:56.068: %LINK-3-UPDOWN: Interface FastEthernet1/1, changed state to up
*Nov 26 00:41:57.068: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to up
CUSTB-SITE1(config-if)#do ping 172.16.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 12/34/72 ms
CUSTB-SITE1(config-if)#
CUSTB-SITE1(config-if)#exit
CUSTB-SITE1(config)#interface loopback1
CUSTB-SITE1(config-if)#
*Nov 26 00:42:32.268: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
CUSTB-SITE1(config-if)#ip address 172.16.1.100 255.255.255.255
CUSTB-SITE1(config-if)#exit
CUSTB-SITE1(config)#router eigrp 100
CUSTB-SITE1(config-router)#no auto-summary
CUSTB-SITE1(config-router)#network 172.16.1.0 0.0.0.255
*Nov 26 00:43:21.440: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 172.16.1.1 (FastEthernet1/1) is up: new adjacency
CUSTB-SITE1(config-router)#end
CUSTB-SITE1#
*Nov 26 00:43:31.856: %SYS-5-CONFIG_I: Configured from console by console
CUSTB-SITE1#
CUSTB-SITE1#show ip eigrp neighbor
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   172.16.1.1              Fa1/1                    12 00:00:16   25   150  0  3


R1-PE1#
*Nov 26 15:02:42.348: %DUAL-5-NBRCHANGE: EIGRP-IPv4 100: Neighbor 172.16.1.2 (FastEthernet1/1) is up: new adjacency
R1-PE1#
R1-PE1#show ip route vrf CUSTB

Routing Table: CUSTB
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

      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C        172.16.1.0/30 is directly connected, FastEthernet1/1
L        172.16.1.1/32 is directly connected, FastEthernet1/1
D        172.16.1.100/32 [90/156160] via 172.16.1.2, 00:02:47, FastEthernet1/1


R8#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R8(config)#hostname CUSTA-SITE2
CUSTA-SITE2(config)#interface f1/0
CUSTA-SITE2(config-if)#ip address 192.168.1.2 255.255.255.252
CUSTA-SITE2(config-if)#no shutdown
CUSTA-SITE2(config-if)#
*Nov 26 00:48:21.616: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to up
*Nov 26 00:48:22.616: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
CUSTA-SITE2(config-if)#do ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/16/28 ms
CUSTA-SITE2(config-if)#interface loopback1
CUSTA-SITE2(config-if)#
*Nov 26 00:48:38.236: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
CUSTA-SITE2(config-if)#ip address 192.168.1.99 255.255.255.255
CUSTA-SITE2(config-if)#exit
CUSTA-SITE2(config)#router rip
CUSTA-SITE2(config-router)#version 2
CUSTA-SITE2(config-router)#network 192.168.1.0
CUSTA-SITE2(config-router)#end
CUSTA-SITE2#
*Nov 26 00:49:20.204: %SYS-5-CONFIG_I: Configured from console by console
CUSTA-SITE2#


R5-PE2#show ip route vrf CUSTA

Routing Table: CUSTA
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

      192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
C        192.168.1.0/30 is directly connected, FastEthernet1/0
L        192.168.1.1/32 is directly connected, FastEthernet1/0
R        192.168.1.99/32 [120/1] via 192.168.1.2, 00:00:03, FastEthernet1/0


R9#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R9(config)#hostname CUSTB-SITE2
CUSTB-SITE2(config)#interface f1/1
CUSTB-SITE2(config-if)#ip address 192.168.1.2 255.255.255.252
CUSTB-SITE2(config-if)#no shutdown
CUSTB-SITE2(config-if)#
*Nov 26 00:53:58.712: %LINK-3-UPDOWN: Interface FastEthernet1/1, changed state to up
CUSTB-SITE2(config-if)#
*Nov 26 00:53:59.712: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/1, changed state to up
CUSTB-SITE2(config-if)#do ping 192.168.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/15/24 ms
CUSTB-SITE2(config-if)#
CUSTB-SITE2(config-if)#interface loopback1
*Nov 26 00:54:13.668: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
CUSTB-SITE2(config-if)#ip address 192.168.1.100 255.255.255.255
CUSTB-SITE2(config-if)#exit
CUSTB-SITE2(config)#router bgp 65001
CUSTB-SITE2(config-router)#neighbor 192.168.1.1 remote-as 65000
CUSTB-SITE2(config-router)#
*Nov 26 00:54:51.588: %BGP-5-ADJCHANGE: neighbor 192.168.1.1 Up
CUSTB-SITE2(config-router)#redistribute connected
CUSTB-SITE2(config-router)#end
CUSTB-SITE2#


R5-PE2#
*Nov 26 15:14:51.480: %BGP-5-ADJCHANGE: neighbor 192.168.1.2 vpn vrf CUSTB Up
R5-PE2#
R5-PE2#show ip route vrf CUSTB

Routing Table: CUSTB
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

      192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
C        192.168.1.0/30 is directly connected, FastEthernet1/1
L        192.168.1.1/32 is directly connected, FastEthernet1/1
B        192.168.1.100/32 [20/0] via 192.168.1.2, 00:01:22


4. Configure Mutual Route Redistribution between PE Routers Dynamic Routing Protocol (OSPF, EIGRP, RIPv2) and BGP (vpnv4).

R1-PE1#show run | sec router bgp
router bgp 65000
 bgp log-neighbor-changes
 neighbor 10.5.5.5 remote-as 65000
 neighbor 10.5.5.5 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.5.5.5 activate
  neighbor 10.5.5.5 send-community extended
 exit-address-family


R1-PE1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1-PE1(config)#router bgp 65000
R1-PE1(config-router)#address-family ipv4 vrf CUSTA
R1-PE1(config-router-af)#?
Router Address Family configuration commands:
  aggregate-address    Configure BGP aggregate entries
  bgp                  BGP specific commands
  default              Set a command to its defaults
  default-information  Control distribution of default information
  default-metric       Set metric of redistributed routes
  distance             Define an administrative distance
  distribute-list      Filter networks in routing updates
  exit-address-family  Exit from Address Family configuration mode
  help                 Description of the interactive help system
  import               Configure path import
  maximum-paths        Forward packets over multiple paths
  neighbor             Specify a neighbor router
  network              Specify a network to announce via BGP
  no                   Negate a command or set its defaults
  redistribute         Redistribute information from another routing protocol
  snmp                 Modify snmp parameters
  synchronization      Perform IGP synchronization
  table-map            Map external entry attributes into routing table

R1-PE1(config-router-af)#redistribute ?
  bgp        Border Gateway Protocol (BGP)
  connected  Connected
  eigrp      Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis       ISO IS-IS
  lisp       Locator ID Separation Protocol (LISP)
  mobile     Mobile routes
  odr        On Demand stub Routes
  ospf       Open Shortest Path First (OSPF)
  ospfv3     OSPFv3
  rip        Routing Information Protocol (RIP)
  static     Static routes

R1-PE1(config-router-af)#redistribute ospf ? 
  <1-65535>  Process ID

R1-PE1(config-router-af)#redistribute ospf 2 ?
  match      Redistribution of OSPF routes
  metric     Metric for redistributed routes
  route-map  Route map reference
  vrf        VPN Routing/Forwarding Instance
  <cr>

R1-PE1(config-router-af)#redistribute ospf 2 vrf ?
  WORD  VPN Routing/Forwarding Instance (VRF) name

R1-PE1(config-router-af)#redistribute ospf 2 vrf CUSTA      // EXPORT ROUTES FROM OSPF/VRF INTO BGP
R1-PE1(config-router-af)#end
R1-PE1#

R1-PE1#show ip bgp ?
  A.B.C.D            Network in the BGP routing table to display
  A.B.C.D/nn         IP prefix <network>/<length>, e.g., 35.0.0.0/8
  all                All address families
  cidr-only          Display only routes with non-natural netmasks
  community          Display routes matching the communities
  community-list     Display routes matching the community-list
  dampening          Display detailed information about dampening
  extcommunity-list  Display routes matching the extcommunity-list
  filter-list        Display routes conforming to the filter-list
  import             Display route topology import / export activity
  inconsistency      Display all inconsistent paths
  inconsistent-as    Display only routes with inconsistent origin ASs
  injected-paths     Display all injected paths
  ipv4               Address family
  ipv6               Address family
  l2vpn              Address family
  labels             Display Labels for IPv4 NLRI specific information
  neighbors          Detailed information on TCP and BGP neighbor connections
  nexthops           Nexthop address table
  nsap               Address family
  oer-paths          Display all oer controlled paths
  paths              Path information
  peer-group         Display information on peer-groups
  pending-prefixes   Display prefixes pending deletion
  prefix-list        Display routes matching the prefix-list
  quote-regexp       Display routes matching the AS path "regular expression"
  regexp             Display routes matching the AS path regular expression
  replication        Display replication status of update-group(s)
  rib-failure        Display bgp routes that failed to install in the routing
                     table (RIB)
  route-map          Display routes matching the route-map
  route-server       Route server information
  rpki               Display RPKI Neighbor Cache
  rtfilter           Address family
  summary            Summary of BGP neighbor status
  template           Display peer-policy/peer-session templates
  topology           Routing topology instance
  update-group       Display information on update-groups
  update-sources     Update source interface table
  va                 Display virtual aggregation prefixes
  version            Display prefixes with matching version numbers
  vpnv4              Address family
  vpnv6              Address family
  |                  Output modifiers
  <cr>
         
R1-PE1#show ip bgp vpnv4 ?
  all  Display information about all VPN NLRIs
  rd   Display information for a route distinguisher
  vrf  Display information for a VPN Routing/Forwarding instance

R1-PE1#show ip bgp vpnv4 rd ?
  ASN:nn or IP-address:nn  VPN Route Distinguisher

R1-PE1#show ip bgp vpnv4 rd 65000:1 ?
  A.B.C.D            Network in the BGP routing table to display
  A.B.C.D/nn         IP prefix <network>/<length>, e.g., 35.0.0.0/8
  cidr-only          Display only routes with non-natural netmasks
  community          Display routes matching the communities
  community-list     Display routes matching the community-list
  dampening          Display detailed information about dampening
  extcommunity-list  Display routes matching the extcommunity-list
  filter-list        Display routes conforming to the filter-list
  inconsistency      Display all inconsistent paths
  inconsistent-as    Display only routes with inconsistent origin ASs
  labels             Display BGP labels for prefixes
  neighbors          Detailed information on TCP and BGP neighbor connections
  nexthops           Nexthop address table
  oer-paths          Display all oer controlled paths
  paths              Path information
  peer-group         Display information on peer-groups
  pending-prefixes   Display prefixes pending deletion
  prefix-list        Display routes matching the prefix-list
  quote-regexp       Display routes matching the AS path "regular expression"
  regexp             Display routes matching the AS path regular expression
  replication        Display replication status of update-group(s)
  rib-failure        Display bgp routes that failed to install in the routing
                     table (RIB)
  route-map          Display routes matching the route-map
  summary            Summary of BGP neighbor status
  update-group       Display information on update-groups
  version            Display prefixes with matching version numbers
  |                  Output modifiers
  <cr>

R1-PE1#show ip bgp vpnv4 rd 65000:1 labels       // LEGACY SHOW COMMAND
   Network          Next Hop      In label/Out label
Route Distinguisher: 65000:1 (CUSTA)
   172.16.1.0/30    0.0.0.0         107/nolabel(CUSTA)
   172.16.1.99/32   172.16.1.2      108/nolabel


R1-PE1#show bgp ?   
  *         All scopes
  all       All address families
  ipv4      Address family
  ipv6      Address family
  l2vpn     Address family
  nsap      Address family
  rtfilter  Address family
  vpnv4     Address family
  vpnv6     Address family
  vrf       VRF scope

R1-PE1#show bgp vpnv4 ?
  multicast  Address Family Modifier
  unicast    Address Family Modifier

R1-PE1#show bgp vpnv4 unicast ?
  all  Display information about all VPN NLRIs
  rd   Display information for a route distinguisher
  vrf  Display information for a VPN Routing/Forwarding instance

R1-PE1#show bgp vpnv4 unicast rd ?
  ASN:nn or IP-address:nn  VPN Route Distinguisher
         
R1-PE1#show bgp vpnv4 unicast rd 65000:1 ?
  A.B.C.D            Network in the BGP routing table to display
  A.B.C.D/nn         IP prefix <network>/<length>, e.g., 35.0.0.0/8
  cidr-only          Display only routes with non-natural netmasks
  community          Display routes matching the communities
  community-list     Display routes matching the community-list
  dampening          Display detailed information about dampening
  extcommunity-list  Display routes matching the extcommunity-list
  filter-list        Display routes conforming to the filter-list
  inconsistency      Display all inconsistent paths
  inconsistent-as    Display only routes with inconsistent origin ASs
  labels             Display BGP labels for prefixes
  neighbors          Detailed information on TCP and BGP neighbor connections
  nexthops           Nexthop address table
  oer-paths          Display all oer controlled paths
  paths              Path information
  peer-group         Display information on peer-groups
  pending-prefixes   Display prefixes pending deletion
  prefix-list        Display routes matching the prefix-list
  quote-regexp       Display routes matching the AS path "regular expression"
  regexp             Display routes matching the AS path regular expression
  replication        Display replication status of update-group(s)
  rib-failure        Display bgp routes that failed to install in the routing
                     table (RIB)
  route-map          Display routes matching the route-map
  summary            Summary of BGP neighbor status
  update-group       Display information on update-groups
  version            Display prefixes with matching version numbers
  |                  Output modifiers
  <cr>

R1-PE1#show bgp vpnv4 unicast rd 65000:1 labels      // "NEWER" SHOW COMMAND
   Network          Next Hop      In label/Out label
Route Distinguisher: 65000:1 (CUSTA)
   172.16.1.0/30    0.0.0.0         107/nolabel(CUSTA)
   172.16.1.99/32   172.16.1.2      108/nolabel

R1-PE1#show bgp vpnv4 unicast vrf CUSTA labels
   Network          Next Hop      In label/Out label
Route Distinguisher: 65000:1 (CUSTA)
   172.16.1.0/30    0.0.0.0         107/nolabel(CUSTA)
   172.16.1.99/32   172.16.1.2      108/nolabel

R1-PE1#show mpls forwarding-table ?
  A.B.C.D             Destination prefix
  X:X:X:X::X/<0-128>  Destination IPv6 prefix
  detail              Detailed information
  interface           Match outgoing interface
  labels              Match label values
  next-hop            Match next hop neighbor
  slot                Specify the slot
  vrf                 Show entries for a VPN Routing/Forwarding instance
  |                   Output modifiers
  <cr>

R1-PE1#show mpls forwarding-table vrf CUSTA
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
107        No Label   172.16.1.0/30[V] 0             aggregate/CUSTA         // VPNv4 ROUTE
108        No Label   172.16.1.99/32[V]   \
                                       0             Fa1/0      172.16.1.2

R1-PE1#show ip cef vrf CUSTA 172.16.1.2/32
172.16.1.2/32
  attached to FastEthernet1/0

R1-PE1#show bgp vpnv4 unicast vrf CUSTA      
BGP table version is 7, local router ID is 10.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, 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: 65000:1 (default for vrf CUSTA)
 *>  172.16.1.0/30    0.0.0.0                  0         32768 ?        // NEXT-HOP OF 0.0.0.0 MEANS DIRECTLY CONNECTED ROUTE
 *>  172.16.1.99/32   172.16.1.2               2         32768 ?

R1-PE1#show bgp vpnv4 unicast vrf CUSTA 172.16.1.99/32
BGP routing table entry for 65000:1:172.16.1.99/32, version 7        // RD
Paths: (1 available, best #1, table CUSTA)
  Advertised to update-groups:
     2        
  Refresh Epoch 1
  Local
    172.16.1.2 from 0.0.0.0 (10.1.1.1)
      Origin incomplete, metric 2, localpref 100, weight 32768, valid, sourced, best
      Extended Community: RT:1:1 OSPF DOMAIN ID:0x0005:0x000000020200       // RT
        OSPF RT:0.0.0.0:2:0 OSPF ROUTER ID:172.16.1.1:0
      mpls labels in/out 108/nolabel

R1-PE1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1-PE1(config)#router ospf 2 vrf CUSTA
R1-PE1(config-router)#?
Router configuration commands:
  area                   OSPF area parameters
  auto-cost              Calculate OSPF interface cost according to bandwidth
  bfd                    BFD configuration commands
  capability             Enable specific OSPF feature
  compatible             OSPF compatibility list
  default                Set a command to its defaults
  default-information    Control distribution of default information
  default-metric         Set metric of redistributed routes
  discard-route          Enable or disable discard-route installation
  distance               Define an administrative distance
  distribute-list        Filter networks in routing updates
  domain-id              OSPF domain-id
  domain-tag             OSPF domain-tag
  event-log              OSPF Event Logging
  exit                   Exit from routing protocol configuration mode
  help                   Description of the interactive help system
  ignore                 Do not complain about specific event
  interface-id           Source of the interface ID
  ispf                   Enable incremental SPF computation
  limit                  Limit a specific OSPF feature
  local-rib-criteria     Enable or disable usage of local RIB as route criteria
  log-adjacency-changes  Log changes in adjacency state
  max-lsa                maximum number of LSAs OSPF process will receive
  max-metric             Set maximum metric
  maximum-paths          Forward packets over multiple paths
  mpls                   Configure MPLS routing protocol parameters
  neighbor               Specify a neighbor router
  network                Enable routing on an IP network
  no                     Negate a command or set its defaults
  nsf                    Non-stop forwarding
  passive-interface      Suppress routing updates on an interface
  prefix-suppression     OSPF prefix suppression
  priority               OSPF topology priority
  queue-depth            OSPF Hello/Router process queue depth
  redistribute           Redistribute information from another routing protocol
  router-id              router-id for this OSPF process
  shutdown               Shutdown the OSPF protocol under the current instance
  snmp                   Modify snmp parameters
  summary-address        Configure IP address summaries
  timers                 Adjust routing timers
  traffic-share          How to compute traffic share over alternate paths
  ttl-security           TTL security check

R1-PE1(config-router)#redistribute ?
  bgp             Border Gateway Protocol (BGP)
  connected       Connected
  eigrp           Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis            ISO IS-IS
  lisp            Locator ID Separation Protocol (LISP)
  maximum-prefix  Maximum number of prefixes redistributed to protocol
  mobile          Mobile routes
  odr             On Demand stub Routes
  ospf            Open Shortest Path First (OSPF)
  ospfv3          OSPFv3
  rip             Routing Information Protocol (RIP)
  static          Static routes

R1-PE1(config-router)#redistribute bgp ?
  <1-4294967295>  Autonomous system number
  <1.0-XX.YY>     Autonomous system number

R1-PE1(config-router)#redistribute bgp 65000 ?
  metric       Metric for redistributed routes
  metric-type  OSPF/IS-IS exterior metric type for redistributed routes
  nssa-only    Limit redistributed routes to NSSA areas
  route-map    Route map reference
  subnets      Consider subnets for redistribution into OSPF
  tag          Set tag for routes redistributed into OSPF
  <cr>

R1-PE1(config-router)#redistribute bgp 65000 subnets     // IMPORT ROUTES FROM BGP INTO OSPF/VRF
R1-PE1(config-router)#end
R1-PE1#

R1-PE1#show run | sec router bgp
router bgp 65000
 bgp log-neighbor-changes
 neighbor 10.5.5.5 remote-as 65000
 neighbor 10.5.5.5 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.5.5.5 activate
  neighbor 10.5.5.5 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf CUSTA
  redistribute ospf 2
 exit-address-family


5. Configure Route Redistribution for CUSTB

R1-PE1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1-PE1(config)#router bgp 65000
R1-PE1(config-router)#address-family ipv4 vrf CUSTB
R1-PE1(config-router-af)#redistribute eigrp 100
R1-PE1(config-router-af)#end
R1-PE1#
*Nov 26 20:31:50.831: %SYS-5-CONFIG_I: Configured from console by console
R1-PE1#
R1-PE1#show run | sec router bgp
router bgp 65000
 bgp log-neighbor-changes
 neighbor 10.5.5.5 remote-as 65000
 neighbor 10.5.5.5 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.5.5.5 activate
  neighbor 10.5.5.5 send-community extended
 exit-address-family
 !
 address-family ipv4 vrf CUSTA
  redistribute ospf 2
 exit-address-family
 !
 address-family ipv4 vrf CUSTB
  redistribute eigrp 100
 exit-address-family
R1-PE1#
R1-PE1#show bgp vpnv4 unicast vrf CUSTB
BGP table version is 9, local router ID is 10.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, 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: 65000:2 (default for vrf CUSTB)
 *>  172.16.1.0/30    0.0.0.0                  0         32768 ?
 *>  172.16.1.100/32  172.16.1.2          156160         32768 ?
 *>i 192.168.1.0/30   10.5.5.5                 0    100      0 65001 ?      // CUSTB-SITE2 ROUTES APPEARED SINCE EBGP WAS ALREADY CONFIGURED
 *>i 192.168.1.100/32 10.5.5.5                 0    100      0 65001 ?


R1-PE1#show bgp vpnv4 unicast vrf CUSTB labels
   Network          Next Hop      In label/Out label
Route Distinguisher: 65000:2 (CUSTB)
   172.16.1.0/30    0.0.0.0         109/nolabel(CUSTB)
   172.16.1.100/32  172.16.1.2      110/nolabel
   192.168.1.0/30   10.5.5.5        nolabel/507
   192.168.1.100/32 10.5.5.5        nolabel/508


R1-PE1#show mpls forwarding-table vrf CUSTB
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop   
Label      Label      or Tunnel Id     Switched      interface             
109        No Label   172.16.1.0/30[V] 0             aggregate/CUSTB
110        No Label   172.16.1.100/32[V]   \
                                       0             Fa1/1      172.16.1.2

R1-PE1#show ip cef vrf CUSTB 172.16.1.100
172.16.1.100/32
  nexthop 172.16.1.2 FastEthernet1/1


CUSTB-SITE1#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

      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C        172.16.1.0/30 is directly connected, FastEthernet1/1
L        172.16.1.2/32 is directly connected, FastEthernet1/1
C        172.16.1.100/32 is directly connected, Loopback1

R1-PE1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1-PE1(config)#router eigrp 100
R1-PE1(config-router)#address-family ipv4 vrf CUSTB autonomous-system 100
R1-PE1(config-router-af)#redistribute ?
  bgp             Border Gateway Protocol (BGP)
  connected       Connected
  eigrp           Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis            ISO IS-IS
  maximum-prefix  Maximum number of prefixes redistributed to protocol
  mobile          Mobile routes
  odr             On Demand stub Routes
  ospf            Open Shortest Path First (OSPF)
  ospfv3          OSPFv3
  rip             Routing Information Protocol (RIP)
  static          Static routes

R1-PE1(config-router-af)#redistribute bgp ?
  <1-4294967295>  Autonomous system number
  <1.0-XX.YY>     Autonomous system number

R1-PE1(config-router-af)#redistribute bgp 65000 ?
  metric     Metric for redistributed routes
  route-map  Route map reference
  <cr>

R1-PE1(config-router-af)#redistribute bgp 65000 metric ?
  <1-4294967295>  Bandwidth metric in Kbits per second

R1-PE1(config-router-af)#redistribute bgp 65000 metric 1 ?
  <0-4294967295>  EIGRP delay metric, in 10 microsecond units

R1-PE1(config-router-af)#redistribute bgp 65000 metric 1 1 ?
  <0-255>  EIGRP reliability metric where 255 is 100% reliable

R1-PE1(config-router-af)#redistribute bgp 65000 metric 1 1 1 ?
  <1-255>  EIGRP Effective bandwidth metric (Loading) where 255 is 100% loaded

R1-PE1(config-router-af)#redistribute bgp 65000 metric 1 1 1 1 ?
  <1-65535>  EIGRP MTU of the path

R1-PE1(config-router-af)#redistribute bgp 65000 metric 1 1 1 1 1       // IMPORT ROUTE
R1-PE1(config-router-af)#end
R1-PE1#


CUSTB-SITE1#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

      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C        172.16.1.0/30 is directly connected, FastEthernet1/1
L        172.16.1.2/32 is directly connected, FastEthernet1/1
C        172.16.1.100/32 is directly connected, Loopback1
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
D EX     192.168.1.0/30
           [170/2560002816] via 172.16.1.1, 00:00:06, FastEthernet1/1
D EX     192.168.1.100/32
           [170/2560002816] via 172.16.1.1, 00:00:06, FastEthernet1/1


CUSTB-SITE1#traceroute 192.168.1.100
Type escape sequence to abort.
Tracing the route to 192.168.1.100
VRF info: (vrf in name/id, vrf out name/id)
  1 172.16.1.1 24 msec 16 msec 8 msec
  2 10.12.0.2 [MPLS: Labels 205/508 Exp 0] 76 msec 40 msec 60 msec
  3 10.23.0.3 [MPLS: Labels 309/508 Exp 0] 76 msec 84 msec 72 msec
  4 10.34.0.4 [MPLS: Labels 405/508 Exp 0] 76 msec 72 msec 68 msec
  5 192.168.1.1 [MPLS: Label 508 Exp 0] 84 msec 52 msec 60 msec
  6 192.168.1.2 92 msec 72 msec 44 msec


R5-PE2#show run | sec router bgp
router bgp 65000
 bgp log-neighbor-changes
 neighbor 10.1.1.1 remote-as 65000
 neighbor 10.1.1.1 update-source Loopback0
 !
 address-family vpnv4
  neighbor 10.1.1.1 activate
  neighbor 10.1.1.1 send-community extended
  neighbor 10.1.1.1 next-hop-self
 exit-address-family
 !
 address-family ipv4 vrf CUSTB
  neighbor 192.168.1.2 remote-as 65001
  neighbor 192.168.1.2 activate
 exit-address-family
R5-PE2#
R5-PE2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R5-PE2(config)#router bgp 65000
R5-PE2(config-router)#address-family ipv4 vrf CUSTA
R5-PE2(config-router-af)#?
Router Address Family configuration commands:
  aggregate-address    Configure BGP aggregate entries
  bgp                  BGP specific commands
  default              Set a command to its defaults
  default-information  Control distribution of default information
  default-metric       Set metric of redistributed routes
  distance             Define an administrative distance
  distribute-list      Filter networks in routing updates
  exit-address-family  Exit from Address Family configuration mode
  help                 Description of the interactive help system
  import               Configure path import
  maximum-paths        Forward packets over multiple paths
  neighbor             Specify a neighbor router
  network              Specify a network to announce via BGP
  no                   Negate a command or set its defaults
  redistribute         Redistribute information from another routing protocol
  snmp                 Modify snmp parameters
  synchronization      Perform IGP synchronization
  table-map            Map external entry attributes into routing table

R5-PE2(config-router-af)#redistribute ?
  bgp        Border Gateway Protocol (BGP)
  connected  Connected
  eigrp      Enhanced Interior Gateway Routing Protocol (EIGRP)
  isis       ISO IS-IS
  lisp       Locator ID Separation Protocol (LISP)
  mobile     Mobile routes
  odr        On Demand stub Routes
  ospf       Open Shortest Path First (OSPF)
  ospfv3     OSPFv3
  rip        Routing Information Protocol (RIP)
  static     Static routes

R5-PE2(config-router-af)#redistribute rip ?
  metric     Metric for redistributed routes
  route-map  Route map reference
  <cr>

R5-PE2(config-router-af)#redistribute rip       // EXPORT ROUTES
R5-PE2(config-router-af)#end
R5-PE2#

R5-PE2#show bgp vpnv4 unicast vrf CUSTA labels
   Network          Next Hop      In label/Out label
Route Distinguisher: 65000:1 (CUSTA)
   172.16.1.0/30    10.1.1.1        nolabel/107
   172.16.1.99/32   10.1.1.1        nolabel/108
   192.168.1.0/30   0.0.0.0         509/nolabel(CUSTA)
   192.168.1.99/32  192.168.1.2     510/nolabel


CUSTA-SITE1#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

      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C        172.16.1.0/30 is directly connected, FastEthernet1/0
L        172.16.1.2/32 is directly connected, FastEthernet1/0
C        172.16.1.99/32 is directly connected, Loopback1


R5-PE2#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R5-PE2(config)#router rip
R5-PE2(config-router)#address-family ipv4 vrf CUSTA
R5-PE2(config-router-af)#redistribute bgp 65000 ?
  metric     Metric for redistributed routes
  route-map  Route map reference
  <cr>

R5-PE2(config-router-af)#redistribute bgp 65000 metric ?
  <0-16>       Default metric
  transparent  Transparently redistribute metric

R5-PE2(config-router-af)#redistribute bgp 65000 metric 5     // IMPORT ROUTES
R5-PE2(config-router-af)#end
R5-PE2#


CUSTA-SITE2#show ip interface brief
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
FastEthernet1/0            192.168.1.2     YES manual up                    up     
FastEthernet1/1            unassigned      YES unset  administratively down down   
Loopback1                  192.168.1.99    YES manual up                    up    

CUSTA-SITE2#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

      172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R        172.16.1.0/30 [120/5] via 192.168.1.1, 00:00:15, FastEthernet1/0
R        172.16.1.99/32 [120/5] via 192.168.1.1, 00:00:15, FastEthernet1/0
      192.168.1.0/24 is variably subnetted, 3 subnets, 2 masks
C        192.168.1.0/30 is directly connected, FastEthernet1/0
L        192.168.1.2/32 is directly connected, FastEthernet1/0
C        192.168.1.99/32 is directly connected, Loopback1


CUSTA-SITE1#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

      172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C        172.16.1.0/30 is directly connected, FastEthernet1/0
L        172.16.1.2/32 is directly connected, FastEthernet1/0
C        172.16.1.99/32 is directly connected, Loopback1
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
O E2     192.168.1.0/30 [110/1] via 172.16.1.1, 00:06:35, FastEthernet1/0
O E2     192.168.1.99/32 [110/1] via 172.16.1.1, 00:06:35, FastEthernet1/0

CUSTA-SITE1#ping 192.168.1.99
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.99, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 72/97/112 ms

CUSTA-SITE1#traceroute 192.168.1.99
Type escape sequence to abort.
Tracing the route to 192.168.1.99
VRF info: (vrf in name/id, vrf out name/id)
  1 172.16.1.1 8 msec 12 msec 12 msec
  2 10.12.0.2 [MPLS: Labels 205/510 Exp 0] 72 msec 96 msec 84 msec
  3 10.23.0.3 [MPLS: Labels 309/510 Exp 0] 44 msec 92 msec 76 msec
  4 10.34.0.4 [MPLS: Labels 405/510 Exp 0] 72 msec 52 msec 100 msec
  5 192.168.1.1 [MPLS: Label 510 Exp 0] 80 msec 56 msec 96 msec
  6 192.168.1.2 112 msec 88 msec 92 msec

No comments:

Post a Comment