Jeremy’s IT Lab lecture video:
Commands
Commands List
IPv6 Show Commands
10. IPv6
Link to original
- show ipv6 route
-->
Shows the IPv6 routing table.- show ipv6 interface brief
-->
Shows brief information about all IPv6 interfaces- show ipv6 interface interface-id
-->
Shows full IPv6 interface information- show ipv6 neighbor
-->
Shows the IPv6 equivalent of an ARP tableIPv6 Global Commands
Link to original
- ipv6 unicast-routing
-->
Enables IPv6 routing on the routerIPv6 Interface Commands
IPv6
Link to original
- [[Quartz Fix - Cisco IOS Commands#^global-ipv6-routing|ipv6 unicast-routing
-->
Enables IPv6 routing on the router]]- ipv6 address ipv6-address/prefix
-->
Assigns the interface an IPv6 address- ipv6 address ipv6-address/prefix eui-64
-->
Assigns the interface an IPv6 address with the host portion being an EUI-64 generated address.- ipv6 address ipv6-address/prefix anycast
-->
Assigns the interface with an IPv6 address with anycast enabled- ipv6 enable
-->
Enables IPv6 on a single interface with an automatically generated EUI-64 Link-Local address- ipv6 address autoconfig
-->
Uses SLAAC (Stateless Address Auto-configuration) to generate an IPv6 address. Uses NDP to find the network prefix and EUI-64 to generate the interface identifier (could be chosen randomly as well).
IPv6 Information
IPv6 Header
The IPv6 header is much simpler than the IPv4 header.
- Two of the biggest differences are
- The amount of fields in the header, as it has less fields than the IPv4 header. This helps with performance.
- The fixed header size of 40 bytes for IPv6.
IPv6 Header - Fields
The IPv6 header consists of 8 fields in total, being:
- Version (4 bits)
- Indicates the version of IP that is used.
- Fixed value of 6 (0b0110) to indicate IPv6
- Traffic Class (8 bits)
- Used for QoS (Quality of Service) to indicate high-priority traffic
- Flow Label (20 bits)
- Used to identify specific traffic ‘flows’ (communications between a specific source and destination)
- Payload Length (16 bits)
- Indicates the length of the payload (the encapsulated Layer 4 segment) in bytes.
- Next Header (8 bits)
- Indicates the type of the ‘next header’ (header of the encapsulated segment), for example TCP or UDP.
- Same function as the IPv4 header’s ‘protocol’ field
- Hop Limit (8 bits)
- Value is decremented by 1 for each router that forwards it. If it reaches 0, the packet is discarded.
- Source Address (128 bits)
- Destination Address (128 bits)
Solicited-Node Multicast Address
An IPv6 solicited-node multicast address is calculated from a unicast address through the following calculation:
- ff02::1:ff + the last 6 hex digits from a unicast address
Example of the solicited-node multicast address calculation
- Example 1:
- Unicast address: 2001 : 0db8 : 0000 : 0001 : 0f2a : 4fff : fea3 : 00b1
- We take the last 6 hex digits and add them onto ff02::1:ff and get:
- ff02 :: 1 : ffa3 : 00b1
- Example 2:
- Unicast address: 2001 : 0db8 : 0000 : 0001 : 0489 : 4eda : 073a : 12b8
- We take the last 6 hex digits and add them onto ff02::1:ff and get:
- ff02 :: 1: ff3a : 12b8
Neighbor Discovery Protocol (NDP)
Neighbor Discovery Protocol (NDP) is a protocol used with IPv6. It was made to replace ARP which is no longer used in IPv6.
- It uses ICMPv6 and solicited-node multicast addresses to learn the MAC address of other hosts.
- Two message types are used:
- Neighbor Solicitation (NS) = ICMPv6 Type 135
- Neighbor Advertisement (NA) = ICMPv6 Type 136
- Another function of NDP is that it allows hosts to automatically discover routers on the local network.
- Router Solicitation (NS) = ICMPv6 Type 133
- Router Advertisement (NA) = ICMPv6 Type 134
IPv6 Neighbor Table
IPv6 doesn’t have an ARP Table as it doesn’t use ARP. However, it does have a neighbor table that is accessible through the command show ipv6 neighbor
Neighbor Solicitation (NS)
When an NS is sent, it uses a few different addresses:
- The source IP is set as the sending interface’s IP
- The destination IP is the destination’s solicited-node multicast address.
- The source MAC is the sending interface’s MAC
- The destination MAC is the destination’s multicast MAC address, based on the destination’s solicited-node multicast address.
Neighbor Advertisement (NA)
When an NA is sent, it uses normal address values:
- The source IP is set as the sending interface’s IP
- The destination IP is the destination’s IP address
- The source MAC is the sending interface’s MAC
- The destination MAC is the destination’s MAC address
Router Solicitation (RS)
Sent when an interface is enabled or when a host connects to a network.
- Sent to multicast address FF02::2 (all routers).
- Asks all routers on the local link to identify themselves.
Router Advertisement (RA)
Theses messages are sent in response to RS messages, and sometimes periodically.
- Sent to multicast address FF02::1 (all nodes).
- The router announces its presence, as well as other information about the network.
- They are also sent periodically, even if the router hasn’t received an RS.
Stateless Address Auto-Configuration (SLAAC)
Stateless Address Auto-Configuration (SLAAC) is a new functionality of IPv6 that allows hosts to use the RS/RA messages to learn the IPv6 prefix of the local link, and then automatically generate an IPv6 address.
- When you use the
ipv6 address PREFIX/PREFIX-LENGTH eui-64
command, you need to manually specify the prefix. - However, using the
ipv6 address autoconfig
command, the device uses NDP to learn the prefix on the local link, and will automatically generate an IPv6 address. (The device will use EUI-64 to generate the interface identifier, or it will be randomly generated.)
Duplicate Address Detection (DAD)
Duplicate Address Detection (DAD) allows hosts to check if other devices on the local link are using the same IPv6 address
- DAD uses to messages to perform this check:
- NS
- NA
- Anytime an IPv6-enabled interface initializes, or an IPv6 address is configured on an interface through any method, it performs DAD
- The host will send an NS to its own solicited-node multicast IPv6 address. If it doesn’t get a reply, it knows the address is unique.
- However, if it gets a reply, it means the address is already in use by another host on the network.
IPv6 Routing
The way that IPv6 routing functions is the same as IPv4.
However, the two processes are separate on the router and have their own separate routing tables as well.
- IPv4 routing is enabled by default
- IPv6 routing is disabled by default, and must be enabled through
ipv6 unicast-routing
- If IPv6 routing is disabled, that means the router will be able to send and receive IPv6 traffic, but will not be able to route/forward IPv6 traffic.
- If IPv6 routing is disabled, that means the router will be able to send and receive IPv6 traffic, but will not be able to route/forward IPv6 traffic.
Definitions reminder:
- Connected network route: A route that is automatically added for each connected network.
- Local host route: A route that is automatically added for each address configured on the router.
IPv6 route tables and Link-local addresses
Routes for link-local addresses are not added to the routing table.
IPv6 Static Routing
In IPv6 static routes are setup through this command:
ipv6 route DESTINATION/PREFIX-LENGTH {NEXT-HOP | EXIT-INTERFACE [NEXT-HOP]} [AD]
There are also three different types of static routes that are used in both IPv4 and IPv6:
- Directly attached
- Only the exit-interface is specified
- Recursive
- Only the next-hop is specified
- Fully specified
- Both the exit-interface and next-hop are specified
IPv6 Ethernet Directly Attached routes
In IPv6, you cannot use directly attached static routes if the interface is an Ethernet interface.
- The router will let you enter the command and it’ll look like it worked, but it will not be active and won’t be used for routing.
- You’d have to use a recursive or fully specified route instead.
Link-Local Next-Hops
For a link-local address to be used as a next-hop, you have to also specify the exit-interface or it’ll not work.
The command would be:
ipv6 route PREFIX/PREFIX-LENGTH EXIT-INTERFACE NEXT-HOP-IP