IP Version 6

IPv6 is also sometimes referred to as the Next Generation IP protocol. It was designed to solve specific problems seen in IPv4. Larger address space was needed, IPv6 uses 128 bit addresses instead of 32 bit. Support for auto-configuration was also included. Improved options and provisions for protocol expansion were also designed in, as well as special support for Quality of Service and other resource allocation issues.

The address space is large. 128 bits. They are written as groups of 4 hexadecimal digits, separated by colons. Double :: can represent a strings of 0's. IPv6 addresses fall into 3 main categories: Unicast, Multicast and Anycast. (NOTE: No broadcast). Unicast is a single destination, multicast can be any number of destinations. These are just like IPv4. But there are also anycast addresses, which allow you to address to "any" computer that handles a service, the nearest will respond.

Like IPv4 there are some reserved addresses:

	::1 				unicast localhost
        ::0				unspecified address
	ff02::1				multicast all nodes on link
	ff02::2				multicast all routers on link
Unlike ipv4, there are different scopes of addresses space for different types of addresses. For example:
	fe80::/10 		reserved for link local addresses
	ff00::/8		reserved for multicast addresses
Link local addresses are only valid on the link.

Global addresses follow the format:


|         n bits         |   m bits  |       128-n-m bits         |
+------------------------+-----------+----------------------------+
| global routing prefix  | subnet ID |       interface ID         |
+------------------------+-----------+----------------------------+

Interface ID is usually EIU-64 format.

Global address space is assign by IANA out of 2000::/3

The address space is designed to be very hierarchical with ISP's allocating subnets of their address space to downstream customers. For example 2001:0400::/23 is address space assign by IANA to AIRN, for use in North America. Internet2/Abilene network uses the prefix 2001:468::/32. AMPATH/SFG uses 2001:468:0700/40 and FIU is assigned 2001:468:0701/48.

An IPv6 Packet Header takes the following format:


   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |Version| Traffic Class |           Flow Label                  |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |         Payload Length        |  Next Header  |   Hop Limit   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                         Source Address                        +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   +                                                               +
   |                                                               |
   +                      Destination Address                      +
   |                                                               |
   +                                                               +
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   Version              4-bit Internet Protocol version number = 6.

   Traffic Class        8-bit traffic class field.  See section 7.

   Flow Label           20-bit flow label.  See section 6.

   Payload Length       16-bit unsigned integer.  Length of the IPv6
                        payload, i.e., the rest of the packet following
                        this IPv6 header, in octets.  (Note that any

                        extension headers [section 4] present are
                        considered part of the payload, i.e., included
                        in the length count.)

   Next Header          8-bit selector.  Identifies the type of header
                        immediately following the IPv6 header.  Uses the
                        same values as the IPv4 Protocol field [RFC-1700
                        et seq.].

   Hop Limit            8-bit unsigned integer.  Decremented by 1 by
                        each node that forwards the packet. The packet
                        is discarded if Hop Limit is decremented to
                        zero.

   Source Address       128-bit address of the originator of the packet.
                        See [ADDRARCH].

   Destination Address  128-bit address of the intended recipient of the
                        packet (possibly not the ultimate recipient, if
                        a Routing header is present).  See [ADDRARCH]
                        and section 4.4.

The next header field specifies a IcmpV6, TCPV6 or UDPV6 header following (or options, or other protocols, security options, etc).

All nodes are required to recognize certain addresses as itself.

      o  Its required Link-Local Address for each interface.
      o  Any additional Unicast and Anycast Addresses that have been
         configured for the node's interfaces (manually or
         automatically).
      o  The loopback address.
      o  The All-Nodes Multicast Address (ff02::1)
      o  The Solicited-Node Multicast Address for each of its unicast
         and anycast addresses.
      o  Multicast Addresses of all other groups to which the node
         belongs.
Solicited-node multicast address are computed as a function of a node's unicast and anycast addresses. A solicited-node multicast address is formed by taking the low-order 24 bits of an address (unicast or anycast) and appending those bits to the prefix FF02::1:FF00/104 resulting in a multicast address in the range FF02::1:FF00:0000 to FF02::1:FFFF:FFFF An example: The host with the IPv6 address of
2001:468:701:3801:2c0:a8ff:fe7d:774a/64
would have a solicited-node multicast address of ff02::1:ff7d:774a/64.

The system in IPv6 that is analogous to ARP in IPv4 is the IPv6 ICMPv6 neighbor discovery protocol. In its basic form it works like arp in that you send a NEIGHBOR SOLICITATION request to the multicast address that is the solicited-node multicast address. The neighbor responds with the Hardware address to use to deliver. Just like IPv4 you will include your hardware address (in ipv6 as an icmpv6 option) so that the solicited host would would not need to make a solicitation in the other direction.

When bringing a interface up ICMPv6 is also used to perform duplicate address detection. This consists of a neighbor solicitation for the proposed address. If someone responds, then the address can not be used.

IPv6 implements automatic address configuration of hosts. Routers will advertise a prefix and hosts can combine that with the EUI-64 representation of the MAC address to form a full 128 bit ipv6 address. Routers advertise the prefixes via ICMPv6 router advertisement and router solicitation messages. Router solicitations can be used by hosts when they come up and want an address immediately. They are sent from the host to the "all routers" multicast address (FF02::2). Routers respond with a router advertisement. Routers also periodically send router advertisements to the "all hosts on link" multicast address (FF02::1).

Stateless Address Autoconfiguration is most recently defined in RFC 4862. Routers can provide default route information, link prefix informtion or both. They do this via Router Advertisements. If the router advertises a prefix, it is combined with the EUI-64, or privacy enhanced (RFC 4941), lower order 64 bits to create a 128bit global IPV6 address. The default route advertised will usually be link local address of the router.


To configure IPv6 on a cisco router you have to be sure to issue the global command "ipv6 unicast-routing" first.

We assume 2001:468:701:44f0/60 is group 55 network. and we assume 2001:468:701:44f0::/64 is the ip network address of group 55 net 0. 2001:468:701:44f1/64 is group 55 net1, 2001:468:701:44f2/64 is net2 and 2001:468:701:44f3/64 is net3.

We want r2 to be host ::2 on network net0 2001:468:701:44f0::/64. We also want to prevent the router from automatically sending out router advertisements.

	r2(config)#ipv6 unicast-routing
	r2(config)#int eth1/0
	r2(config-if)#ipv6 nd suppress-ra
	r2(config-if)#ipv6 address 2001:468:701:44f0::2/64

IPv6 static routes on cisco are pretty much like IPv4 static routes with just a differrence in keyword. An IPv6 default route pointing to BR at 2001:468:701:44f0::1 and a route to net3 with a next hop of r3 eth1/0 at 2001:468:701:44f0::3 would look like this:



	r2(config)#ipv6 route ::0/0 2001:468:701:44f0::1
	r2(config)#ipv6 route 2001:468:701:44f3::/64  2001:468:701:44f0::3


To configure IPv6 OSPF (sometimes called OSPF V3) on a Cicso IOS router you do the basic provisioning in the interface section. Ospf v3 area's are 32 bit numbers, written with dotted quads, just like ospf v2 (ipv4 ospf).

Here we set the cost for the interface eth1/0 to be 5100 and assign the ospf v3 process number to 2 and the area to 131.94.128.0.


	r2(config)#interface Ethernet1/0
	g55-r2(config-if)#ipv6 ospf cost 5100
	g55-r2(config-if)#ipv6 ospf 2 area 131.94.128.0 

This is all that is needed to actiavte ospfv3. You don't need a router ospf stanza unless you want to do area aggregation or set other ospfv3 parameters.

On JunOS to set the ip address of an interface you do it under the edit interfaces section. Under unit you can use family inet6 to set the IPv6 addresses. Here is an example of setting br fxp0 to the address 2001:468:701:4400::f for group 55.


	[edit interfaces]
	juniper@br# set fxp0 unit 0 family inet6 address 2001:468:701:4400::f/64      
	[edit interfaces]
	juniper@br# show fxp0 
	unit 0 {
	    description "Connection to 10.91.0.0/24 ait-core network for group 55";
	    family inet {
		filter {
		    input SSHFilter;
		}
		address 10.91.0.55/24;
	    }
	    family inet6 {
		address 2001:468:701:4400::f/64;
	    }
	}

On JunOS you set IPv6 static routes in the routing-options section. You add the routes in the rib (routing information base) inet6.0. The default routing information base is inet4.0 (IE ipv4 unicast routes). Assuming the core router has an ipv6 address of 2001:468:701:4400::ff, net3 for group 55 is ipv6 address 2001:468:701:44f3::/64 and that R3 eth1/0 has an ipv6 address of 2001:468:701:44f0::3 then to set a default route to the core router BR and a route to net3 via R3 on BR you would do this:


	[edit]
	juniper@br# edit routing-options 

	[edit routing-options]
	juniper@br# show 
	static {
	    route 0.0.0.0/0 reject;
	}
	aggregate {
	    route 10.55.0.0/16;
	}

	[edit routing-options]
	juniper@br# edit rib inet6.0 static 

	[edit routing-options rib inet6.0 static]
	juniper@br# set route ::0/0 next-hop 2001:468:701:4400::ff 
	juniper@br# set route 2001:468:701:44f3::/64 next-hop 2001:468:701:44f0::3 

Setting up ospf v3 on Junos requires you to create a new ospfv3 stanza, but otherwise is quite similar to the ospfv2 (ipv4) ospf set up. Here we set up ospf3 on br to have fxp0.0 and fxp1.0 both be in area 131.94.128.0 and have a cost of 5000.

	[edit]
	juniper@br# edit protocols ospf3 

	[edit protocols ospf3]
	juniper@br# edit area 131.94.128.0 

	[edit protocols ospf3 area 131.94.128.0]
	juniper@br#  set interface fxp0.0 metric 5000 

	[edit protocols ospf3 area 131.94.128.0]
	juniper@br#  set interface fxp1.0 metric 5000 

	[edit protocols ospf3 area 131.94.128.0]
	juniper@br#  up 

	[edit protocols ospf3]
	juniper@br# show
	area 131.94.128.0 {
	    interface fxp0.0 {
		metric 5000;
	    }
	    interface fxp1.0 {
		metric 5000;
	    }
	}

To configure cisco routers to do stateless address autoconfiguration you use the following syntax at the interface level (this is an example for R3 net3 in group 55). You also need to make sure ra is turned on by using the no ipv6 nd suppress-ra command at the interface level.

	r3#conf t
	r3(config)#int eth1/2
	r3(config-if)#ipv6 nd ra-interval 30
	r3(config-if)#ipv6 nd prefix 2001:468:701:44f3::/64 120 60 
	r3(config-if)#ipv6 nd ra-lifetime 120
	r3(config-if)#no ipv6 nd suppress-ra
The above would announce the prefex 2001:468:701:44f3::/64 to the network connencted to eth1/2. It will announce a max lifetime of 120 seconds and a prefered lifetime of 60 seconds. That is all specified in the ipv6 nd prefix-advertisement statement. It will make these advertisments every 30 seconds, as per the ipv6 nd ra-interval. The default route information will have a lifetime of 120 (per the ipv6 nd ra-lifetime command).

On Juniper JunOS you set up ipv6 router advertisment in the protocols router-advertisement stanza. Here we set BR to send router advertisements to net0 with the ipv6 prefix for net0.


	[edit]
	juniper@br# edit protocols router-advertisement 
	
	[edit protocols router-advertisement]
	juniper@br#  edit interface fxp1.0

	[edit protocols router-advertisement interface fxp1.0]
	juniper@br# set max-advertisement-interval 60 

	[edit protocols router-advertisement interface fxp1.0]
	juniper@br# set default-lifetime 600 


	[edit protocols router-advertisement interface fxp1.0]
	juniper@br# set prefix 2001:468:701:44f0::/64 valid-lifetime 300

	[edit protocols router-advertisement interface fxp1.0]
	juniper@br# set prefix 2001:468:701:44f0::/64 preferred-lifetime 120 

Here we set the default route lifetime to 600, becauce junos won't let us set it shorter.

Some linux ip commands that may be of use for you:


	ip -f inet6 route flush default			- to flush all default routes
	ip -f inet6 route				- to show all ipv6 routes
	ip -f inet6 neigh				- to show the ipv6 neighbor (IE like ipv4 ARP) cache
	ip -f inet6 neigh flush dev eth0		- to flush neighbor cache on eth0
	ping6 -I eth0 fe80::xxxxxxxxx			- to ping to a link local address on eth0
	ping6 2001:xxxxxxxxx				- to ping a global ipv6 address
Some Juniper JunOS commands that may be of use for you:

	show route table inet6				- see the ipv6 routing table
	show ipv6 neighbors 				- see the ipv6 neighbor cache
	show ospf3 neighbor                  		- see the ospf v3 neighbors

Some Cisco IOS commands that may be of use for you:

	show ipv6 route					- see the ipv6 routing table
	show ipv6 neighbors				- see the ipv6 neighbor cache
	show ipv6 ospf neighbor 			- see the ospf v3 neighbors
	show ipv6 interface				- see ipv6 interface interface information