VRF Configuration in R1**********************
ip vrf A
rd 11:11
route-target export 11:11
route-target import 11:11
!
ip vrf B
rd 22:22
route-target export 22:22
route-target import 22:22
interface FastEthernet0/0
ip vrf forwarding A
ip address 10.0.0.1 255.255.255.0 Address overlapping
!
interface FastEthernet0/1
ip vrf forwarding B
ip address 10.0.0.1 255.255.255.0 Address overlapping
VRF Configuration in R3 ***********************
ip vrf A
rd 11:11
route-target export 11:11
route-target import 11:11
!
ip vrf B
rd 22:22
route-target export 22:22
route-target import 22:22
ip vrf forwarding B
ip address 11.0.0.3 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet1/0
ip vrf forwarding A
ip address 12.0.0.3 255.255.255.0
duplex auto
speed auto
Routing between R1-R4 and R1-R5
In OSPF each VRF must have unique Process-ID and Router - ID
router ospf 2 vrf B
redistribute bgp 111 subnets
network 10.0.0.0 0.0.0.255 area 1
!
router ospf 3 vrf A
router-id 111.11.11.11
redistribute bgp 111 subnets
network 10.0.0.0 0.0.0.255 area 2
In OSPF each VRF must have unique Process-ID and Router - ID
router ospf 2 vrf B
redistribute bgp 111 subnets
network 11.0.0.0 0.0.0.255 area 1
!
router ospf 3 vrf A
router-id 33.33.33.33
redistribute bgp 111 subnets
network 12.0.0.3 0.0.0.0 area 2
*************************MP-BGP Config*****************
---------MP-BGP config in R1-----
router bgp 111
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 111
neighbor 3.3.3.3 update-source Loopback0
!
address-family vpnv4
neighbor 3.3.3.3 activate
neighbor 3.3.3.3 send-community extended
exit-address-family
!
address-family ipv4 vrf A
redistribute ospf 3 match internal external 1 external 2
exit-address-family
!
address-family ipv4 vrf B
redistribute ospf 2 match internal external 1 external 2
exit-address-family
---------MP-BGP config in R3-----
router bgp 111
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 111
neighbor 1.1.1.1 update-source Loopback0
!
address-family vpnv4
neighbor 1.1.1.1 activate
neighbor 1.1.1.1 send-community both
exit-address-family
!
address-family ipv4 vrf A
redistribute ospf 3 match internal external 1 external 2
exit-address-family
!
address-family ipv4 vrf B
redistribute ospf 2 match internal external 1 external 2
exit-address-family
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
R5
R5#sh ip int br | in up
FastEthernet0/0 10.0.0.5 YES manual up up
Loopback0 5.5.5.5 YES manual up up
network 0.0.0.0 255.255.255.255 area 2
R4
R4#sh ip int br | in up
FastEthernet0/1 10.0.0.4 YES manual up up
Loopback0 4.4.4.4 YES manual up up
router ospf 3
network 0.0.0.0 255.255.255.255 area 1
R6#sh ip int br | in up
FastEthernet0/1 11.0.0.1 YES manual up up
Loopback0 6.6.6.6 YES manual up up
network 0.0.0.0 255.255.255.255 area 1
R7
R7#sh ip int br | in up
FastEthernet0/0 12.0.0.7 YES manual up up
Loopback0 7.7.7.7 YES manual up up
network 0.0.0.0 255.255.255.255 area 2
SHOW Results
Overlapping addres 10.0.0.1/24 in VRF A & B
R1#sh ip bgp vpnv4 all
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 11:11 (default for vrf A)
*> 5.5.5.5/32 10.0.0.5 2 32768 ?
*>i 7.7.7.7/32 3.3.3.3 2 100 0 ? ******* BGP route from R3
*> 10.0.0.0/24 0.0.0.0 0 32768 ?
*>i 12.0.0.0/24 3.3.3.3 0 100 0 ?********BGP route from R3
Route Distinguisher: 22:22 (default for vrf B)
*> 4.4.4.4/32 10.0.0.4 2 32768 ?
*>i 6.6.6.6/32 3.3.3.3 2 100 0 ?******** BGP route from R3
*> 10.0.0.0/24 0.0.0.0 0 32768 ?
*>i 11.0.0.0/24 3.3.3.3 0 100 0 ?******* BGP route from R3
R1#
BGP routing table entry for 11:11:7.7.7.7/32, version 67 11:11 is RD for VRF A
Paths: (1 available, best #1, table A)
Not advertised to any peer
Refresh Epoch 1
Local
3.3.3.3 (metric 3) from 3.3.3.3 (3.3.3.3)
Origin incomplete, metric 2, localpref 100, valid, internal, best
Extended Community: RT:11:11 OSPF DOMAIN ID:0x0005:0x000000030200
OSPF RT:0.0.0.2:2:0 OSPF ROUTER ID:33.33.33.33:0
mpls labels in/out nolabel/23
rx pathid: 0, tx pathid: 0x0
R1#
R1#sh bgp vpnv4 unicast all 6.6.6.6/32
BGP routing table entry for 22:22:6.6.6.6/32, version 53 22:22 is RD for VRF A
Paths: (1 available, best #1, table B)
Not advertised to any peer
Refresh Epoch 1
Local
3.3.3.3 (metric 3) from 3.3.3.3 (3.3.3.3)
Origin incomplete, metric 2, localpref 100, valid, internal, best
Extended Community: RT:22:22 OSPF DOMAIN ID:0x0005:0x000000020200
OSPF RT:0.0.0.1:2:0 OSPF ROUTER ID:11.0.0.3:0
mpls labels in/out nolabel/20
rx pathid: 0, tx pathid: 0x0
***************************R3 ***********************************
**************************************************************
R3#sh ip bgp vpnv4 all
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 11:11 (default for vrf A)
*>i 5.5.5.5/32 1.1.1.1 2 100 0 ?
*> 7.7.7.7/32 12.0.0.7 2 32768 ?
*>i 10.0.0.0/24 1.1.1.1 0 100 0 ? *****BGP route from R1
*> 12.0.0.0/24 0.0.0.0 0 32768 ?
Route Distinguisher: 22:22 (default for vrf B)
*>i 4.4.4.4/32 1.1.1.1 2 100 0 ?
*> 6.6.6.6/32 11.0.0.1 2 32768 ?
*>i 10.0.0.0/24 1.1.1.1 0 100 0 ? ********* BGP route from R1
*> 11.0.0.0/24 0.0.0.0 0 32768 ?
R3#
BGP routing table entry for 22:22:6.6.6.6/32, version 53 22:22 is RD for VRF A
Paths: (1 available, best #1, table B)
Not advertised to any peer
Refresh Epoch 1
Local
3.3.3.3 (metric 3) from 3.3.3.3 (3.3.3.3)
Origin incomplete, metric 2, localpref 100, valid, internal, best
Extended Community: RT:22:22 OSPF DOMAIN ID:0x0005:0x000000020200
OSPF RT:0.0.0.1:2:0 OSPF ROUTER ID:11.0.0.3:0
mpls labels in/out nolabel/20
rx pathid: 0, tx pathid: 0x0
***************************R3 ***********************************
**************************************************************
R3#sh ip bgp vpnv4 all
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 11:11 (default for vrf A)
*>i 5.5.5.5/32 1.1.1.1 2 100 0 ?
*> 7.7.7.7/32 12.0.0.7 2 32768 ?
*>i 10.0.0.0/24 1.1.1.1 0 100 0 ? *****BGP route from R1
*> 12.0.0.0/24 0.0.0.0 0 32768 ?
Route Distinguisher: 22:22 (default for vrf B)
*>i 4.4.4.4/32 1.1.1.1 2 100 0 ?
*> 6.6.6.6/32 11.0.0.1 2 32768 ?
*>i 10.0.0.0/24 1.1.1.1 0 100 0 ? ********* BGP route from R1
*> 11.0.0.0/24 0.0.0.0 0 32768 ?
R3#
R3#sh bgp vpnv4 unicast all 10.0.0.1/24
BGP routing table entry for 11:11:10.0.0.0/24, version 64 11:11 RD for VRF A
Paths: (1 available, best #1, table A)
Not advertised to any peer
Refresh Epoch 1
Local
1.1.1.1 (metric 3) from 1.1.1.1 (1.1.1.1)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Extended Community: RT:11:11 OSPF DOMAIN ID:0x0005:0x000000030200
OSPF RT:0.0.0.2:2:0 OSPF ROUTER ID:111.11.11.11:0
mpls labels in/out nolabel/21
rx pathid: 0, tx pathid: 0x0
BGP routing table entry for 22:22:10.0.0.0/24, version 55 22:22 RD for VRF B
Paths: (1 available, best #1, table B)
Not advertised to any peer
Refresh Epoch 1
Local
1.1.1.1 (metric 3) from 1.1.1.1 (1.1.1.1)
Origin incomplete, metric 0, localpref 100, valid, internal, best
Extended Community: RT:22:22 OSPF DOMAIN ID:0x0005:0x000000020200
OSPF RT:0.0.0.1:2:0 OSPF ROUTER ID:10.0.0.1:0
mpls labels in/out nolabel/19
rx pathid: 0, tx pathid: 0x0
R3#
Customer Connectivity.....
In VRF A..
R7..
R7#sh ip route
5.0.0.0/32 is subnetted, 1 subnets
O IA 5.5.5.5 [110/3] via 12.0.0.3, 00:00:03, FastEthernet0/0 ^^^^^^^Prefix from R5
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.0.0.0 [110/2] via 12.0.0.3, 00:00:03, FastEthernet0/0 ^^^^^^^^6 Prefix from R5
R7#trace 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
1 12.0.0.3 216 msec 244 msec 360 msec
2 *
172.16.0.2 [MPLS: Labels 17/27 Exp 0] 664 msec 524 msec
3 10.0.0.1 [MPLS: Label 27 Exp 0] 692 msec 632 msec 1168 msec R1
4 10.0.0.5 728 msec 692 msec 400 msec R5
R7#
R7#ping 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
In VRF B
R6#sh ip route
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/3] via 11.0.0.3, 04:17:49, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.0.0.0 [110/2] via 11.0.0.3, 04:17:49, FastEthernet0/1
R6#sh ip route
4.0.0.0/32 is subnetted, 1 subnets
O IA 4.4.4.4 [110/3] via 11.0.0.3, 04:17:49, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
O IA 10.0.0.0 [110/2] via 11.0.0.3, 04:17:49, FastEthernet0/1
R6#ping 4.4.4.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 368/496/776 ms
R6#trace 4.4.4.4
Type escape sequence to abort.
Tracing the route to 4.4.4.4
VRF info: (vrf in name/id, vrf out name/id)
1 11.0.0.3 124 msec 320 msec 240 msec
2 172.16.0.2 [MPLS: Labels 17/25 Exp 0] 516 msec 576 msec 936 msec
3 10.0.0.1 [MPLS: Label 25 Exp 0] 428 msec 600 msec 932 msec R1
4 10.0.0.4 1076 msec 1196 msec 1104 msec R4
R6#
********************************************************************************
MPLS cloud
R1#sh mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
16 16 3.3.3.3/32 0 Fa1/0 192.168.0.2
R2#sh mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
16 Pop Label 3.3.3.3/32 63273 Fa0/0 172.16.0.3
17 Pop Label 1.1.1.1/32 60741 Fa0/1 192.168.0.1
R2#
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
16 Pop Label 2.2.2.2/32 0 Fa0/0 172.16.0.2
17 Pop Label 192.168.0.0/24 0 Fa0/0 172.16.0.2
18 17 1.1.1.1/32 0 Fa0/0 172.16.0.2
No comments:
Post a Comment