Figure 24: IPv6 over an MPLS Tunnel

Figure 24 shows a standard CE-PE-P-PE-CE MPLS-style network. CE1 and CE2 are the end customer CE routers using IPv6; PE1 and PE2 are the provider edge routers; and P is a provider core router. The IPv4 MPLS tunnel travels between PE1 and PE2, connecting IPv6 sites CE1 and CE2.
Since the CE-to-PE configuration can use a variety of routing protocols, this example requires that you use EBGP between CE1 and PE1 and RIPng between PE2 and CE2. You must establish policies on PE2 to import and export routes between BGP and RIPng.
To start the configuration, set up the IPv6 connection between CE1 and PE1. In your BGP routing policy, you must advertise the IPv6 loopback address of the CE1 router address to the PE1 router.
Router CE1
- [edit]
- interfaces {
-
- ge-7/1/0 {
-
- unit 0 {
-
-
family inet6 {
-
address 8001::1/126;
- }
- }
- }
-
- lo0 {
-
- unit 0 {
-
- family inet6 {
- address 9001::1/128;
- }
- }
- }
- }
- routing-options {
- autonomous-system 200;
- }
- protocols {
-
- bgp {
-
- group to_PE1 {
- type external;
-
local-address 8001::1;
-
-
family inet6 {
-
unicast;
- }
- export policy1;
- peer-as 100;
- neighbor 8001::2;
- }
- }
-
- policy-options {
-
- policy-statement policy1 {
-
- term 1 {
-
- from {
-
family inet6;
-
route-filter 9001::1/128 exact;
- }
-
then accept;
- }
-
- term 2 {
- then reject;
- }
- }
- }
- }
Once you move to PE1, your tasks become more complex. You must complete the IPv6 EBGP connection to CE1 and build the first part of the MPLS tunnel. You must set the inet, inet6, and mpls families on the core-facing interface, configure an inet6 address for the CE-facing interface attached to CE1, and ensure the IPv4 loopback address is advertised in OSPF, since this is the MPLS LSP target for PE2. You must also add the ipv6-tunneling parameter in MPLS, include the labeled-unicast and explicit-null options at the [edit protocols bgp family inet6] hierarchy level, and create an external BGP group pointing to CE1 and an internal group pointing to PE2.
Router PE1
- [edit]
- interfaces {
-
- ge-6/1/0 {
-
- unit 0 {
-
-
family inet6 {
-
address 8001::2/126;
- }
- }
- }
-
- so-6/2/0 {
-
- unit 0 {
-
-
family inet {
-
address 10.255.2.1/24;
- }
-
family inet6;
-
family mpls;
- }
- }
-
- lo0 {
-
- unit 0 {
-
-
family inet {
-
address 10.255.255.16/32;
- }
- }
- }
- }
- routing-options {
- autonomous-system 100;
- }
- protocols {
-
- rsvp {
- interface so-6/2/0.0;
- }
-
- mpls {
-
ipv6-tunneling;
-
- label-switched-path to_PE2 {
- to 10.255.255.15;
- }
-
interface so-6/2/0.0;
- }
-
- bgp {
-
-
group to_PE2 {
- type internal;
- local-address 10.255.255.16;
-
-
family inet6 {
-
-
labeled-unicast {
-
explicit-null;
- }
- }
- neighbor 10.255.255.15;
- }
-
-
group to_CE1 {
- local-address 8001::2;
-
- family inet6 {
- unicast;
- }
- peer-as 200;
- neighbor 8001::1;
- }
- }
-
- ospf {
- traffic-engineering;
-
- area 0.0.0.0 {
- interface so-6/2/0.0;
-
- interface lo0.0 {
- passive;
- }
- }
- }
- }
On Router P, connect the MPLS tunnel between PE1 and PE2. Enable RSVP, MPLS, and IPv4 connectivity on the interfaces and ensure that IP connectivity is available through the routing protocol (in this case, OSPF).
Router P
- [edit]
- interfaces {
-
- so-1/1/0 {
-
- unit 0 {
-
- family inet {
- address 10.255.2.2/24;
- }
-
family mpls;
- }
- }
-
- so-4/0/0 {
-
- unit 0 {
-
- family inet {
- address 10.255.3.1/24;
- }
-
family mpls;
- }
- }
-
- lo0 {
-
- unit 0 {
-
- family inet {
- address 10.255.255.220/32;
- }
- }
- }
- }
- routing-options {
- autonomous-system 100;
- }
- protocols {
-
-
rsvp {
-
interface so-1/1/0.0;
-
interface so-4/0/0.0;
- }
-
-
mpls {
-
interface so-1/1/0.0;
-
interface so-4/0/0.0;
- }
-
-
ospf {
- traffic-engineering;
-
-
area 0.0.0.0 {
-
interface so-1/1/0.0;
-
interface so-4/0/0.0;
-
-
interface lo0.0 {
-
passive;
- }
- }
- }
- }
At PE2, you must complete a mirror image of the MPLS tunnel configuration started at PE1 and configure a RIPng connection to CE2. Set the inet, inet6, and mpls families on the core-facing interface, configure an inet6 address for the CE facing interface attached to CE2, and ensure the IPv4 loopback address is advertised in OSPF, since this is the MPLS LSP target for PE1. You must also add the ipv6-tunneling parameter in MPLS and include the labeled-unicast and explicit-null options at the [edit protocols bgp family inet6] hierarchy level. Finally, create and apply policies that export BGP routes into RIPng and import RIPng routes to BGP.
Router PE2
- [edit]
- interfaces {
-
- so-0/0/0 {
-
- unit 0 {
-
-
family inet {
-
address 10.255.3.2/24;
-
}
-
family inet6;
-
family mpls;
- }
- }
-
- so-4/0/1 {
-
- unit 0 {
-
-
family inet6 {
-
address 8002::1/126;
- }
- }
- }
-
- lo0 {
-
- unit 0 {
-
-
family inet {
-
address 10.255.255.15/32;
- }
- }
- }
- }
- routing-options {
- autonomous-system 100;
- }
- protocols {
-
- rsvp {
- interface so-0/0/0.0;
- }
-
- mpls {
-
ipv6-tunneling;
-
- label-switched-path to_PE1 {
- to 10.255.255.16;
- }
-
interface so-0/0/0.0;
- }
-
- bgp {
-
- group to_PE1 {
- type internal;
- local-address 10.255.255.15;
-
-
family inet6 {
-
-
labeled-unicast {
-
explicit-null;
-
}
-
}
-
export red-export;
- neighbor 10.255.255.16;
- }
- }
-
- ospf {
- traffic-engineering;
-
- area 0.0.0.0 {
- interface so-0/0/0.0;
-
- interface lo0.0 {
- passive;
- }
- }
- }
-
-
ripng {
-
- group to_CE2 {
- export red-import;
- neighbor so-4/0/1.0;
- }
- }
- }
- policy-options {
-
- policy-statement red-export {
-
- term 1 {
-
from protocol ripng;
-
then accept;
- }
-
- term 2 {
- then reject;
- }
- }
-
- policy-statement red-import {
-
from protocol bgp;
-
then accept;
- }
- }
Finally, on CE2, configure IPv6 addresses on the SONET/SDH and loopback interfaces, enable RIPng, and create and apply a policy for RIPng that permits the IPv6 loopback address to be exported to PE2. Once these tasks are accomplished, your IPv6 connection to CE1 should be ready for use.
Router CE2
- [edit]
- interfaces {
-
- so-1/1/0 {
-
- unit 0 {
-
-
family inet6 {
-
address 8002::2/126;
- }
- }
- }
-
- lo0 {
-
- unit 0 {
-
-
family inet6 {
-
address 9001::5/128;
- }
- }
- }
- }
- routing-options {
- autonomous-system 300;
- }
- protocols {
-
-
ripng {
-
- group to_PE2 {
-
export policy1;
- neighbor so-1/1/0.0;
- }
- }
- }
- policy-options {
-
- policy-statement policy1 {
-
- term 1 {
-
-
from {
-
family inet6;
-
route-filter 9001::5/128 exact;
-
}
-
then accept;
- }
-
- term 2 {
- then reject;
- }
- }
- }