ON THIS PAGE
Example: Configuring LDP Native IPv6 Support
This example shows how to allow the Junos OS Label Distribution Protocol (LDP) to establish the TCP connection over IPv4 with IPv4 neighbors, and over IPv6 with IPv6 neighbors as a single-stack LSR. This helps avoid tunneling of IPv6 over IPv4 MPLS core with IPv4-signaled MPLS label-switched paths (LSPs).
Requirements
This example uses the following hardware and software components:
-
Two MX Series routers
-
Junos OS Release 16.1 or later running on all devices
Before you configure IPv6 as dual-stack, be sure you configure the routing and signaling protocols.
Overview
LDP is supported in an IPv6 only network, and in an IPv6 or IPv4 dual-stack network
as described in RFC 7552. Configure the address family as
inet for IPv4 or inet6 for IPv6. By default,
IPv6 is used as the TCP transport for the LDP session with its peers when both IPv4
and IPv6 are enabled . The dual-transport statement allows Junos LDP to establish
the TCP connection over IPv4 with IPv4 neighbors, and over IPv6 with IPv6 neighbors
as a single-stack LSR. The inet-lsr-id and
inet6-lsr-id are the two LSR IDs that have to be configured to
establish an LDP session over IPv4 and IPv6 TCP transport. These two IDs should be
non-zero and must be configured with different values.
Topology
Figure 1 shows the LDP IPv6 configured as dual-stack on Device R1 and Device R2.
Configuration
- CLI Quick Configuration
- Configuring R1
- Configure transport-preference to Select the Preferred Transport
- Configure dual-transport to Establish Separate Sessions for IPv4 with an IPv4 Neighbor and IPv6 with an IPv6 Neighbor
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a
text file, remove any line breaks, change any details necessary to match your
network configuration, copy and paste the commands into the CLI at the
[edit] hierarchy level, and then enter
commit from configuration mode.
R1
set interfaces ge-1/0/0 unit 0 family inet address 192.168.12.1/24
set interfaces ge-1/0/0 unit 0 family iso
set interfaces ge-1/0/0 unit 0 family inet6 address 2001:db8:0:12::/64 eui-64
set interfaces ge-1/0/0 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.1/32
set interfaces lo0 unit 0 family iso address 49.0001.1720.1600.1010.00
set interfaces lo0 unit 0 family inet6 address 2001:db8::1/128
set protocols isis interface ge-1/0/0.0
set protocols isis interface lo0.0
set protocols mpls interface ge-1/0/0.0
set protocols ldp deaggregate
set protocols ldp interface ge-1/0/0.0
set protocols ldp interface lo0.0
set protocols ldp family inet6
set protocols ldp family inet
R2
set interfaces ge-1/0/1 unit 0 family inet address 192.168.12.2/24
set interfaces ge-1/0/1 unit 0 family iso
set interfaces ge-1/0/1 unit 0 family inet6 address 2001:db8:0:12::/64 eui-64
set interfaces ge-1/0/1 unit 0 family mpls
set interfaces lo0 unit 0 family inet address 10.255.0.2/32
set interfaces lo0 unit 0 family iso address 49.0001.1720.1600.2020.00
set interfaces lo0 unit 0 family inet6 address 2001:db8::2/128
set protocols isis interface ge-1/0/1.0
set protocols isis interface lo0.0
set protocols mpls interface ge-1/0/1.0
set protocols ldp deaggregate
set protocols ldp interface ge-1/0/1.0
set protocols ldp interface lo0.0
set protocols ldp family inet6
set protocols ldp family inet
Configuring R1
Step-by-Step Procedure
The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see “ Using the CLI Editor in Configuration Mode ” in the Junos OS CLI User Guide.
To configure Device R1:
-
Configure the interfaces.
[edit interfaces] set ge-1/0/0 unit 0 family inet address 192.168.12.1/24 set ge-1/0/0 unit 0 family iso set ge-1/0/0 unit 0 family inet6 address 2001:db8:0:12::/64 eui-64 set ge-1/0/0 unit 0 family mpls -
Assign a loopback address to the device.
[edit interfaces lo0 unit 0] set family inet address 10.255.0.1/32 set family iso address 49.0001.1720.1600.1010.00 set family inet6 address 2001:db8::1/128 -
Configure the IS-IS interfaces.
[edit protocols isis] set interface ge-1/0/0.0 set interface lo0.0 -
Configure MPLS to use LDP interfaces on the device.
[edit protocols mpls] set protocols mpls interface ge-1/0/0.0 set interface ge-1/0/0.0 set interface lo0.0 -
Enable forwarding equivalence class (FEC) deaggregation in order to use different labels for different address families.
[edit protocols ldp] set deaggregate -
Configure LDP address families.
[edit protocols ldp] set family inet6 set family inet
Results
From configuration mode, confirm your configuration by entering the show interfaces and show protocols commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@R1# show interfaces
ge-1/0/0 {
unit 0 {
family inet {
address 192.168.12.1/24;
}
family iso;
family inet6 {
address 2001:db8:0:12::/64 {
eui-64;
}
}
family mpls;
}
}
lo0 {
unit 0 {
family inet {
address 10.255.0.1/32;
}
family iso {
address 49.0001.1720.1600.1010.00
}
family inet6 {
address 2001:db8::1/128;
}
}
}
user@R1# show protocols
mpls {
interface ge-1/0/0.0;
}
isis {
interface ge-1/0/0.0;
interface lo0.0;
}
ldp {
deaggregate;
interface ge-1/0/0.0;
interface lo0.0;
family {
inet6;
inet;
}
}
Configure transport-preference to Select the Preferred Transport
CLI Quick Configuration
Step-by-Step Procedure
You can configure the transport-preference statement
to select the preferred transport for a TCP connection when both
IPv4 and IPv6 are enabled. By default, IPv6 is used as TCP transport
for establishing an LDP connection.
-
(Optional) Configure the transport preference for an LDP connection.
[edit protocols ldp] set transport-preference ipv4
Step-by-Step Procedure
Results
From configuration mode, confirm your configuration by entering the show protocols command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@R1# show protocols
mpls {
interface ge-1/0/0.0;
}
isis {
interface ge-1/0/0.0;
interface lo0.0;
}
ldp {
deaggregate;
interface ge-1/0/0.0;
interface lo0.0;
family {
inet6;
inet;
}
transport-preference ipv4;
}
Configure dual-transport to Establish Separate Sessions for IPv4 with an IPv4 Neighbor and IPv6 with an IPv6 Neighbor
Step-by-Step Procedure
You can configure the dual-transport statement to allow LDP
to establish a separate IPv4 session with an IPv4 neighbor, and an IPv6
session with an IPv6 neighbor. This requires the configuration of
inet-lsr-id as the LSR ID for IPv4, and
inet6-lsr-id as the LSR ID for IPv6.
-
(Optional) Configure dual-transport to allow LDP to establish the TCP connection over IPv4 with IPv4 neighbors, and over IPv6 with IPv6 neighbors as a single-stack LSR.
[edit protocols ldp dual-transport] set inet-lsr-id 10.255.0.1 set inet6-lsr-id 10.1.1.1
Results
From configuration mode, confirm your configuration by entering the show protocols command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.
user@R1# show protocols
mpls {
interface ge-1/0/0.0;
}
isis {
interface ge-1/0/0.0;
interface lo0.0;
}
ldp {
deaggregate;
interface ge-1/0/0.0;
interface lo0.0;
family {
inet6;
inet;
}
dual-transport {
inet-lsr-id 10.255.0.1;
inet6-lsr-id 10.1.1.1;
}
}
Verification
Confirm that the configuration is working properly.
- Verifying the Route Entries in the mpls.0 Table
- Verifying the Route Entries in the inet.3 Table
- Verifying the Route Entries in the inet6.3 Table
- Verifying the LDP Database
- Verifying the LDP Neighbor Information
- Verifying the LDP Session Information
Verifying the Route Entries in the mpls.0 Table
Purpose
Display mpls.0 route table information.
Action
On Device R1, from operational mode, run the show route table
mpls.0 command to display mpls.0 route table
information.
user@R1> show route table mpls.0
mpls.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
0 *[MPLS/0] 05:19:58, metric 1
Receive
1 *[MPLS/0] 05:19:58, metric 1
Receive
2 *[MPLS/0] 05:19:58, metric 1
Receive
13 *[MPLS/0] 05:19:58, metric 1
Receive
299824 *[LDP/9] 04:28:45, metric 1
> to fe80::21f:1200:cb6:4c8d via ge-1/0/0.0, Pop
299824(S=0) *[LDP/9] 04:28:45, metric 1
> to fe80::21f:1200:cb6:4c8d via ge-1/0/0.0, Pop
299888 *[LDP/9] 00:56:12, metric 1
> to 192.168.12.2 via ge-1/0/0.0, Pop
299888(S=0) *[LDP/9] 00:56:12, metric 1
> to 192.168.12.2 via ge-1/0/0.0, Pop
Meaning
The output shows the mpls.0 route table information.
Verifying the Route Entries in the inet.3 Table
Purpose
Display inet.3 route table information.
Action
On Device R1, from operational mode, run the show route table
inet.3 command to display inet.3 route table
information.
user@R1> show route table inet.3
inet.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
10.255.0.2/32 *[LDP/9] 00:58:38, metric 1
> to 192.168.12.2 via ge-1/0/0.0
Meaning
The output shows the inet.3 route table information.
Verifying the Route Entries in the inet6.3 Table
Purpose
Display inet6.3 route table information.
Action
On Device R1, from operational mode, run the show route table
inet6.3 command to display inet6.3 route table
information.
user@R1> show route table inet6.3
inet6.3: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2001:db8::2/128 *[LDP/9] 04:31:17, metric 1
> to fe80::21f:1200:cb6:4c8d via ge-1/0/0.0
Meaning
The output shows the inet6.3 route table information.
Verifying the LDP Database
Purpose
Display the LDP database information.
Action
On Device R1, from operational mode, run the show ldp
database command to display LDP database information.
user@R1> show ldp database
Input label database, 10.255.0.1:0--10.255.0.2:0
Labels received: 3
Label Prefix
299840 10.255.0.1/32
3 10.255.0.2/32
299808 2001:db8::1/128
3 2001:db8::2/128
Output label database, 10.255.0.1:0--10.255.0.2:0
Labels advertised: 3
Label Prefix
3 10.255.0.1/32
299888 10.255.0.2/32
3 2001:db8::1/128
299824 2001:db8::2/128
Meaning
The output shows the entries in the LDP database.
Verifying the LDP Neighbor Information
Purpose
Display the LDP neighbor information.
Action
On Device R1, from operational mode, run the show ldp
neighbor and show ldp neighbor extensive
commands to display LDP neighbor information.
user@R1>show ldp neighborAddress Interface Label space ID Hold time fe80::21f:1200:cb6:4c8d ge-1/0/0.0 10.255.0.2:0 12 192.168.12.2 ge-1/0/0.0 10.255.0.2:0 11 user@R1>show ldp neighbor extensiveAddress Interface Label space ID Hold time 192.168.12.2 ge-1/0/0.0 10.255.0.2:0 11 Transport address: 10.255.0.2, Transport preference: IPv6, Configuration sequence: 10 Up for 00:04:35 Reference count: 1 Hold time: 15, Proposed local/peer: 15/15 Hello flags: none Neighbor types: discovered Address Interface Label space ID Hold time fe80::21f:1200:cb6:4c8d ge-1/0/0.0 10.255.0.2:0 14 Transport address: 2001:db8::2, Transport preference: IPv6, Configuration sequence: 10 Up for 00:04:35 Reference count: 1 Hold time: 15, Proposed local/peer: 15/15 Hello flags: none Neighbor types: discovered
Meaning
The output shows LDP neighbor information of both IPv4 and IPv6 addresses.
Verifying the LDP Session Information
Purpose
Display the LDP session information.
Action
On Device R1, from operational mode, run the show ldp
session and show ldp session extensive
commands to display LDP session information.
user@R1>show ldp sessionsession Address State Connection Hold time Adv. Mode 2001:db8::2 Operational Open 20 DU user@R1>show ldp session extensiveAddress: 2001:db8::2, State: Operational, Connection: Open, Hold time: 29 Session ID: 10.255.0.1:0--10.255.0.2:0 Next keepalive in 9 seconds Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1 Neighbor types: discovered Keepalive interval: 10, Connect retry interval: 1 Local address: 2001:db8::1, Remote address: 2001:db8::2 Up for 00:05:31 Capabilities advertised: none Capabilities received: none Protection: disabled Session flags: none Local - Restart: disabled, Helper mode: enabled Remote - Restart: disabled, Helper mode: enabled Local maximum neighbor reconnect time: 120000 msec Local maximum neighbor recovery time: 240000 msec Local Label Advertisement mode: Downstream unsolicited Remote Label Advertisement mode: Downstream unsolicited Negotiated Label Advertisement mode: Downstream unsolicited MTU discovery: disabled Nonstop routing state: Not in sync Next-hop addresses received: 10.255.0.2 192.168.12.2 2001:db8::2 fe80::21f:1200:cb6:4c8d Queue depth: 0 Message type Total Last 5 seconds Sent Received Sent Received Initialization 1 1 0 0 Keepalive 34 34 0 0 Notification 0 0 0 0 Address 1 1 0 0 Address withdraw 0 0 0 0 Label mapping 3 3 0 0 Label request 0 0 0 0 Label withdraw 0 0 0 0 Label release 0 0 0 0 Label abort 0 0 0 0
Meaning
The output displays information for the LDP session using IPv6 as the TCP transport.
Verification
Confirm that the configuration is working properly.
Verifying the LDP Neighbor Information
Purpose
Display the LDP neighbor information.
Action
On Device R1, from operational mode, run the show ldp neighbor
extensive command to display LDP neighbor information.
user@R1> show ldp neighbor extensive
Address Interface Label space ID Hold time
192.168.12.2 ge-1/0/0.0 10.255.0.2:0 14
Transport address: 10.255.0.2, Transport preference: IPv4, Configuration sequence: 9
Up for 00:00:14
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Address Interface Label space ID Hold time
fe80::21f:1200:cb6:4c8d ge-1/0/0.0 10.255.0.2:0 14
Transport address: 2001:db8::2, Transport preference: IPv4, Configuration sequence: 9
Up for 00:00:14
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Meaning
The output shows LDP neighbor information for both the IPv4 and IPv6 addresses.
Verifying the LDP Session Information
Purpose
Display the LDP session information.
Action
On Device R1, from operational mode, run the show ldp session
extensive command to display LDP session information.
user@R1> show ldp session extensive
Address: 10.255.0.2, State: Operational, Connection: Open, Hold time: 24
Session ID: 10.255.0.1:0--10.255.0.2:0
Next keepalive in 4 seconds
Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 2
Neighbor types: discovered
Keepalive interval: 10, Connect retry interval: 1
Local address: 10.255.0.1, Remote address: 10.255.0.2
Up for 00:05:26
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Session flags: none
Local - Restart: disabled, Helper mode: enabled
Remote - Restart: disabled, Helper mode: enabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Local Label Advertisement mode: Downstream unsolicited
Remote Label Advertisement mode: Downstream unsolicited
Negotiated Label Advertisement mode: Downstream unsolicited
MTU discovery: disabled
Nonstop routing state: Not in sync
Next-hop addresses received:
10.255.0.2
192.168.12.2
2001:db8::2
fe80::21f:1200:cb6:4c8d
Queue depth: 0
Message type Total Last 5 seconds
Sent Received Sent Received
Initialization 1 1 0 0
Keepalive 33 33 1 1
Notification 0 0 0 0
Address 2 2 0 0
Address withdraw 0 0 0 0
Label mapping 6 6 0 0
Label request 0 0 0 0
Label withdraw 0 0 0 0
Label release 0 0 0 0
Label abort 0 0 0 0
Meaning
The output displays information for the LDP session using IPv6 as the TCP transport.
Verification
Confirm that the configuration is working properly.
Verifying the LDP Neighbor Information
Purpose
Display the LDP neighbor information.
Action
On Device R1, from operational mode, run the show ldp neighbor
extensive command to display LDP neighbor information.
user@R1> show ldp neighbor extensive
Address Interface Label space ID Hold time
192.168.12.2 ge-1/0/0.0 10.255.0.2:0 11
Transport address: 10.255.0.2, Configuration sequence: 10
Up for 00:04:35
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Address Interface Label space ID Hold time
fe80::21f:1200:cb6:4c8d ge-1/0/0.0 10.255.0.2:0 14
Transport address: 2001:db8::2, Configuration sequence: 10
Up for 00:04:35
Reference count: 1
Hold time: 15, Proposed local/peer: 15/15
Hello flags: none
Neighbor types: discovered
Meaning
The output shows LDP neighbor information for both the IPv4 and IPv6 addresses.
Verifying the LDP Session Information
Purpose
Display the LDP session information.
Action
On Device R1, from operational mode, run the show ldp session
extensive command to display LDP neighbor information.
user@R1> show ldp session extensive
Address: 2001:db8::2, State: Operational, Connection: Open, Hold time: 29
Session ID: 10.1.1.1:0--10.255.0.2:0
Next keepalive in 9 seconds
Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
Neighbor types: discovered
Keepalive interval: 10, Connect retry interval: 1
Local address: 2001:db8::1, Remote address: 2001:db8::2
Up for 00:05:31
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Session flags: none
Local - Restart: disabled, Helper mode: enabled
Remote - Restart: disabled, Helper mode: enabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Local Label Advertisement mode: Downstream unsolicited
Remote Label Advertisement mode: Downstream unsolicited
Negotiated Label Advertisement mode: Downstream unsolicited
MTU discovery: disabled
Nonstop routing state: Not in sync
Next-hop addresses received:
2001:db8::2
fe80::21f:1200:cb6:4c8d
Queue depth: 0
Message type Total Last 5 seconds
Sent Received Sent Received
Initialization 1 1 0 0
Keepalive 34 34 0 0
Notification 0 0 0 0
Address 1 1 0 0
Address withdraw 0 0 0 0
Label mapping 3 3 0 0
Label request 0 0 0 0
Label withdraw 0 0 0 0
Label release 0 0 0 0
Label abort 0 0 0 0
Address: 10.255.0.2, State: Operational, Connection: Open, Hold time: 29
Session ID: 10.255.0.1:0--10.255.0.2:0
Next keepalive in 9 seconds
Passive, Maximum PDU: 4096, Hold time: 30, Neighbor count: 1
Neighbor types: discovered
Keepalive interval: 10, Connect retry interval: 1
Local address: 10.255.0.1, Remote address: 10.255.0.2
Up for 00:05:31
Capabilities advertised: none
Capabilities received: none
Protection: disabled
Session flags: none
Local - Restart: disabled, Helper mode: enabled
Remote - Restart: disabled, Helper mode: enabled
Local maximum neighbor reconnect time: 120000 msec
Local maximum neighbor recovery time: 240000 msec
Local Label Advertisement mode: Downstream unsolicited
Remote Label Advertisement mode: Downstream unsolicited
Negotiated Label Advertisement mode: Downstream unsolicited
MTU discovery: disabled
Nonstop routing state: Not in sync
Next-hop addresses received:
10.255.0.2
192.168.12.2
Queue depth: 0
Message type Total Last 5 seconds
Sent Received Sent Received
Initialization 1 1 0 0
Keepalive 34 34 0 0
Notification 0 0 0 0
Address 1 1 0 0
Address withdraw 0 0 0 0
Label mapping 3 3 0 0
Label request 0 0 0 0
Label withdraw 0 0 0 0
Label release 0 0 0 0
Label abort 0 0 0 0