Tuesday, January 31, 2012

MPLS VPN CONFIG

Config of MPLS VPNS
--------------------
In order to get routing information from one PE to another PE we encode the routing
information using a VPNv4ROUTE using MPBGP to transport

Multiprotocol BGP
------------------
RFC 4364 "BGP/MPLS IP Virtual Private Networks"
     - BGP define Address family id & sub address family id 128 as VPN-IPV4 (VPNV4)
     - 8 byte Route Distingusher (RD)
         - unique per vpn or peer vpn site
         - ASN:NN or IP address:NN
         - 4 byte IPV4 address
            - unique per vpn
            -Implies Globally unique routes

Controlling VPNV4 Routes
-------------------------
Route distingusher used solely to make route unique
New BGP extended community "Route Target" used to control what enters/exits the vrf table
Export route-target
     - what route will go from the vrf into BGP
Import route-target
     - what route will go from BGP into vrf
Allows granular control over what sites have what routes
Import map and export map allow control on per prefix basis
Configuring VPNV4
------------------
Uses address-family like vrf aware BGP
    - address-family vpnv4 unicast
Neighbors must be defined under the global BGP process then activated under VPNV4
Attributes are applied under address-family
    -next hop processing
    -send community
       - extended is required
    - Route Reflection
    -Route Map etc

When we configure vpv4 we first configure the neighbors under the router bgp process
for ipv4 then activate them under the address family vpnv4
if we do not want to route normal ipv4 just vpnv4 we can disable the ipv4 neighbor process
by
router bgp 200
no bgp default ipv4 unicast
or for singular neighbor
router bgp 200
address-family ipv4 unicast
no neighbor 10.0.0.4 activate

VPNV4 Route Target
--------------------
8 byte field per rfc 4360 BGP Extended Community Attribute
Format similar to router distingusher
   - ASN:NN or IP-Address:nn
VPNV4 speakers only accept vpnv4 routes with a route-target matching a local VRF import value
So if the PE does not have the vrf configured locally it will not accept any vpnv4 routes
for it 
- route reflection maybe you want to configure as an exception
to disable this
no bgp default route-target filter
This is on by default and desirable in most cases
VPNV4 routes can have more than one route target
Allows for complex VPN topologies
    - full mesh import + export same everywhere
    - HUB & Spoke - spokes import only spokes routes
    - Central Services- Multiple VPNs import routes from central server
    -Management VPNS- management loopback on ce routers can be exported into special mgt
      VPN
Ip vrf A
route-target export 1:1
route-target import 1:1
or we could if exporting and inporting the same
ip vrf A
route-target both 1:1



IPV6 VPNV6
-----------------

IPv4 aVpnv4 Commands
Ipv6 and VPNv6 Commands
Global Commands
Ip routing
Ipv6 unicat-routing
Ip cef
Ipv6 cef
Interface Specific Commands
Ip address

Ipv6 address

Ip vrf forwarding MPLSVPN
Vrf forwarding MPLSVPN
VRF Specific Commands
Ip vrf MPLSVPN
Rd 1:1
Route-target both 1:1
vrf definition ABC
 rd 1:1
 route-target export 1:1
 route-target import 1:1
 !
 address-family ipv4
 exit-address-family
 !
 address-family ipv6
 exit-address-family
router bgp 1
 address-family vpnv4
 exit-address-family
!
 address-family ipv4
 exit-address-family
!
address-family ipv4 vrf MPLSVPN
 exit-address-family
router bgp 1
 address-family vpnv6
 exit-address-family
!
 address-family ipv6
 exit-address-family
!
address-family ipv6 vrf MPLSVPN
 exit-address-family

Static Vrf Route
Ip route vrf MPLSVPN
ipv6 route vrf MPLSVPN /
Show vrf commands
Show ip vrf interface
Show vrf ipv6 interface
Show ip interface brief
Show ipv6 interface brief
Troubleshooting Command
Show ip bgp vpnv4 all summary
Show bgp vpnv4 all summary
Show ip bgp vpnv6 unicast all summary
Show bgp vpnv6 unicast all summary
Show bgp vpnv4 all
Show bgp vpnv6 unicast all
Show ip bgp vpnv4 vrf MPLSVPN
Show bgp vpnv6 unicast vrf MPLSVPN  
Show mpls forwarding-table vrf MPLSVPN detail
Show mpls forwarding-table vrf MPLSVPN detail
Show ip cef vrf MPLSVPN
Show ipv6 cef vrf MPLSVPN
Ping vrf MPLSVPN
Ping vrf MPLSVPN ipv6
Traceroute vrf MPLSVPN
Traceroute vrf MPLSVPN ipv6 



LAB
------




OK so we have got the core configured with mpls/ldp. We will complete the configuration
with bringing the vrf for eigrp rip and bgp into it.

There is a few steps to this so the first steps is we will create vrf and bringing up
the routing via each external site ce and the mpls network PE
so we will start on R4
First things first the route distingisher for
vrf a will be 110:10
vrf b will be 111:11
vrf d will be 112:12
R4
---
So on R4 we will create the relevant vrfs A,B,D
r4(config)#ip vrf A
r4(config-vrf)#rd 110:10
r4(config-vrf)#ip vrf B
r4(config-vrf)#rd 111:11
r4(config-vrf)#ip vrf D
r4(config-vrf)#rd 112:12
r4(config-vrf)#

We are assigning the link to sw4 to vrf A

r4(config)#int fa0/0.104
r4(config-subif)#ip vrf forwarding A
% Interface FastEthernet0/0.104 IP address 10.164.48.44 removed due to enabling VRF A
r4(config-subif)#ip address 10.164.48.44 255.255.255.0
r4(config-subif)#no shut
r4(config-subif)#exit
r4(config)#

Next we need to configure vrf aware so we use the address family ipv4 vrf A
then our normal rip commands SO this PE side

r4(config)#router rip
r4(config-router)#address-family ipv4 vrf A
r4(config-router-af)#network 10.0.0.0
r4(config-router-af)#no auto
r4(config-router-af)#version 2
r4(config-router-af)#
SO CE SIDE SW4
---------------
We just configure rip as normal

s4(config)#router rip
s4(config-router)#version 2
s4(config-router)#network 10.0.0.0
s4(config-router)#no auto

r4
---
we are recieving the rip route 2.4.4.4 so the rip relationship is working as normal
r4#sh ip route vrf A
Routing Table: A
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
R       2.4.4.4 [120/1] via 10.164.48.4, 00:00:25, FastEthernet0/0.104
     10.0.0.0/24 is subnetted, 1 subnets
C       10.164.48.0 is directly connected, FastEthernet0/0.104
r4#

ok back on r4 we will bring up the VRF B connecting to the eigrp domain

so i will assign the vrf B
r4(config)#int fa0/0.49
r4(config-subif)#ip vrf forwarding B
% Interface FastEthernet0/0.49 IP address 10.229.254.4 removed due to enabling VRF B
r4(config-subif)#ip address 10.229.254.4 255.255.255.0
r4(config-subif)#no shut
r4(config-subif)#exit

r4(config)#router eigrp 20
r4(config-router)#address-family ipv4 vrf B
r4(config-router-af)#autonomous-system 10
r4(config-router-af)#network 10.229.254.0
r4(config-router-af)#no auto
r4(config-router-af)#

Sw3 CE SIDE
------------
s3(config)#router eigrp 10
s3(config-router)#network 10.229.254.0
s3(config-router)#no auto
s3(config-router)#network 2.3.3.3 0.0.0.0
s3(config-router)#

R4
--
r4#sh ip route vrf B
Routing Table: B
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/24 is subnetted, 1 subnets
D       2.3.3.0 [90/156160] via 10.229.254.3, 00:00:47, FastEthernet0/0.49
     10.0.0.0/24 is subnetted, 1 subnets
C       10.229.254.0 is directly connected, FastEthernet0/0.49
r4#

OK now we will configure vrf D
r4(config)#int fa0/0.192
r4(config-subif)#ip vrf forwarding D
% Interface FastEthernet0/0.192 IP address 172.25.13.4 removed due to enabling VRF D
r4(config-subif)#ip address 172.25.13.4 255.255.255.0
r4(config-subif)#exit
r4(config)#exit

r4(config)#no router bgp 200
r4(config)#router bgp 200
r4(config-router)#address-family ipv4 vrf D
r4(config-router-af)#neighbor 172.25.13.2 remote-as 254
r4(config-router-af)#neighbor 172.25.13.2 activate
r4(config-router-af)#neighbor 172.25.13.2 password cisco

CE side BB2
-----------
bb2#sh run | begin router bgp
router bgp 254
 bgp log-neighbor-changes
 network 11.2.2.2 mask 255.255.255.255
 neighbor 172.25.13.4 remote-as 200
 neighbor 172.25.13.4 password cisco

r4
---

r4#sh ip route vrf D
Routing Table: D
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
     172.25.0.0/24 is subnetted, 1 subnets
C       172.25.13.0 is directly connected, FastEthernet0/0.192
     11.0.0.0/32 is subnetted, 1 subnets
B       11.2.2.2 [20/0] via 172.25.13.2, 00:01:04
r4#

Ok we will now move on to configuring the other PE's

r5
---
r5 only connects ip vrf A

r5(config)#ip vrf A
r5(config-vrf)#rd 110:10
r5(config-vrf)#exit
r5(config)#
r5(config)#int fa0/0.204
r5(config-subif)#ip vrf forwarding A
% Interface FastEthernet0/0.204 IP address 10.164.50.5 removed due to enabling VRF A
r5(config-subif)#ip address 10.164.50.5 255.255.255.0
r5(config-subif)#

r5(config)#router rip
r5(config-router)#address-family ipv4 vrf A
r5(config-router-af)#network 10.0.0.0
r5(config-router-af)#no auto
r5(config-router-af)#version 2
r5(config-router-af)#


BB3
----
bb3(config)#router rip
bb3(config-router)#network 10.0.0.0
bb3(config-router)#no auto
bb3(config-router)#version 2
bb3(config-router)#network 11.0.0.0

r5
---
r5#sh ip route vrf A
Routing Table: A
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
     10.0.0.0/24 is subnetted, 1 subnets
C       10.164.50.0 is directly connected, FastEthernet0/0.204
     11.0.0.0/32 is subnetted, 1 subnets
R       11.3.3.3 [120/1] via 10.164.50.3, 00:00:12, FastEthernet0/0.204
r5#

Ok now onto R6
---------------
r6(config)#ip vrf B
r6(config-vrf)#rd 111:11
r6(config)#router eigrp 200
r6(config-router)#address-family ipv4 vrf B
r6(config-router-af)#autonomous-system 10
r6(config-router-af)#network 10.164.49.0
r6(config-router-af)#no auto
r6(config-router-af)#

r6(config)#int s0/0/0
r6(config-if)#ip vrf forwarding B
% Interface Serial0/0/0 IP address 10.164.49.6 removed due to enabling VRF B
r6(config-if)#ip address 10.164.49.6 255.255.255.0
r6(config-if)#

on BB1
------
bb1(config-if)#router eigrp 10
bb1(config-router)#network 11.1.1.1 0.0.0.0
bb1(config-router)#no auto
bb1(config-router)#network 10.164.49.0 0.0.0.255

r6
---
r6#sh ip route vrf B
Routing Table: B
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
     10.0.0.0/24 is subnetted, 1 subnets
C       10.164.49.0 is directly connected, Serial0/0/0
     11.0.0.0/32 is subnetted, 1 subnets
D       11.1.1.1 [90/2297856] via 10.164.49.1, 00:00:47, Serial0/0/0

OK so each relevant PE is recieving the connected CE customers routes but we are not
exchange routes via the PE
So the next step is to configure vpn membership
we will label vrf A as 110:10
and vrf B as 111:11
vrf D as 112:12     we have done it the same as the route targe this not technically
required but is typically done
R6
---
r6(config)#ip vrf B
r6(config-vrf)#route-target ?
  ASN:nn or IP-address:nn  Target VPN Extended Community
  both                     Both import and export Target-VPN community
  export                   Export Target-VPN community
  import                   Import Target-VPN community
r6(config-vrf)#route-target both 111:11
r6(config-vrf)#

this basically on r6 we will export our routes with extended community of 110:10 also if we
recieve routes with community of 110:10 we will import them

r4
--
r4(config-vrf)#ip vrf A
r4(config-vrf)#route-targe both 110:10
r4(config)#ip vrf B
r4(config-vrf)#route-target both 111:11
r4(config-vrf)#ip vrf D
r4(config-vrf)#route-targe both 112:11
r4(config-vrf)#

r5
---

r5(config)#ip vrf A
r5(config-vrf)#route-target both 110:10
r5(config-vrf)#

So next step is to configure the core of the network with IBGP sessions between the PE
to transport the vpnv4 routes

R6
---


r6(config)#router bgp 200
r6(config-router)#neighbor 5.5.5.5 remote-as 200
r6(config-router)#neighbor 5.5.5.5 update-source lo0
r6(config-router)#neighbor 4.4.4.4 remote-as 200
r6(config-router)#neighbor 4.4.4.4 update-source lo0
r6(config-router)#
We are doing the config for the ibgp relationship we need the router to carry vpnv4 routes
not ipv4 so we will need activate the vpnv4 address family
still under router bgp 200
r6(config-router)#address-family vpnv4
r6(config-router-af)#neighbor 5.5.5.5 activate
r6(config-router-af)#neighbor 5.5.5.5 send-community both
r6(config-router-af)#neighbor 4.4.4.4 activate
r6(config-router-af)#neighbor 4.4.4.4 send-community both

the send community is for the route-targets both means we will send and recieve community
values
r5
---
r5(config)#router bgp 200
r5(config-router)#neighbor 4.4.4.4 remote-as 200
r5(config-router)#neighbor 4.4.4.4 update-source lo0
r5(config-router)#neighbor 6.6.6.6 remote-as 200
r5(config-router)#neighbor 6.6.6.6 update-source lo0
r5(config-router)#
*Feb  1 00:22:01.642: %BGP-5-ADJCHANGE: neighbor 6.6.6.6 Up
r5(config-router)#address-family vpnv4
r5(config-router-af)#neighbor 4.4.4.4 activate
r5(config-router-af)#neighbor 6.6.6.6 activate
r5(config-router-af)#neighbor
*Feb  1 00:22:37.782: %BGP-5-ADJCHANGE: neighbor 6.6.6.6 Down Address family activated4.4
*Feb  1 00:22:39.794: %BGP-5-ADJCHANGE: neighbor
r5(config-router-af)#neighbor 4.4.4.4 send-comm both
r5(config-router-af)#neighbor 6.6.6.6 send-comm both
r5(config-router-af)#

r4
---
r4(config)#router bgp 200
r4(config-router)#neighbor 5.5.5.5 remote-as 200
r4(config-router)#neighbor 5.5.5.5 update-source lo0
r4(config-router)#neighbor 6.6.6.6 remote-as 200
r4(config-router)#
*Feb  1 00:10:23.498: %BGP-5-ADJCHANGE: neighbor 5.5.5.5 Up
r4(config-router)#neighbor 6.6.6.6 update-s
*Feb  1 00:10:35.050: %BGP-5-ADJCHANGE: neighbor 6.6.6.6 Up ouce lo0
                                             ^
% Invalid input detected at '^' marker.
r4(config-router)#neighbor 6.6.6.6 update-source lo0
r4(config-router)#address-family vpnv4
r4(config-router-af)#neighbor 5.5.5.5 activate
r4(config-router-af)#neighbor 5
*Feb  1 00:11:05.154: %BGP-5-ADJCHANGE: neighbor 5.5.5.5 Down Address family activated
*Feb  1 00:11:06.902: %BGP-5-ADJCHANGE: neighbor 5
r4(config-router-af)#neighbor 6.6.6.6 activate
r4(config-router-af)#
*Feb  1 00:11:17.006: %BGP-5-ADJCHANGE: neighbor 6.6.6.6 Down Address family activated

OK so we have BGP configured between all PE's

The last step that we need to do is to redistribute  the routes from the vrf into bgp and
vice versa

r4
---
r4(config)#router bgp 200
r4(config-router)#address-family ipv4 vrf A
r4(config-router-af)#redistribute rip
r4(config-router-af)#

r4(config)#router bgp 200
r4(config-router)#address-family ipv4 vrf B
r4(config-router-af)#redistribute eigrp 1
%VRF specified does not match AS
r4(config-router-af)#redistribute eigrp 10
r4(config-router-af)#

r4#sh bgp vpnv4 unicast all
BGP table version is 14, 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: 110:10 (default for vrf A)
*> 2.4.4.4/32       10.164.48.4              1         32768 ?
*> 10.164.48.0/24   0.0.0.0                  0         32768 ?
Route Distinguisher: 111:11 (default for vrf B)
*> 2.3.3.0/24       10.229.254.3        156160         32768 ?
*> 10.229.254.0/24  0.0.0.0                  0         32768 ?
Route Distinguisher: 112:12 (default for vrf D)
*> 11.2.2.2/32      172.25.13.2              0             0 254 i
r4#

ok we are seeing the vpnv4 routes with there relevant rd
so 2.4.4.4 r4 loopback from eigrp now in bgp it has route distingusher of 110:10

OK i have checked r6 and i am not seeing the routes i forgot the following config on r4

r4(config)#router bgp 200
r4(config-router)#address-family vpnv4
r4(config-router-af)#neighbor 6.6.6.6 send-community both
r4(config-router-af)#neighbor 5.5.5.5 send-community both
r4(config-router-af)#


r6
---
r6#sh bgp vpnv4 unicast all
BGP table version is 5, local router ID is 6.6.6.6
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: 111:11 (default for vrf B)
*>i2.3.3.0/24       4.4.4.4             156160    100      0 ?
*>i10.229.254.0/24  4.4.4.4                  0    100      0 ?
r6#

i am recieving the vpnv4 routes for vrf b

r6#sh ip route vrf B
Routing Table: B
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/24 is subnetted, 1 subnets
B       2.3.3.0 [200/156160] via 4.4.4.4, 00:01:59
     10.0.0.0/24 is subnetted, 2 subnets
B       10.229.254.0 [200/0] via 4.4.4.4, 00:01:59
C       10.164.49.0 is directly connected, Serial0/0/0
     11.0.0.0/32 is subnetted, 1 subnets
D       11.1.1.1 [90/2297856] via 10.164.49.1, 01:39:32, Serial0/0/0
r6#

they are in vrf b routing table but as BGP meaning as they are not eigrp they will not
advertise to the customer
i still need to redistribute them from bgp back into vrf b eigrp

r6(config)#router bgp 200
r6(config-router)#exit
r6(config)#router eigrp 200
r6(config-router)#address-family ipv4 vrf B
r6(config-router-af)#redistribute bgp 200 metric 100 100 100 100 100
r6(config-router-af)#

r6#sh ip route vrf B
Routing Table: B
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/24 is subnetted, 1 subnets
B       2.3.3.0 [200/156160] via 4.4.4.4, 00:01:59
     10.0.0.0/24 is subnetted, 2 subnets
B       10.229.254.0 [200/0] via 4.4.4.4, 00:01:59
C       10.164.49.0 is directly connected, Serial0/0/0
     11.0.0.0/32 is subnetted, 1 subnets
D       11.1.1.1 [90/2297856] via 10.164.49.1, 01:39:32, Serial0/0/0
r6#

still the same
r6#sh ip eigrp vrf B top
IP-EIGRP Topology Table for AS(10)/ID(6.6.6.6) Routing Table: B
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status
P 2.3.3.0/24, 1 successors, FD is 156160
        via VPNv4 Sourced (156160/0)
P 11.1.1.1/32, 1 successors, FD is 2297856
        via 10.164.49.1 (2297856/128256), Serial0/0/0
P 10.229.254.0/24, 1 successors, FD is 28160
        via VPNv4 Sourced (28160/0)
P 10.164.49.0/24, 1 successors, FD is 2169856
        via Connected, Serial0/0/0

ok this actually normal behaviour
The local EIGRP routes appear as native EIGRP routes in the VRF IP routing table; remote
EIGRP routes appear as BGP routes on the PE-router

when we go to BB1

BB1
----
bb1#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       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/24 is subnetted, 1 subnets
D       2.3.3.0 [90/2300416] via 10.164.49.6, 00:10:05, Serial0
     10.0.0.0/24 is subnetted, 2 subnets
D       10.229.254.0 [90/2172416] via 10.164.49.6, 00:10:05, Serial0
C       10.164.49.0 is directly connected, Serial0
     11.0.0.0/32 is subnetted, 1 subnets
C       11.1.1.1 is directly connected, Loopback0
bb1#

the remote routes appear as EIGRP

Lets do it the other way now

r6
---
r6(config)#router bgp 200
r6(config-router)#address-family ipv4 vrf B
r6(config-router-af)#redistribute eigrp 1

r4
---
r4(config)#router eigrp 20
r4(config-router)#address-family ipv4 vrf B
r4(config-router-af)#redistribute bgp 200 metric 1 1 1 1 1
r4(config-router-af)#

r4#sh ip route vrf B
Routing Table: B
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/24 is subnetted, 1 subnets
D       2.3.3.0 [90/156160] via 10.229.254.3, 02:52:01, FastEthernet0/0.49
     10.0.0.0/24 is subnetted, 2 subnets
C       10.229.254.0 is directly connected, FastEthernet0/0.49
B       10.164.49.0 [200/0] via 6.6.6.6, 00:08:49
     11.0.0.0/32 is subnetted, 1 subnets
B       11.1.1.1 [200/2297856] via 6.6.6.6, 00:08:49
r4#

s3#sh 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/24 is subnetted, 1 subnets
C       2.3.3.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.229.254.0 is directly connected, Vlan49
D       10.164.49.0 [90/2170112] via 10.229.254.4, 00:01:12, Vlan49
     11.0.0.0/32 is subnetted, 1 subnets
D       11.1.1.1 [90/2298112] via 10.229.254.4, 00:01:12, Vlan49
s3#

s3#ping 11.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 67/68/76 ms
s3#

r4
---

it is interesting to note we do not need to redistribute bgp into bgp

r4#sh bgp vpnv4 unicast vrf D
BGP table version is 18, 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: 112:12 (default for vrf D)
*> 11.2.2.2/32      172.25.13.2              0             0 254 i

for vrf a

Enter configuration commands, one per line.  End with CNTL/Z.
r4(config)#router rip
r4(config-router)#address-family ipv4 vrf A
r4(config-router-af)#redistribute bgp 200 metric transparent
r4(config-router-af)#exit
r4(config-router)#router bgp 200
r4(config-router)#address-family ipv4 vrf A
r4(config-router-af)#redistribute rip subn?
% Unrecognized command
r4(config-router-af)#redistribute rip
r4(config-router-af)#

r5
---

r5(config)#router bgp 200
r5(config-router)#address-family ipv4 vrf A
r5(config-router-af)#redistribute rip
r5(config-router-af)#exit
r5(config-router)#exit
r5(config)#router rip
r5(config-router)#address-family ipv4 vrf A
r5(config-router-af)#redistribute bgp 200 metric 2
r5(config-router-af)#exit
r5(config-router)#exit
r5(config)#exit

r5#sh ip route vrf A
Routing Table: A
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
B       2.4.4.4 [200/1] via 4.4.4.4, 00:54:51
     10.0.0.0/24 is subnetted, 2 subnets
C       10.164.50.0 is directly connected, FastEthernet0/0.204
B       10.164.48.0 [200/0] via 4.4.4.4, 00:54:51
     11.0.0.0/32 is subnetted, 1 subnets
R       11.3.3.3 [120/1] via 10.164.50.3, 00:00:15, FastEthernet0/0.204
lets go to sw 4
s4
---
s4#sh 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.4.4.4 is directly connected, Loopback0
     155.0.0.0/24 is subnetted, 2 subnets
C       155.0.10.0 is directly connected, Vlan10
C       155.0.108.0 is directly connected, Port-channel2
     10.0.0.0/24 is subnetted, 2 subnets
R       10.164.50.0 [120/1] via 10.164.48.44, 00:00:12, Vlan104
C       10.164.48.0 is directly connected, Vlan104
     11.0.0.0/32 is subnetted, 1 subnets
R       11.3.3.3 [120/2] via 10.164.48.44, 00:00:12, Vlan104
s4#
we are getting the routes

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






No comments:

Post a Comment