6PE Primer: Enabling IPv6 in Your Network
This is the last post in the series on Primers. The technology has mostly been geared towards SP networks, but as with all things networking - everything apply's to everything. As matter of fact, I believe we can all do good to know both sides to the coin. Enjoy.
6PE operation
6PE is a solution that allows IPv6 routes to be carried across an IPv4 + MPLS core. The configuration for 6PE is relatively simple. First you enable IPv6 capability in MP-BGP on each PE router. This will allow the PE routers to form an IPv6 adjacency with one another. This adjacency will be used to exchange IPv6 routing information, but carried over the existing IPv4 + MPLS core without any change needed to the core network. With 6PE, you will have a native IPv6 exchange between the PE and CE routers. You can run any IPv6 capable routing protocol between the CE and PE routers.
The magic happens when the send-label option is used in MP-BGP. When the send-label option is specified, the router will begin to advertise its IPv6 + label capability. If the two routers agree to the IPv6 + label capability, they will send all IPv6 routes as labeled routes. So as a packet leaves the PE router ingress into the MPLS network, it will be carrying two labels: the top label, which specifies the IPv4 next hop, and the bottom label, which is the MP-BGP assigned label.
Forwarding Function
For the purposes of demonstration, we will use FEC0:1:7777::/48 as our example.
When the ingress PE router receives an IPv6 packet from the CE, the first thing it does is an IPv6 FIB lookup.
PE1#sho ipv6 cef
FEC0:1:7777::/48
nexthop ::FFFF:7.7.7.7
fast tag rewrite with Fa0/1, 10.1.23.2, tags imposed: {19 32}
There are two things we want to focus on from this output: one, the labels imposed (pushed), and two, the next hop address. Looking at the labels (or tags as some routers may refer to them as) we see two labels, 19 and 32. Label 19 refers to the IPv4 Label and 32 refers to the Aggregate IPv6 label. Both of these labels encompass our label stack that will be imposed onto any packet destined for FEC0:1:7777::/48.
The other thing to notice is the next-hop ::FFFF:7.7.7.7, this is the address of the PE router that we have formed our IPv6 MP-BGP adjacency with. ::FFF:X.X.X.X is a special IPv6 address that allows for IPv4 addresses to be encoded into an IPv6 address. You can easily determine that the IPv4 address encoded in ::FFFF:7.7.7.7.7 is 7.7.7.7. This is the IPv4 address for the PE router to which FEC0:1:777777::/48 is directly connected to. In order to send packets to 7.7.7.7 we must route traffic to 10.1.23.2, which is the next-hop router in the path to 7.7.7.7.
Putting all this information together, first the router will extract the IPv4 address from the IPv6 address (7.7.7.7). Then it will perform an IPv4 lookup on 7.7.7.7 and get 10.1.23.2. Lastly, it will consult the MPLS LFIB (see output below) to get the label for 10.1.23.2. We need this label in order for us to send packets into the MPLS core. You will notice the label is 19. This is where we get label 19 (the IPv4 label) as the top label from the IPv6 FIB output.
PE1#sho mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
16 Pop tag 3.3.3.3/32 0 Fa0/1 10.1.23.2
17 17 4.4.4.4/32 0 Fa0/1 10.1.23.2
18 18 6.6.6.6/32 0 Fa0/1 10.1.23.2
19 19 7.7.7.7/32 0 Fa0/1 10.1.23.2
Next we need to understand how the IPv6 FIB determined the bottom label was 32. For that we will look at MP-BGP.
PE1#sho bgp ipv6 un ta
Network Next Hop In tag/Out tag
FEC0:1:7777::/48 ::FFFF:7.7.7.7 notag/32
Notice that MP-BGP has assigned label 32 to prefix FEC0:1:7777::/48. The IPv6 FIB pulled this information from MP-BGP. Another thing to be aware of is the notag listed as the “In tag”. The router is expecting ingress packets – packets coming in from the CE routers – that are destined for FEC0:1:7777::/48 to be IP packets. This makes sense; the traffic coming in from the CE routers should not have any labels because MPLS is not enabled between the PE and CE routers.
To recap, the IPv6 FIB got label 19 from the MPLS LFIB. Label 19 was assigned to the next hop PE router that is directly connected to FEC0:1:7777::/48. Then it got label 32 from the MP-BGP label assignment to FEC0:1:7777::/48.
Now that we have all the label information, the packet will be forwarded through the MPLS network using normal MPLS label switching. Once it reaches the penultimate router – assuming ****LINK HERE to MPLS primer****PHP is enabled – it will pop the top label off and forward it to the egress PE router.
The egress PE router will do a lookup in the LFIB for the remaining label (remember the penultimate router has popped the top label (IPv4 label) and forwarded the packet to the egress PE router). So now the egress PE router has a packet with one label, label 32.
PE2#sho mpls forwarding-table
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
32 Untagged FEC0:1:7777::/48 0 Se0/0 point2point
According to the output, packets with label 32 need to be forwarded out interface s0/0 untagged, i.e., no label). So the next step is for the egress PE router to do an IPv6 FIB lookup on the prefix associated with label 32 - which you’ll notice is our original prefix, FEC0:1:7777::/48.
R7#sho ipv6 cef
FEC0:1:7777::/48
nexthop FE80::C009:DFF:FEDC:0 Serial0/0
tag information
local tag: 32
The FIB output includes our next hop (CE router). With this information the egress PE router will forward the packet to the CE router which then will forward the packet towards the final destination, FEC0:1:7777::/48.
Checklist for Configuring 6PE
Next we will discuss the steps necessary to configure 6PE. Each step is listed and will be discussed in more detail later in the document.
1. Enable IPv6 on PE routers
2. Assign IPv6 addresses
3. MP-BGP IPv6 adjacencies between PE routers.
4. Configure IPv6 Connectivity between CE-PE routers
Enabling IPv6 Connectivity
As mentioned earlier, the first step to configuring 6PE is enabling IPv6 on the PE routers. There are only two commands to enable IPv6:
PE1(config)#ipv6 unicast-routing
PE1(config)#ipv6 cef
Next we will assign IPv6 addresses on the interfaces connecting to the CE router.
PE1(config)#interface Serial0/0
PE1(config-if)#description LINK_TO_R9
PE1(config-if)# ipv6 address FEC0:209::2/64
IPv6 MP-BGP Adjacency
Now we can bring up the PE IPv6 MP-BGP adjacency. This adjacency will be used to carry the IPv6 prefixes + labels across the IPv4 MPLS-enabled backbone. Below is our configuration on the PE routers. The only thing that changes from PE to PE is the IP address used in the neighbor statement.
router bgp 1
no bgp default ipv4-unicast
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
!
address-family ipv6
neighbor 2.2.2.2 activate
neighbor 2.2.2.2 next-hop-self
neighbor 2.2.2.2 send-label
Now we’ll verify the adjacency is up.
PE1#sho bgp ipv6 un su
BGP router identifier 7.7.7.7, local AS number 1
BGP table version is 7, main routing table version 7
6 network entries using 912 bytes of memory
6 path entries using 456 bytes of memory
8/3 BGP path/bestpath attribute entries using 992 bytes of memory
2 BGP AS-PATH entries using 48 bytes of memory
4 BGP extended community entries using 160 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
Bitfield cache entries: current 3 (at peak 3) using 96 bytes of memory
BGP using 2664 total bytes of memory
BGP activity 20/8 prefixes, 38/26 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
2.2.2.2 4 1 308 307 7 0 0 02:12:33
FEC0:710::10 4 1000 154 157 7 0 0 02:28:39
Don’t forget that BGP needs to have IP reachability to a neighbor for the adjacency to form. We only have IPv4 running in the core, so we need to use the PE routers IPv4 addresses when configuring MP-BGP. You’ll notice that is what we used in our configuration above.
CE-PE Connection
Any routing protocol that supports IPv6 can be used for the connection between the CE and PE routers. What you use depends on the enterprise you are connecting to and their comfort level with each of the routing protocols. It also depends on the Providers policies regarding routing protocols.
MP-BGP CE-PE
The preferred way to exchange routes between the CE and PE router is running MP-BGP. One advantage to using MP-BGP is that the routes will automatically be exchanged with each PE router in the Provider core. This happens because the routes advertised from the CE will be installed in the MP-BGP RIB on the PE router, so you will not need to redistribute the routes into MP-BGP.
Running MP-BGP also protects the Provider from network changes in the customer network affecting the Provider’s network. Imagine if OSPFv3 was running between the CE and PE routers, anytime the customers network had a topology change, those updates would be sent to the PE router. OSPF was meant to be run within one AS, not between ASes.
The basic configuration is simple.
PE1#sho run | b r b
router bgp 1
no bgp default ipv4-unicast
neighbor FEC0:209::9 remote-as 900
!
address-family ipv6
neighbor FEC0:209::9 activate
neighbor FEC0:209::9 default-originate
exit-address-family
We have specified the default-originate option. This will cause the PE router to send a default route to the CE router. This is optional and really depends on what the customer is asking for. Most of the time this is all an enterprise would need. Next, let’s take a look at the CE configuration.
CE#sho run | b r b
router bgp 900
no synchronization
bgp router-id 9.9.9.9
bgp log-neighbor-changes
neighbor FEC0:209::2 remote-as 1
no auto-summary
!
address-family ipv6
neighbor FEC0:209::2 activate
network 9::9/64
network FEC0:1:2001::/48
network FEC0:1:3001::/48
network FEC0:209::9/64
exit-address-family
Static CE-PE
Another option for exchanging routes between the CE and PE routers is to configure static routing. If customers do not want to run BGP, static routing is the next best option. Our first step is to create a point-to-point connection between the CE and PE router. In IPv4 this is typically done with a /30 between the interfaces, but in IPv6 the current recommendation is to use a /64 everywhere; even on P2P links.
PE1#sho run int s0/0
interface Serial0/0
description LINK_TO_R9
ipv6 address FEC0:209::2/64
CE#sho run int s0/0
interface Serial0/0
description LINK_TO_R9
ipv6 address FEC0:209::9/64
Next we will define a static route on the PE router so it knows how to get to the prefix assigned to the customer. Then the CE router will need to be configured with a default route pointing to the PE router as the next hop.
PE1(config)#ipv6 route 9::/64 FEC0:209::9
CE(config)#ipv6 route 0::0/0 FEC0:209::2
The last thing to do is redistribute the static and connected routes into MP-BGP. To do this it is recommended using the network command. At all cost, avoid using redistribute static and redistributed connected unless you absolutely have to.
PE1#sho run | b r b
router bgp 1
< -- Code Omitted -- >
address-family ipv6
neighbor 7.7.7.7 activate
neighbor 7.7.7.7 next-hop-self
neighbor 7.7.7.7 send-label
network 9::/64
network FEC0:209::/64
exit-address-family
Now the prefix that connects the CE and PE routers and also the prefix assigned to the customer is installed into the MP-BGP RIB.
PE1#sho bgp ipv6 un
BGP table version is 12, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 9::/64 FEC0:209::9 0 32768 i
*>i7777::/64 ::FFFF:7.7.7.7 0 100 0 1000 i
*>iFEC0:1:7777::/48 ::FFFF:7.7.7.7 0 100 0 1000 i
*> FEC0:209::/64 :: 0 32768 i
*>iFEC0:710::/64 ::FFFF:7.7.7.7 0 100 0 i
At this point the customer will have full connectivity to the internet and other IPv6 customer networks on the Providers network.
More Information
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_data_sheet09186a008052edd3.html









