In this Lab, I am using GNS3 to redroduce the book "MPLS Configuration on Cisco IOS Software" p34 Figure 2-1 Lab.
Scenario:
This is a provider network.
R1 & R4 are the Provider Edge (PE) routers.
R2 & R3 are the Provider (P) routers.
I will using OSPF to implement frame-mode MPLS on this provider network.
Configuration steps
1. Enable CEF
2. Configure IGP Routing Protocol
3. Define Label Distribution Protocol (Optional)
4. Setting Label Range (Optional)
5. Assign LDP Router ID (Optional)
6. Configure MPLS on the Interface
1. Enable CEF
R1:
R1(config)#ip cef
!-- Enable CEF on the interface (Default is enbaled)
R1(config)#interface serial 1/0
R1(config-if)#ip route-cache cef
R2:
R2(config)#ip cef
!
R2(config)#interface serial 1/0
R2(config-if)#ip route-cache cef
!
R2(config)#interface serial 1/1
R2(config-if)#ip route-cache cef
R3:
R3(config)#ip cef
!
R3(config)#interface serial 1/1
R3(config-if)#ip route-cache cef
!
R3(config)#interface serial 1/0
R3(config-if)#ip route-cache cef
R4:
R4(config)#ip cef
!
R4(config)#interface serial 1/0
R4(config-if)#ip route-cache cef
2. Configure IGP Routing Protocol
R1:
R1(config)#router ospf 100
R1(config-router)#router-id 10.10.10.101
R1(config-router)#network 10.10.10.101 0.0.0.0 area 0
R1(config-router)#network 10.10.10.1 0.0.0.0 area 0
R2:
R2(config)#router ospf 100
R2(config-router)#router-id 10.10.10.102
R2(config-router)#network 10.10.10.102 0.0.0.0 area 0
R2(config-router)#network 10.10.10.2 0.0.0.0 area 0
R2(config-router)#network 10.10.10.5 0.0.0.0 area 0
R3:
R3(config)#router ospf 100
R3(config-router)#router-id 10.10.10.103
R3(config-router)#network 10.10.10.103 0.0.0.0 area 0
R3(config-router)#network 10.10.10.6 0.0.0.0 area 0
R3(config-router)#network 10.10.10.9 0.0.0.0 area 0
R4:
R4(config)#router ospf 100
R4(config-router)#router-id 10.10.10.104
R4(config-router)#network 10.10.10.104 0.0.0.0 area 0
R4(config-router)#network 10.10.10.10 0.0.0.0 area 0
3. Define Label Distribution Protocol (Optional)
R1:
R1(config)#mpls label protocol ldp
R2:
R2(config)#mpls label protocol ldp
R3:
R3(config)#mpls label protocol ldp
R4:
R4(config)#mpls label protocol ldp
4. Setting Label Range (Optional)
R1:
!--To configure the size of the R1 local label space using a minimum of 100 and a maximum of 199.
R1(config)#mpls label range 100 199
R2:
R2(config)#mpls label range 200 299
R3:
R3(config)#mpls label range 300 399
R4:
R4(config)#mpls label range 400 499
5. Assign LDP Router ID (Optional)
R1:
R1(config)#mpls ldp router-id loopback 0 force
R2:
R2(config)#mpls ldp router-id loopback 0 force
R3:
R3(config)#mpls ldp router-id loopback 0 force
R4:
R4(config)#mpls ldp router-id loopback 0 force
6. Configure MPLS on the Interface
R1:
R1(config)#interface serial 1/0
R1(config-if)#mpls ip
R2:
R2(config)#interface serial 1/0
R2(config-if)#mpls ip
!
R2(config)#interface serial 1/1
R2(config-if)#mpls ip
R3:
R3(config)#interface serial 1/0
R3(config-if)#mpls ip
!
R3(config)#interface serial 1/1
R3(config-if)#mpls ip
R4:
R4(config)#interface serial 1/0
R4(config-if)#mpls ip
Check:
1. Verify CEF is enabled on interfaces
R1#show cef interface serial 1/0
Serial1/0 is up (if_number 5)
Corresponding hwidb fast_if_number 5
Corresponding hwidb firstsw->if_number 5
Internet address is 10.10.10.1/30
ICMP redirects are never sent
Per packet load-sharing is disabled
IP unicast RPF check is disabled
IP policy routing is disabled
BGP based policy accounting on input is disabled
BGP based policy accounting on output is disabled
Interface is marked as point to point interface
Hardware idb is Serial1/0
Fast switching type 4, interface type 70
IP CEF switching enabled
IP CEF switching turbo vector
IP CEF turbo switching turbo vector
IP prefix lookup IPv4 mtrie 8-8-8-8 optimized
Input fast flags 0x0, Output fast flags 0x0
ifindex 5(5)
Slot Slot unit 0 VC -1
IP MTU 1500
R1#
2. Verify MPLS forwarding is enabled on the interfaces
R2#show mpls interfaces
Interface IP Tunnel BGP Static Operational
Serial1/0 Yes (ldp) No No No Yes
Serial1/1 Yes (ldp) No No No Yes
R2#
3. Display sources for locally generated LDP Discovery Hello PDUs
R2#show mpls ldp discovery
Local LDP Identifier:
10.10.10.102:0
Discovery Sources:
Interfaces:
Serial1/0 (ldp): xmit/recv
LDP Id: 10.10.10.101:0
Serial1/1 (ldp): xmit/recv
LDP Id: 10.10.10.103:0
R2#
4. verify the status of the LDP neighbor sessions.
R2#show mpls ldp neighbor
Peer LDP Ident: 10.10.10.101:0; Local LDP Ident 10.10.10.102:0
TCP connection: 10.10.10.101.646 - 10.10.10.102.62122
State: Oper; Msgs sent/rcvd: 17/17; Downstream
Up time: 00:06:30
LDP discovery sources:
Serial1/0, Src IP addr: 10.10.10.1
Addresses bound to peer LDP Ident:
10.10.10.1 10.10.10.101
Peer LDP Ident: 10.10.10.103:0; Local LDP Ident 10.10.10.102:0
TCP connection: 10.10.10.103.63314 - 10.10.10.102.646
State: Oper; Msgs sent/rcvd: 17/17; Downstream
Up time: 00:06:24
LDP discovery sources:
Serial1/1, Src IP addr: 10.10.10.6
Addresses bound to peer LDP Ident:
10.10.10.9 10.10.10.103 10.10.10.6
R2#
5. Control Plane
R2#show mpls ldp bindings
lib entry: 10.10.10.0/30, rev 7
local binding: label: imp-null
remote binding: lsr: 10.10.10.101:0, label: imp-null
remote binding: lsr: 10.10.10.103:0, label: 303
lib entry: 10.10.10.4/30, rev 8
local binding: label: imp-null
remote binding: lsr: 10.10.10.101:0, label: 101
remote binding: lsr: 10.10.10.103:0, label: imp-null
lib entry: 10.10.10.8/30, rev 17
local binding: label: 206
remote binding: lsr: 10.10.10.103:0, label: imp-null
remote binding: lsr: 10.10.10.101:0, label: 104
lib entry: 10.10.10.101/32, rev 15
local binding: label: 205
remote binding: lsr: 10.10.10.101:0, label: imp-null
remote binding: lsr: 10.10.10.103:0, label: 302
lib entry: 10.10.10.102/32, rev 9
local binding: label: imp-null
remote binding: lsr: 10.10.10.101:0, label: 100
remote binding: lsr: 10.10.10.103:0, label: 301
lib entry: 10.10.10.103/32, rev 13
local binding: label: 204
remote binding: lsr: 10.10.10.103:0, label: imp-null
remote binding: lsr: 10.10.10.101:0, label: 103
lib entry: 10.10.10.104/32, rev 11
local binding: label: 203
remote binding: lsr: 10.10.10.103:0, label: 300
remote binding: lsr: 10.10.10.101:0, label: 102
R2#
6. Forwarding Table
R1#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
100 Pop Label 10.10.10.102/32 0 Se1/0 point2point
101 Pop Label 10.10.10.4/30 0 Se1/0 point2point
102 203 10.10.10.104/32 0 Se1/0 point2point
103 204 10.10.10.103/32 0 Se1/0 point2point
104 206 10.10.10.8/30 0 Se1/0 point2point
R1#
R2#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
203 300 10.10.10.104/32 0 Se1/1 point2point
204 Pop Label 10.10.10.103/32 0 Se1/1 point2point
205 Pop Label 10.10.10.101/32 0 Se1/0 point2point
206 Pop Label 10.10.10.8/30 0 Se1/1 point2point
R2#
R3#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
300 Pop Label 10.10.10.104/32 0 Se1/0 point2point
301 Pop Label 10.10.10.102/32 0 Se1/1 point2point
302 205 10.10.10.101/32 0 Se1/1 point2point
303 Pop Label 10.10.10.0/30 0 Se1/1 point2point
R3#
R4#show mpls forwarding-table
Local Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or Tunnel Id Switched interface
400 Pop Label 10.10.10.103/32 0 Se1/0 point2point
401 301 10.10.10.102/32 0 Se1/0 point2point
402 302 10.10.10.101/32 0 Se1/0 point2point
403 Pop Label 10.10.10.4/30 0 Se1/0 point2point
404 303 10.10.10.0/30 0 Se1/0 point2point
R4#
7. Ping & Traceroute
R1#ping 10.10.10.104 source loopback 0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.104, timeout is 2 seconds:
Packet sent with a source address of 10.10.10.101
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 328/368/472 ms
R1#
R1#
R1#
R1#
R1#traceroute 10.10.10.104 source loopback 0
Type escape sequence to abort.
Tracing the route to 10.10.10.104
VRF info: (vrf in name/id, vrf out name/id)
1 10.10.10.2 [MPLS: Label 203 Exp 0] 516 msec 368 msec 344 msec
2 10.10.10.6 [MPLS: Label 300 Exp 0] 244 msec 228 msec 252 msec
3 10.10.10.10 368 msec 348 msec 372 msec
R1#
Final Configurations:
R1:
hostname R1
!
ip cef
!
no ip domain lookup
!
mpls label range 100 199
mpls label protocol ldp
!
interface Loopback0
ip address 10.10.10.101 255.255.255.255
!
interface Serial1/0
description Connect to R2 S1/0
ip address 10.10.10.1 255.255.255.252
mpls ip
no shutdown
!
router ospf 100
router-id 10.10.10.101
network 10.10.10.1 0.0.0.0 area 0
network 10.10.10.101 0.0.0.0 area 0
!
mpls ldp router-id Loopback0 force
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
!
end
R2:
hostname R2
!
ip cef
!
no ip domain lookup
!
mpls label range 200 299
mpls label protocol ldp
!
interface Loopback0
ip address 10.10.10.102 255.255.255.255
!
interface Serial1/0
description Connect to R1 S1/0
ip address 10.10.10.2 255.255.255.252
mpls ip
no shutdown
!
interface Serial1/1
description Connect to R3 S1/1
ip address 10.10.10.5 255.255.255.252
mpls ip
no shutdown
!
router ospf 100
router-id 10.10.10.102
network 10.10.10.2 0.0.0.0 area 0
network 10.10.10.5 0.0.0.0 area 0
network 10.10.10.102 0.0.0.0 area 0
!
mpls ldp router-id Loopback0 force
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
!
end
R3:
hostname R3
!
ip cef
!
no ip domain lookup
!
mpls label range 300 399
mpls label protocol ldp
!
interface Loopback0
ip address 10.10.10.103 255.255.255.255
!
interface Serial1/0
description Connect to R4 S1/0
ip address 10.10.10.9 255.255.255.252
mpls ip
no shutdown
!
interface Serial1/1
description Connect to R2 S1/1
ip address 10.10.10.6 255.255.255.252
mpls ip
no shutdown
!
router ospf 100
router-id 10.10.10.103
network 10.10.10.6 0.0.0.0 area 0
network 10.10.10.9 0.0.0.0 area 0
network 10.10.10.103 0.0.0.0 area 0
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
!
end
R4:
hostname R4
!
ip cef
!
no ip domain lookup
!
mpls label range 400 499
mpls label protocol ldp
!
interface Loopback0
ip address 10.10.10.104 255.255.255.255
!
interface Serial1/0
description Connect to R3 S1/0
ip address 10.10.10.10 255.255.255.252
mpls ip
no shutdown
!
router ospf 100
router-id 10.10.10.104
network 10.10.10.10 0.0.0.0 area 0
network 10.10.10.104 0.0.0.0 area 0
!
mpls ldp router-id Loopback0 force
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
!
end
Reference:
1. MPLS Configuration on Cisco IOS Software
http://www.ciscopress.com/store/mpls-configuration-on-cisco-ios-software-paperback-9781587142505
ISBN-10: 1-58714-250-3
ISBN-13: 978-1-58714-250-5
2. Download GNS3 Lab file
http://sync.hamicloud.net/_oops/juilin77/uvh
最初發表 / 最後更新: 2013.12.24 / 2018.06.08
0 comments:
張貼留言