6PE configuration example
Network requirements
As shown in Figure 84, use 6PE to connect two isolated IPv6 networks over an IPv4/MPLS network.
The ISP uses OSPF as the IGP.
PE 1 and PE 2 are edge devices of the ISP, and establish an IPv4 IBGP connection between them.
CE 1 and CE 2 are edge devices of the IPv6 networks, and they connect the IPv6 networks to the ISP.
A CE and a PE exchange IPv6 packets through IPv6 static routing.
Figure 84: Network diagram
Configuration procedure
Configure IPv6 addresses and IPv4 addresses for interfaces. (Details not shown.)
Configure PE 1:
# Enable LDP globally, and configure the LSP generation policy.
<PE1> system-view [PE1] mpls lsr-id 2.2.2.2 [PE1] mpls ldp [PE1-ldp] lsp-trigger all [PE1-ldp] quit
# Enable MPLS and LDP on VLAN-interface 30.
[PE1] interface vlan-interface 30 [PE1-Vlan-interface30] mpls enable [PE1-Vlan-interface30] mpls ldp enable [PE1-Vlan-interface30] quit
# Configure IBGP, enable the peer's 6PE capabilities, and redistribute IPv6 direct and static routes.
[PE1] bgp 65100 [PE1-bgp-default] router-id 2.2.2.2 [PE1-bgp-default] peer 3.3.3.3 as-number 65100 [PE1-bgp-default] peer 3.3.3.3 connect-interface loopback 0 [PE1-bgp-default] address-family ipv6 [PE1-bgp-default-ipv6] import-route direct [PE1-bgp-default-ipv6] import-route static [PE1-bgp-default-ipv6] peer 3.3.3.3 enable [PE1-bgp-default-ipv6] peer 3.3.3.3 label-route-capability [PE1-bgp-default-ipv6] quit [PE1-bgp-default] quit
# Configure a static route to CE 1.
[PE1] ipv6 route-static 1::1 128 10::1
# Configure OSPF for the ISP.
[PE1] ospf [PE1-ospf-1] area 0 [PE1-ospf-1-area-0.0.0.0] network 2.2.2.2 0.0.0.0 [PE1-ospf-1-area-0.0.0.0] network 1.1.0.0 0.0.255.255 [PE1-ospf-1-area-0.0.0.0] quit [PE1-ospf-1] quit
Configure PE 2:
# Enable LDP globally, and configure the LSP generation policy.
<PE2> system-view [PE2] mpls lsr-id 3.3.3.3 [PE2] mpls ldp [PE2-mpls-ldp] lsp-trigger all [PE2-mpls-ldp] quit
# Enable MPLS and LDP on VLAN-interface 30.
[PE2] interface vlan-interface 30 [PE2-Vlan-interface30] mpls enable [PE2-Vlan-interface30] mpls ldp enable [PE2-Vlan-interface30] quit
# Configure IBGP, enable the peer's 6PE capabilities, and redistribute IPv6 direct and static routes.
[PE2] bgp 65100 [PE2-bgp-default] router-id 3.3.3.3 [PE2-bgp-default] peer 2.2.2.2 as-number 65100 [PE2-bgp-default] peer 2.2.2.2 connect-interface loopback 0 [PE2-bgp-default] address-family ipv6 [PE2-bgp-default-ipv6] import-route direct [PE2-bgp-default-ipv6] import-route static [PE2-bgp-default-ipv6] peer 2.2.2.2 enable [PE2-bgp-default-ipv6] peer 2.2.2.2 label-route-capability [PE2-bgp-default-ipv6] quit [PE2-bgp-default] quit
# Configure the static route to CE 2.
[PE2] ipv6 route-static 4::4 128 20::1
# Configure OSPF for the ISP.
[PE2] ospf [PE2-ospf-1] area 0 [PE2-ospf-1-area-0.0.0.0] network 3.3.3.3 0.0.0.0 [PE2-ospf-1-area-0.0.0.0] network 1.1.0.0 0.0.255.255 [PE2-ospf-1-area-0.0.0.0] quit [PE2-ospf-1] quit
Configure a static route on CE 1, with PE 1 as the default next hop.
<CE1> system-view [CE1] ipv6 route-static :: 0 10::2
Configure a static route on CE 2, with PE 2 as the default next hop.
<CE2> system-view [CE2] ipv6 route-static :: 0 20::2
Verifying the configuration
# Display the IPv6 BGP routing tables on PE 1 and PE 2. The output shows that each of them has two IPv6 network routes. The following shows the output on PE 1:
[PE1] display bgp routing-table ipv6 Total number of routes: 5 BGP local router ID is 2.2.2.2 Status codes: * - valid, > - best, d - dampened, h - history, s - suppressed, S - stale, i - internal, e - external Origin: i - IGP, e - EGP, ? - incomplete * > Network : 1::1 PrefixLen : 128 NextHop : 10::1 LocPrf : PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: ? * >i Network : 4::4 PrefixLen : 128 NextHop : ::FFFF:3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : 1279 MED : 0 Path/Ogn: ? * > Network : 10:: PrefixLen : 64 NextHop : :: LocPrf : PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: ? * > Network : 10::2 PrefixLen : 128 NextHop : ::1 LocPrf : PrefVal : 32768 OutLabel : NULL MED : 0 Path/Ogn: ? * >i Network : 20:: PrefixLen : 64 NextHop : ::FFFF:3.3.3.3 LocPrf : 100 PrefVal : 0 OutLabel : 1278 MED : 0 Path/Ogn: ?
# Verify that CE 1 can ping the IPv6 address 4::4 (loopback interface address) of CE 2. (Details not shown.)