MPLS – basic configuration with IOS
MPLS – sounds overwhelming? Well, it shouldn't be! Here how simple it can be:
Let’s consider a very basic but fully functional RFC 2547 BGP MPLS VPN. Here we have two routers R1 and R5, and both run Cisco IOS (12.4).
R1 [Gi0/0] --- [Fa0/1] R5
The first step is to enable “mpls ip”
Next, it’s a good idea to specify LDP as the label protocol (it is the default, but we do this for “completeness”)
R5#show run | i mpls
mpls label protocol ldp
We also have to enable “mpls ip” under the interfaces that will particpate (Gi0/0 and Fa0/0 in our case).
Now, let’s work on the VRF – we’ll call it “blue” here in our example:
ip vrf blue
rd 100:10
route-target export 100:10
route-target import 100:10
The syntax varies with a 2821 router:
vrf definition blue
rd 100:10
!
address-family ipv4
route-target export 100:10
route-target import 100:10
exit-address-family
!
At this point the LDP adjacency should form, but it didn’t! What happened?
On R5, LDP associated itself with a Loopback address that was not reachable from R1. Therefore we specify a LDP router-id:
R5(config)#mpls ldp router-id fastEthernet 0/1 force
R5#show mpls ldp discovery
Local LDP Identifier:
10.4.1.1:0
Discovery Sources:
Interfaces:
FastEthernet0/0 (ldp): xmit
FastEthernet0/1 (ldp): xmit/recv
LDP Id: 200.200.200.200:0
R5#show mpls ldp neigh
Peer LDP Ident: 10.4.1.2:0; Local LDP Ident 10.4.1.1:0
TCP connection: 10.4.1.2.27911 - 10.4.1.1.646
State: Oper; Msgs sent/rcvd: 40/46; Downstream
Up time: 00:00:14
LDP discovery sources:
FastEthernet0/1, Src IP addr: 10.4.1.2
Addresses bound to peer LDP Ident:
10.4.1.2 10.4.1.4 172.16.1.2 192.168.100.1
10.10.10.254 192.168.254.1 192.168.254.193 10.10.10.10
10.0.0.1 10.200.200.1 13.0.0.1 192.168.10.1
192.168.11.11 12.0.0.1 200.200.200.200 10.5.13.1
16.0.0.1 172.16.50.1 10.4.1.3 10.88.47.1
Ah! We have an adjacency now.
R1#show mpls ldp neighbor
Peer LDP Ident: 10.4.1.1:0; Local LDP Ident 10.4.1.2:0
TCP connection: 10.4.1.1.646 - 10.4.1.2.27911
State: Oper; Msgs sent/rcvd: 46/40; Downstream
Up time: 00:00:07
LDP discovery sources:
GigabitEthernet0/0, Src IP addr: 10.4.1.1
Addresses bound to peer LDP Ident:
10.7.1.1 10.7.1.5 10.4.1.1 172.16.5.5
10.9.1.1 192.168.55.5 55.0.0.55 60.0.0.5
172.16.50.5 1.1.1.1
We can now check LDP bindings:
Show mpls ldp bindings
Show mpls forwarding-table
Next, we configure BPG vpnv4 address-family thusly:
address-family vpnv4
neighbor 10.4.1.1 activate
neighbor 10.4.1.1 send-community extended
exit-address-family
!
address-family ipv4 vrf blue
redistribute connected
no synchronization
network 172.16.100.0 mask 255.255.255.0
exit-address-family
!
Here we verify the BGP speakers are exchanging VRF blue routes:
R1#show ip bgp vpnv4 vrf blue
BGP table version is 7, local router ID is 200.200.200.200
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: 100:10 (default for vrf blue)
*> 172.16.100.0/24 0.0.0.0 0 32768 i
*> 172.16.105.0/24 10.4.1.1 0 0 65005 i
We can examine the labels:
R1#show ip bgp vpnv4 vrf blue labels
Network Next Hop In label/Out label
Route Distinguisher: 100:10 (blue)
172.16.100.0/24 0.0.0.0 22/nolabel(blue)
172.16.105.0/24 10.4.1.1 nolabel/27
Let's debug and observe:
debug mpls packet
R1#
1281051: Jan 16 13:17:27: MPLS les: Gi0/0: rx: Len 118 Stack {22 0 255} - ipv4 data
1281052: Jan 16 13:17:27: MPLS les: Gi0/0: rx: Len 118 Stack {22 0 255} - ipv4 data
1281053: Jan 16 13:17:27: MPLS les: Gi0/0: rx: Len 118 Stack {22 0 255} - ipv4 data
1281054: Jan 16 13:17:27: MPLS les: Gi0/0: rx: Len 118 Stack {22 0 255} - ipv4 data
1281055: Jan 16 13:17:27: MPLS les: Gi0/0: rx: Len 118 Stack {22 0 255} - ipv4 data
Monday, January 16, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment