Initial configuration , very basic with no MPLS, connectivity only to directly connected interfaces.
R1 | R2 | R3 | R4 |
! | ! | ! | ! |
adding to the following configuration MPLS labels we will start with default label distribution protocol (on most new IOS’s LDP is the default) you can verify your IOS default
R2(config)#mpls label protocol ?ldp Use LDP (default)
tdp Use TDP
now I have enabled on R3 and R4 under all the interfaces MPLS label distribution after I have verified that both are using the LDP by default see example:
R4(config)#int f0/0R4(config-if)#mp
R4(config-if)#mpls ip
R4(config-if)#int s1/0
R4(config-if)#mpls ip
R4(config-if)#exitR4(config)#mplR4(config)#mpls ip====================R3(config)#mpls ipR3(config)#int f0/0R3(config-if)#mpls ip
R3(config-if)#int s1/0
R3(config-if)#mpls ip
And I would like to verify LDP has been established correctly
# I see interfaces are configured properlyR3#sh mpls interfacesInterface IP Tunnel BGP Static OperationalFastEthernet0/0 Yes (ldp) No No No YesSerial1/0 Yes (ldp) No No No Yes# But No neighbor???!R3#sh mpls ldp neighbor# see below local LDP id and recived LDP id!!! I do not have a route!R3#sh mpls ldp discoveryLocal LDP Identifier:3.3.3.3:0Discovery Sources:Interfaces:FastEthernet0/0 (ldp): xmitSerial1/0 (ldp): xmit/recvLDP Id: 4.4.4.4:0; no routeR3#=============================================#also I can do debug and see, notice below to the connection attempt to openR4#debug mpls ldp transport events00:25:43: ldp: Send ldp hello; Serial1/0, src/dst 10.0.43.4/224.0.0.2, inst_id 000:25:43: ldp: Rcvd ldp hello; Serial1/0, from 10.0.43.3 (3.3.3.3:0), intf_id 0, opt 0xC00:25:43: ldp: ldp Hello from 10.0.43.3 (3.3.3.3:0) to 224.0.0.2, opt 0xC
00:25:43: ldp: local idb = Serial1/0, holdtime = 15000, peer 10.0.43.3 holdtime = 1500000:25:43: ldp: Link intvl min cnt = 2, intvl = 5000, idb = Serial1/000:25:43: ldp: Opening ldp conn; adj 0x63D88708, 4.4.4.4 <-> 3.3.3.300:25:43: ldp: No route to peer 3.3.3.3; set LDP_CTX_HANDLE_ROUTEUP=============================================# as soon as I am setting up a ip route routers for the loopback interfaceR4(config)#ip route 3.3.3.3 255.255.255.255 10.0.43.3R3(config)#ip route 4.4.4.4 255.255.255.255 10.0.43.4R3(config)#00:56:41: tagcon: Assign peer id; 4.4.4.4:0: id 000:56:41: %LDP-5-NBRCHG: LDP Neighbor 4.4.4.4:0 is UP
00:56:41: tagcon: peer 4.4.4.4:0 (pp 0x63D6E478): advertise 10.0.31.300:56:41: tagcon: peer 4.4.4.4:0 (pp 0x63D6E478): advertise 10.0.43.300:56:41: tagcon: peer 4.4.4.4:0 (pp 0x63D6E478): advertise 3.3.3.300:56:41: tagcon: peer 4.4.4.4:0 (pp 0x63D6E478): advertise 3.3.3.3/32, label 3 (imp-null) (#2)00:56:41: tagcon: peer 4.4.4.4:0 (pp 0x63D6E478): advertise 10.0.31.0/24, label 3 (imp-null) (#4)00:56:41: tagcon: peer 4.4.4.4:0 (pp 0x63D6E478): advertise 10.0.43.0/24, label 3 (imp-null) (#6)00:56:41: tagcon: peer 4.4.4.4:0 (pp 0x63D6E478): advertise 4.4.4.4/32, label 1000 (#8)00:56:41: tagcon: Allocating address 10.0.42.4 advertised by LDP router-id 4.4.4.4R3(config)#00:56:41: tagcon: Allocating address 10.0.43.4 advertised by LDP router-id 4.4.4.400:56:41: tagcon: Allocating address 4.4.4.4 advertised by LDP router-id 4.4.4.4R4(config)#^ZR4#un all00:56:40: %LDP-5-NBRCHG: LDP Neighbor 3.3.3.3:0 is UP
00:56:41: %SYS-5-CONFIG_I: Configured from console by console
Now notice as after the LDP has been established using multicast UDP a TCP session is created (similar to BGP) sourced from high port to TCP port 646
R4#sh mpls ldp neighborPeer LDP Ident: 3.3.3.3:0; Local LDP Ident 4.4.4.4:0TCP connection: 3.3.3.3.646 - 4.4.4.4.11586State: Oper; Msgs sent/rcvd: 10/10; DownstreamUp time: 00:02:36LDP discovery sources:Serial1/0, Src IP addr: 10.0.43.3Addresses bound to peer LDP Ident:
10.0.31.3 10.0.43.3 3.3.3.3
you can see above the TCP connection parameters, using the loopback interfaces from 4.4.4.4 to 3.3.3.3
next step to allow end to end connectivity and avoid to have and setup multiple static route statements, I have configured OSPF under all 4 routers:
!router ospf 1router-id <loopbcak_ip>log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0!
And verified I have end to end connectivity:
R2#ping 1.1.1.1 source lo0Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 36/44/56 msR2#
Now you ask where is the MPLS here, you have done a simple OSPF setup and that is true, basic MPLS such as that have no benefit, however that is the basic, I do not want to show the complex before we all understand the first step.
So here is my LFIB label forwarding information base:
R2#sh mpls forwarding-tableLocal Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface17 1002 10.0.31.0/24 0 Fa0/0 10.0.42.418 1003 1.1.1.1/32 0 Fa0/0 10.0.42.419 1000 3.3.3.3/32 0 Fa0/0 10.0.42.420 Pop tag 4.4.4.4/32 0 Fa0/0 10.0.42.421 Pop tag 10.0.43.0/24 0 Fa0/0 10.0.42.4
each router is building such a table according to the LDP information received and sent.
What is the information you see? Local tag this are the local generated tags used to generate downstream away from the destination, the outgoing tag is used for the upstream labeling to the destination, you cab also see how much bytes of label switching was done, very informative.
Note: I normally like to modify the range of labeling just to sort the table for my self see below.
R4(config)#mpls label range 1000 2000
the default is:
R2#sh mpls label rangeDownstream Generic label region: Min/Max label: 16/100000
last issue, you saw from above that the byte counter on R2 is 0 but you remember I did a connectivity check end to end from R2 to R1, so why did it not show as increased?! PHP (not the programming language) penultimate hop popping a long name for short task.
R4#sh mpls forwarding-tableLocal Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface1000 Pop Label 3.3.3.3/32 0 Se1/0 point2point1001 Pop Label 2.2.2.2/32 1140 Fa0/0 10.0.42.21002 Pop Label 10.0.31.0/24 0 Se1/0 point2point1003 1001 1.1.1.1/32 1080 Se1/0 point2pointR4#
when I sent ping from 2.2.2.2 to 1.1.1.1 R2 pushed label 1003 to the echo request R4 received 1003 and swap with 1001
R3#sh mpls forwarding-tableLocal Outgoing Prefix Bytes Label Outgoing Next Hop
Label Label or VC or Tunnel Id Switched interface1000 Pop Label 4.4.4.4/32 0 Se1/0 point2point1001 Pop Label 1.1.1.1/32 1140 Fa0/0 10.0.31.11002 Pop Label 10.0.42.0/24 0 Se1/0 point2point1003 1001 2.2.2.2/32 1080 Se1/0 point2point
R3 received 1001 POP the label and sent to R1
as you can see R1 byte counters are also clean. R1 received normal ip with icmp echo request, replaying with echo replay now pushing 1003 and R3 swapping 1003 to 1001 and finally R4 popping 1001 sending normal echo replay to R2R1#sh mpls forwarding-tableLocal Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface16 1003 2.2.2.2/32 0 Fa0/0 10.0.31.317 Pop tag 3.3.3.3/32 0 Fa0/0 10.0.31.318 Pop tag 10.0.43.0/24 0 Fa0/0 10.0.31.319 1000 4.4.4.4/32 0 Fa0/0 10.0.31.320 1002 10.0.42.0/24 0 Fa0/0 10.0.31.3
R2#ping 1.1.1.1 source lo0 repeat 1Type escape sequence to abort.Sending 1, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!Success rate is 100 percent (1/1), round-trip min/avg/max = 64/64/64 msR2#R4#01:46:35: MPLS turbo: Fa0/0: rx: Len 118 Stack {1003 0 255} - ipv4 data
01:46:35: MPLS turbo: Se1/0: tx: Len 108 Stack {1001 0 254} - ipv4 data
01:46:35: MPLS turbo: Se1/0: rx: Len 108 Stack {1001 0 254} - ipv4 data
R4#R3#01:46:35: MPLS turbo: Se1/0: rx: Len 108 Stack {1001 0 254} - ipv4 data
01:46:35: MPLS turbo: Fa0/0: rx: Len 118 Stack {1003 0 255} - ipv4 data
01:46:35: MPLS turbo: Se1/0: tx: Len 108 Stack {1001 0 254} - ipv4 data
R3#R1#deb ip pack de*Mar 1 01:39:04.799: IP: s=2.2.2.2 (FastEthernet0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 01:39:04.803: ICMP type=8, code=0*Mar 1 01:39:04.803: ICMP: echo reply sent, src 1.1.1.1, dst 2.2.2.2*Mar 1 01:39:04.803: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), routed via FIB*Mar 1 01:39:04.803: IP: s=1.1.1.1 (local), d=2.2.2.2 (FastEthernet0/0), len 100, sending
*Mar 1 01:39:04.803: ICMP type=0, code=0
I hope that was helpful, I would like you to try it for your self so again here is my basic GNS setup:
autostart = False[127.0.0.1:7200]workingdir = C:\Users\shiran\AppData\Local\Tempudp = 10000[[3640]]image = E:\ Root\SOFTWARE\CISCO\c3640-jk9o3s-mz.124-16.binidlepc = 0x605ac320ghostios = Truechassis = 3640[[ROUTER R1]]model = 3640console = 2000aux = 2100cnfg = R1.cfgslot0 = NM-1FE-TXf0/0 = R3 f0/0x = -533.0y = -198.0[[ROUTER R2]]model = 3640console = 2001aux = 2101cnfg = R2.cfgslot0 = NM-1FE-TXf0/0 = R4 f0/0x = 227.0y = -202.0[127.0.0.1:7201]workingdir = C:\Users\shiran\AppData\Local\Tempudp = 10100[[7200]]image = E:\ Root\SOFTWARE\CISCO\c7200-k91p-mz.122-25.S15.binidlepc = 0x608ca290ghostios = True[[ROUTER R4]]console = 2004cnfg = C:\Program Files (x86)\GNS3\R4.cfg
slot0 = C7200-IO-2FEf0/0 = R2 f0/0slot1 = PA-4T+s1/0 = R3 s1/0x = -31.0y = -87.0[[ROUTER R3]]console = 2003cnfg = C:\Program Files (x86)\GNS3\R3.cfg
slot0 = C7200-IO-2FEf0/0 = R1 f0/0slot1 = PA-4T+s1/0 = R4 s1/0x = -271.0y = -87.0[GNS3-DATA]configs = C:\Program Files (x86)\GNS3
[[NOTE 1]]text = s1/0x = -6.86874660092y = 25.2377529973interface = R4 s1/0[[NOTE 2]]text = f0/0x = 69.5349221487y = 5.71505408099interface = R4 f0/0[[NOTE 3]]text = s1/0x = 72.8687466009y = 18.7622470027interface = R3 s1/0[[NOTE 4]]text = f0/0x = -3.83092469005y = 6.39605862368interface = R3 f0/0[[NOTE 5]]text = f0/0x = -6.99933176856y = 21.7687899898interface = R2 f0/0[[NOTE 6]]text = f0/0x = 72.9993317686y = 22.2312100102interface = R1 f0/0
3 comments:
Hello thx for the step by step setup
I don't see where have you issue the command mpls ip on R2 interface
and according to the output R2 as a mpls forwarding-table
You are correct, I didn't show you explicitly that I have entered the mpls ip, I apologize if that was confusing however I did enable MPLS on all 4 routers as my goal was to show you
1) LDP neighbor relationship
2) LDP POP/PUSH/SWAP and PHP
Next time I will probably be more explicit, so thank you :-)
Thanks for your analysis and easy-to-understand breakdown.
Post a Comment