Ipv6
Ipv6 uses a 128 bit address
The address is written as X:X:X:X:X:X:X:X
Each segment is 16 bits
1. Address Shortening
Section titled “1. Address Shortening”- Leading zeros in each field can be removed
- Successive all zero fields can be shortened to ’::’, but only once in an address
2. Address types
Section titled “2. Address types”2.1 Unicast Addresses
Section titled “2.1 Unicast Addresses”2.1.1 Global Unicast Address (GUA)
Section titled “2.1.1 Global Unicast Address (GUA)”Equivalent to public Ipv4 addresses. Routable on the internet.
Prefix: 2000::/3
2.1.2 Unique Local Address (ULA)
Section titled “2.1.2 Unique Local Address (ULA)”Equivalent to private Ipv4 addresses
Prefix: fc00::/7
2.1.3 Link-Local Address (LLA):
Section titled “2.1.3 Link-Local Address (LLA):”Mandatory on every IPv6-enabled interface. Used for communication only on the local subnet (link) and will not be forwarded by a router.
Prefix: fe80::/10
2.1.4 Loopback Address:
Section titled “2.1.4 Loopback Address:”Used to test the local TCP/IP stack
Address: ::1/128
2.1.5 Unspecified Address
Section titled “2.1.5 Unspecified Address”Used when a device does not yet have an IP address
Address: ::/128 (or 0:0:0:0:0:0:0:0)
2.2 Multicast Addresses
Section titled “2.2 Multicast Addresses”Always begin with ff00::/8. Key multicast addresses to memorize:
- All-Nodes Multicast:
ff02::1(Replaces Ipv4 broadcast; reaches all Ipv6 devices on the link) - All-Routers Multicast:
ff02::2(Replaces 224.0.0.2; reaches all IPv6 routers on the link) - Solicited-Node Multicast: Starts with
ff02::1:ff00:0/104followed by the last 24 bits of the interface’s unicast address. Used in Neighbor Discovery.
| Address | Purpose | IPv4 Equivalent |
|---|---|---|
FF02::1 | All IPv6 Nodes | 255.255.255.255 (Broadcast) |
FF02::2 | All IPv6 Routers | N/A |
FF02::5 | OSPFv3 All Routers | 224.0.0.5 |
FF02::6 | OSPFv3 DR/BDR Routers | 224.0.0.6 |
FF02::9 | RIPng (RIP Next Generation) | 224.0.0.9 |
FF02::A | EIGRP for IPv6 | 224.0.0.10 |
2.3 Anycast Addresses
Section titled “2.3 Anycast Addresses”Assigned to multiple devices. A packet sent to an anycast address is delivered to the topologically closest device listening to that Address
3. Configuration in CISCO IOS
Section titled “3. Configuration in CISCO IOS”R1(config)# ipv6 unicast-routingR1(config-if)# ipv6 add 2001: db8:0:1::1/64R1# sh ipv6 interface brief4. EUI-64
Section titled “4. EUI-64”A Cisco router can generate full IPv6 address for itself when given the interface and /64 network to use.
The host portion of the address is derived from the interface’s MAC address.
A MAC address is /48 compared to the /64 host portion of the IPv6 address.
FE:FE is injected in the middle of the /48 MAC address to bring it up to 64 bits. Also the 7th bit is inverted.
4.1 EUI-64 Configuration
Section titled “4.1 EUI-64 Configuration”R1 (config)#int f0/0R1 (config-if)#ipv6 address 2001:db8:0:1::/64 eui-64R1 (config)#int f2/0R1 (config-if)#ipv6 address 2001: db8:0::/64 eui-645. Unique Local and Link Local Addresses
Section titled “5. Unique Local and Link Local Addresses”5.1 Unique Local
Section titled “5.1 Unique Local”They are not publicly reachable
They are assigned from the range FCOO::/7
5.2 Link Local Addresses
Section titled “5.2 Link Local Addresses”They are automatically generated with EUI-64, but it can be overridden with manual configuration
6. SLAAC
Section titled “6. SLAAC”A device can configure its own GUA without a DHCP server. The device learns the /64 network prefix from the router. It generates its own 64-bit interface ID
7. DHCPv6
Section titled “7. DHCPv6”- Stateless DHCPv6: The device uses SLAAC to get its IP address but contacts the DHCPv6 server just to get extra information, like DNS server address.
- Stateful DHCPv6: Works exactly like DHCPv4.
9. Neighbor Discovery Protocol (NDP)
Section titled “9. Neighbor Discovery Protocol (NDP)”Neighbor Discovery is the IPv6 version of ARP
Rather than using ARP requests and replies, Neighbor Discovery uses ICMP Neighbor Solicitations and Neighbor Advertisements.
Neighbor Solicitation messages are sent to the Solicited-Node multicast address which reaches all hosts on the subnet.
Message types:
- Router Solicitation(RS) -> Sent by a host to find routers on the link
- Router Advertisement (RA) -> Sent by a router to provide network prefix and configuration flags to hosts
- Neighbor Solicitation(NS) -> Sent by a node to determine the MAC address of another node
- Neighbor Advertisement(NA) -> The response to an NS, providing the requested MAC address
- DAD (Duplicate Address Detection) -> A process where a device sends a NS for its own newly generated IPv6 address to ensure no one else on the network is using it.