For VRF A
***** VRF declearation in R1 *************
ip vrf A
rd 11:11
route-target export 11:11
route-target import 11:11
ip vrf forwarding A
ip address 10.0.0.1 255.255.255.0
duplex auto
speed auto
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
!
interface FastEthernet1/0
ip address 192.168.0.1 255.255.255.0
mpls ip
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 192.168.0.0 0.0.255.255 area 0
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
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 B
redistribute ospf 2 match internal external 1 external 2
exit-address-family
***************MPLS config in R2 *************
interface Loopback0
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 172.16.0.2 255.255.255.0
duplex auto
speed auto
mpls ip
!
interface FastEthernet0/1
ip address 192.168.0.2 255.255.255.0
duplex auto
speed auto
mpls ip
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
************* R3******
ip vrf A
rd 11:11
route-target export 11:11
route-target import 11:11
!
interface FastEthernet1/0
ip vrf forwarding A
ip address 12.0.0.3 255.255.255.0
router-id 33.33.33.33
network 12.0.0.3 0.0.0.0 area 2
interface Loopback0
ip address 3.3.3.3 255.255.255.255
interface FastEthernet0/0
ip address 172.16.0.3 255.255.255.0
duplex auto
speed auto
mpls ip
router ospf 1
network 3.3.3.3 0.0.0.0 area 0
network 172.16.0.0 0.0.255.255 area 0
*************MP-BGP ************
interface Loopback0
ip address 3.3.3.3 255.255.255.255
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
____________________________________________________________________________
_____________________________________________________________________________
RIB- Routing Information Base R1
We will keep eye on 3.3.3.3/32
R1#sh ip route
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 192.168.0.2, 06:04:18, FastEthernet1/0
3.0.0.0/32 is subnetted, 1 subnets
O 3.3.3.3 [110/3] via 192.168.0.2, 06:04:18, FastEthernet1/0
172.16.0.0/24 is subnetted, 1 subnets
O 172.16.0.0 [110/2] via 192.168.0.2, 06:04:18, FastEthernet1/0
192.168.0.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.0.0/24 is directly connected, FastEthernet1/0
L 192.168.0.1/32 is directly connected, FastEthernet1/0
R1#sh ip cef
Prefix Next Hop Interface
0.0.0.0/0 no route
0.0.0.0/8 drop
0.0.0.0/32 receive
1.1.1.1/32 receive Loopback0
2.2.2.2/32 192.168.0.2 FastEthernet1/0
3.3.3.3/32 192.168.0.2 FastEthernet1/0
127.0.0.0/8 drop
172.16.0.0/24 192.168.0.2 FastEthernet1/0
192.168.0.0/24 attached FastEthernet1/0
CEF is mendatory to function MPLS. CEF is the only switching method which provide label to a prefix
3.3.3.3/32, epoch 0
local label info: global/16
1 RR source [no flags]
nexthop 192.168.0.2 FastEthernet1/0 label 16
LIB - Label Information Base R1
R1#sh mpls ldp bindings
lib entry: 1.1.1.1/32, rev 2
local binding: label: imp-null
remote binding: lsr: 2.2.2.2:0, label: 17
lib entry: 2.2.2.2/32, rev 8
local binding: label: 17
remote binding: lsr: 2.2.2.2:0, label: imp-null
lib entry: 3.3.3.3/32, rev 6
local binding: label: 16
remote binding: lsr: 2.2.2.2:0, label: 16
lib entry: 172.16.0.0/24, rev 10
local binding: label: 18
remote binding: lsr: 2.2.2.2:0, label: imp-null
lib entry: 192.168.0.0/24, rev 4
local binding: label: imp-null
remote binding: lsr: 2.2.2.2:0, label: imp-null
LFIB- Label Forwarding Information Base R1
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
17 Pop Label 2.2.2.2/32 0 Fa1/0 192.168.0.2
18 Pop Label 172.16.0.0/24 0 Fa1/0 192.168.0.2
19 No Label 10.0.0.0/24[V] 3178 aggregate/B
21 No Label 10.0.0.0/24[V] 0 aggregate/A
25 No Label 4.4.4.4/32[V] 684 Fa0/1 10.0.0.4
27 No Label 5.5.5.5/32[V] 0 Fa0/0 10.0.0.5
R1#
R2#sh mpls ldp bindings
local binding: label: 16
remote binding: lsr: 3.3.3.3:0, label: imp-null
remote binding: lsr: 1.1.1.1:0, label: 16
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
No comments:
Post a Comment