Summary:
This article provides configuration details about the basic LDP tunneling over RSVP and the label walk.
Solution:
In the described topology, RSVP LSP is configured between PE1 and PE2. We will configure LDP on the routers R1, PE1, PE2 and R2. PE1 and PE2 will form Targeted LDP over the existing RSVP LSP.
Configuration:
R1:
set interfaces ge-0/0/0 unit 0 family inet address 172.16.10.1/30
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.1.1.1/32
set protocols mpls interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface lo0.0
PE1:
set interfaces ge-0/0/1 unit 0 family inet address 10.10.12.1/30
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/3 unit 0 family inet address 172.16.10.2/30
set interfaces ge-0/0/3 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.1.1.2/32
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/3.0
set protocols mpls label-switched-path To-PE2 to 10.1.1.5
set protocols mpls label-switched-path To-PE2 ldp-tunneling >>>>>>>>> This enables the LSP to be used for LDP Tunneling
set protocols mpls label-switched-path To-PE2 no-cspf
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/3.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/3.0
set protocols ldp interface ge-0/0/3.0
set protocols ldp interface lo0.0 >>>>>>>>>>>>>>>>>>> LDP needs to be enabled on the loopback interface
P1:
set interfaces ge-0/0/1 unit 0 family inet address 10.10.12.2/30
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 10.10.23.1/30
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.1.1.3/32
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/2.0
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
P2:
set interfaces ge-0/0/1 unit 0 family inet address 10.10.34.1/30
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces ge-0/0/2 unit 0 family inet address 10.10.23.2/30
set interfaces ge-0/0/2 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.1.1.4/32
set protocols rsvp interface ge-0/0/2.0
set protocols rsvp interface ge-0/0/1.0
set protocols mpls interface ge-0/0/2.0
set protocols mpls interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/2.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0
PE2:
set interfaces ge-0/0/0 unit 0 family inet address 172.16.20.1/30
set interfaces ge-0/0/0 unit 0 family mpls
set interfaces ge-0/0/1 unit 0 family inet address 10.10.34.2/30
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.1.1.5/32
set protocols rsvp interface ge-0/0/1.0
set protocols rsvp interface ge-0/0/0.0
set protocols mpls label-switched-path To-PE1 to 10.1.1.2
set protocols mpls label-switched-path To-PE1 ldp-tunneling
set protocols mpls label-switched-path To-PE1 no-cspf
set protocols mpls interface ge-0/0/1.0
set protocols mpls interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ldp interface ge-0/0/0.0
set protocols ldp interface lo0.0
R2:
set interfaces ge-0/0/1 unit 0 family inet address 172.16.20.2/30
set interfaces ge-0/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.1.1.6/32
set protocols mpls interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ldp interface ge-0/0/1.0
set protocols ldp interface lo0.0
Output:
lab@PE1# run show rsvp session
Jan 18 19:53:09
Ingress RSVP: 1 sessions
To From State Rt Style Labelin Labelout LSPname
10.1.1.5 10.1.1.2 Up 0 1 FF - 299936 To-PE2 >>>>>>>>>>>>>>> RSVP LSP is UP between PE1 and PE2.
Total 1 displayed, Up 1, Down 0
Egress RSVP: 1 sessions
To From State Rt Style Labelin Labelout LSPname
10.1.1.2 10.1.1.5 Up 0 1 FF 3 - To-PE1
Total 1 displayed, Up 1, Down 0
lab@R1# run show ldp neighbor
Jan 18 19:52:12
Address Interface Label space ID Hold time
172.16.10.2 ge-0/0/0.0 10.1.1.2:0 14
lab@PE1# run show ldp neighbor
Jan 18 19:52:56
Address Interface Label space ID Hold time
10.1.1.5 lo0.0 10.1.1.5:0 32
172.16.10.1 ge-0/0/3.0 10.1.1.1:0 14
[edit]
lab@PE1# run show ldp neighbor extensive
Jan 18 19:52:58
Address Interface Label space ID Hold time
10.1.1.5 lo0.0 10.1.1.5:0 42
Transport address: 10.1.1.5, Configuration sequence: 5
Up for 00:05:19
Reference count: 2
Hold time: 45, Proposed local/peer: 45/45
Hello interval: 15
Hello flags: targeted, request send targeted >>>>>>>>>>>>>>>>>>>>>> Targeted LDP between PE1 and PE2
Neighbor types: configured-tunneled
Address Interface Label space ID Hold time
172.16.10.1 ge-0/0/3.0 10.1.1.1:0 12
Transport address: 10.1.1.1, Configuration sequence: 12
Up for 00:05:22
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
lab@R1>show route table inet.3
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.2/32 *[LDP/9] 00:04:24, metric 1
> to 172.16.10.2 via ge-0/0/0.0
10.1.1.5/32 *[LDP/9] 00:04:24, metric 1
> to 172.16.10.2 via ge-0/0/0.0, Push 299920
10.1.1.6/32 *[LDP/9] 00:04:24, metric 1
> to 172.16.10.2 via ge-0/0/0.0, Push 299936
lab@PE1>show route table inet.3
inet.3: 4 destinations, 7 routes (3 active, 0 holddown, 3 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.1/32 *[LDP/9] 00:05:14, metric 1
> to 172.16.10.1 via ge-0/0/3.0
10.1.1.5/32 *[RSVP/7/1] 00:25:41, metric 3
> to 10.10.12.2 via ge-0/0/1.0, label-switched-path To-PE2
[LDP/9] 00:05:11, metric 1
> to 10.10.12.2 via ge-0/0/1.0, label-switched-path To-PE2
10.1.1.6/32 *[LDP/9] 00:05:11, metric 1
> to 10.10.12.2 via ge-0/0/1.0, label-switched-path To-PE2
Similar output is observed on PE2 and R2.
lab@R1# run ping mpls ldp 10.1.1.6
Jan 18 20:05:35
!!!!!
--- lsping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
Label walk:
lab@R1# run ping 10.1.1.6 source 10.1.1.1 rapid
Jan 18 20:25:05
PING 10.1.1.6 (10.1.1.6): 56 data bytes
!!!!!
--- 10.1.1.6 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max/stddev = 4.860/5.260/5.706/0.298 ms
lab@R1# run show route 10.1.1.6
Jan 18 20:06:19
inet.0: 13 destinations, 13 routes (13 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.6/32 *[OSPF/10] 00:39:44, metric 5
> to 172.16.10.2 via ge-0/0/0.0
inet.3: 3 destinations, 3 routes (3 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.1.1.6/32 *[LDP/9] 00:18:41, metric 1
> to 172.16.10.2 via ge-0/0/0.0, Push 299936
LDP Label 299936 is pushed to reach 10.1.1.6
---
lab@PE1# run show route table mpls.0 label 299936 detail
Jan 18 20:11:39
mpls.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
299936 (1 entry, 1 announced)
*LDP Preference: 9
Next hop type: Router, Next hop index: 568
Address: 0x95711c8
Next-hop reference count: 2
Next hop: 10.10.12.2 via ge-0/0/1.0, selected
Label-switched-path To-PE2
Label operation: Swap 299904, Push 299936(top)
Label TTL action: prop-ttl, prop-ttl(top)
Load balance label: Label 299904: None; Label 299936: None;
Session Id: 0x1
State: <Active Int NhAckRequest>
Age: 23:58 Metric: 1
Validation State: unverified
Task: LDP
Announcement bits (1): 0-KRT
AS path: I
Prefixes bound to route: 10.1.1.6/32
Upon receiving label 299936, PE1 router swaps the LDP label with 299904 and adds RSVP label 299936 on top of the LDP label, sends it to 10.10.12.2
---
lab@P1# run show route table mpls.0 label 299936 detail
Jan 18 20:00:47
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
299936 (1 entry, 1 announced)
*RSVP Preference: 7/1
Next hop type: Router, Next hop index: 547
Address: 0x95c9af8
Next-hop reference count: 2
Next hop: 10.10.23.2 via ge-0/0/2.0, selected
Label-switched-path To-PE2
Label operation: Swap 299936
Load balance label: Label 299936: None;
Session Id: 0x2
State: <Active Int AckRequest Accounting>
Age: 40:40 Metric: 1
Validation State: unverified
Task: RSVP
Announcement bits (1): 0-KRT
AS path: I
P1 receives label 299936, swaps the RSVP label with 299936 (LDP label remain unchanged at the bottom) and send it to 10.10.23.2.
---
lab@P2# run show route table mpls.0 label 299936 detail
Jan 18 19:39:19
mpls.0: 9 destinations, 9 routes (9 active, 0 holddown, 0 hidden)
299936 (1 entry, 1 announced)
*RSVP Preference: 7/1
Next hop type: Router, Next hop index: 554
Address: 0x9571c9c
Next-hop reference count: 2
Next hop: 10.10.34.2 via ge-0/0/1.0, selected
Label-switched-path To-PE2
Label operation: Pop
Load balance label: None;
Session Id: 0x2
State: <Active Int AckRequest Accounting>
Age: 35:21 Metric: 1
Validation State: unverified
Task: RSVP
Announcement bits (1): 0-KRT
AS path: I
299936(S=0) (1 entry, 1 announced)
*RSVP Preference: 7/1
Next hop type: Router, Next hop index: 555
Address: 0x9571dec
Next-hop reference count: 2
Next hop: 10.10.34.2 via ge-0/0/1.0, selected
Label-switched-path To-PE2
Label operation: Pop
Load balance label: None;
Session Id: 0x2
State: <Active Int AckRequest Accounting>
Age: 35:21 Metric: 1
Validation State: unverified
Task: RSVP
Announcement bits (1): 0-KRT
AS path: I
P2 receives label 299936, pops the RSVP label and sends the remaining packet (LDP label 299904 along with the data) to 10.10.34.2.
---
lab@PE2# run show route table mpls.0 label 299904 detail
Jan 18 20:11:06
mpls.0: 10 destinations, 10 routes (10 active, 0 holddown, 0 hidden)
299904 (1 entry, 1 announced)
*LDP Preference: 9
Next hop type: Router, Next hop index: 565
Address: 0x95562d8
Next-hop reference count: 2
Next hop: 172.16.20.2 via ge-0/0/0.0, selected
Label operation: Pop
Load balance label: None;
Session Id: 0x2
State: <Active Int>
Age: 23:27 Metric: 1
Validation State: unverified
Task: LDP
Announcement bits (1): 0-KRT
AS path: I
Prefixes bound to route: 10.1.1.6/32
299904(S=0) (1 entry, 1 announced)
*LDP Preference: 9
Next hop type: Router, Next hop index: 566
Address: 0x9556188
Next-hop reference count: 2
Next hop: 172.16.20.2 via ge-0/0/0.0, selected
Label operation: Pop
Load balance label: None;
Session Id: 0x2
State: <Active Int>
Age: 23:27 Metric: 1
Validation State: unverified
Task: LDP
Announcement bits (1): 0-KRT
AS path: I
PE2 receives LDP label 299904, pops the LDP label and sends the data to R2.