Notes 11‐1 - LPouliot/Junior-Spring-NET-330-01-Network-Design GitHub Wiki
IPv6 Notes
Why IPv6?
IPv4's 32-bit addresses do not scale to the current size of the Internet
Push for more features within IP
- A mechanism for carrying real-time traffic to avoid route changes
- Ability to work with multiple peer servers
- Provide capability for using shared resources
Why Version 6?
- IPv5, or ST, was developed as a streaming protocol
- Addresses still only 32 bits – did not fix address exhaustion!
- It was abandoned before ever becoming a standard
For more information: https://www.lifewire.com/what-happened-to-ipv5-3971327
IP and change
Scarcity of available addresses was considered crucial when work began on a new version of IP in 1993
- no emergency occurred
- and IP has not been changed
Networking professionals argue that Internet communication follows an hourglass model
- and that IP lies at the position where the hourglass is thin
The hourglass perspective of protocols
IPv6 vs IPv4
What's the same?
- IPv6 is still connectionless
- IPv6 packets still self-destruct after crossing a certain number of routers
What's new?
- Address Size: IPv4 uses 32 bits, IPv6 uses 128 bits
- Header Format: Almost every field in the header has been changed from v4 to v6
Rather than include fields in the standard header to handle any specific issue that might occur, IPv6 uses a standard header and deals with any optional IP data via extension headers.
IPv6 vs. IPv4
The standard IPv6 header is 40 bytes long.
- Constant format, fixed size
- It's twice as large as the standard IPv4 header, but it has fewer fields!
- Faster processing by routers
- and layer 3 devices
Consistent size is designed to reduce processing time at the destination and on inventing routers
Pv6 Fields
- Version (6)
- Traffic Class (used to classify packets to provide QoS for different traffic types)
- Flow Label (to associate a packet with a particular path)
- Payload Length (size of payload + extension headers)
- Hop Limit (TTL replacement)
- Next Header:
if (extension header == true) {
field = type of header;
}
else {
field = next protocol;
//TCP, UDP, ICMP, etc.
}
Cisco - more
Difference IPv4 addressing vs IPv6
Second, IPv6 defines a set of special addresses that differ from IPv4 special addresses
IPv6 does not include a special address for broadcasting on a given remote network
IPv6 Addressing
IPv6 Colon Hexadecimal Notation
So how do we write a 128-bit IP address?
- Dotted decimal notation is not helpful here…
105.220.136.100.255.255.255.255.0.0.18.128.140.10.255.255
Instead, we'll use colon hexadecimal notation.
- Each group of 16 bits is written in hexadecimal, with a colon separating each group
Ex. 69DC : 8864 : FFFF : FFFF : 0000 : 1280 : 8C0A : FFFF
IPv6 address
IPv6 Shortening Options
- Leading zeros can be omitted from each group.
Old: 3ffe:1900:4545:0003:0200:f8ff:fe21:67cf
New: 3ffe:1900:4545:3:200:f8ff:fe21:67cf
A double colon (::) can be used once in an address to replace multiple fields of zeros. This is known as Zero Compression
.
Old: fe80:0:0:0:200:f8ff:fe21:67cf
New: fe80::200:f8ff:fe21:67cf
IPV6 Subnetting
So how do we subnet an IPv6 address?
- Typically, they are composed of two logical parts:
-
- A 64-bit network prefix used for routing (think network ID).
48 bits for the assigned “Routing Prefix”, 16 bits for subnetting
- A 64-bit interface identifier used to identify a host (think host ID).
For subnet masks, CIDR is the preferred representation.
- fe80::200:f8ff:fe21:67cf/24 🡪 24 bits for network address, 104 for host
IPv6 addresses use 128 bits to represent an address which includes bits to be used for subnetting. The second half of the address (least significant 64 bits) is always used for hosts only. Therefore, there is no compromise if we subnet the network.
16 bits of subnet is equivalent to IPv4’s Class B Network. Using these subnet bits, an organization can have another 65 thousands of subnets which is by far, more than enough.
Can further subnet the network beyond 16 bits of Subnet ID, by borrowing host bits; but it is recommended that 64 bits should always be used for hosts addresses because auto-configuration requires 64 bits.
IPv6 subnetting works on the same concept as Variable Length Subnet Masking in IPv4.
Example Network
Champlain College assigned the Prefix:
- 2620:E4:C000/48
So can create subnets: Where green is subnet and blue is host
- 2620:E4:C000:1:x:x:x:x
- 2620:E4:C000:2:x:x:x:x …
- 2620:E4:C000:FFFF:x:x:x:x
Address Format and Allocations
Requires each single interface within each device to have its own unique interface identifier (Typically the second 64 bits)
Specifies that interface identifiers can use the “Modified EUI-64 format” – essentially the host sets its own “interface identifier”
These can be created using different methods - such:
- Use of 48 Bit MAC address in the 64 bit id (SLAAC)
- Use of Existing IPv4 address in the 64-bit id
- Link-local : equivalent to Windows default IP addressing fe80::/10 usually implemented as fe80::/64
-
- Random number
Stateless Address Autoconfiguration
IPv6 does not use DHCP!
Instead, we can build our own IPv6 address:
- Get the network ID from the router.
- Generate our own host ID (usually via our MAC address).
But MAC addresses are only 48 bits!
- So we add FFFE between the OUI and the unique identifier to create our 64-bit host ID.
- The seventh bit in the OUI is then inverted (0 becomes 1,
IPv6 address mapped from IPv4
80 0’s
Last 32 bits are the IPv4 address
16 bits in middle either all 0’s (IPv4 compatible) or all 1’s (IPv4 mapped)
- IPv4 compatible: Used for device compatible with both v4 and v6
- IPv4 Mapped: Used for devices that are not v6 compatible
Compatible are used to tunnel IPv6 packets through routers.
Link Local Addresses
An address that is assigned to an interface when it has not received an address any other way
Used more frequently in IPv6:
- Router Solicitation
- Neighbor Discovery
IPv4 - 169.254.0.0/16
Ipv6 - fe80::/10
Subnetting in IPv6
Tl;DR version:
- Most of the subnetting concepts from IPv4 apply to IPv6
- Except IPv6 has bit range allocated for subnets
2^16 allows for 65,535 subnets
IPv6 associated Protocols
ICMPv6
ARP -> NDP
DHCPv6
ICMP functions much the same in IPv6 as it does in IPv4. Recall that ICMP has much broader functionality than simply pinging between devices.
ICMPv6
CMPv6 Types:
- A total of 256 different possible message types can be defined for each of ICMPv4 and ICMPv6. The Type field that appears in the header of each message specifies the kind of ICMP message.
- In ICMPv4 there is no relationship between Type value and message type; in ICMPv6 error messages have a Type value of 0 to 127, informational messages 128 to 255.
ICMPv6 Codes:
- Codes provide a bit more information about the ICMPv6 type, but are not used at all for many types.
Neighbor Discovery Protocol (NDP)
As defined in RFC 2461 of IETF, the Neighbor Discovery is a key protocol of IPv6.
Neighbor Discovery Protocol is an umbrella that defines these mechanisms:
- Substitute of ARP, which has been removed in IPv6. The new mechanism uses a combination of ICMPv6 messages and multicast addresses.
- Stateless Auto-Configuration - allows nodes on the local link to configure their IPv6 addresses by themselves by using a mix of ICMPv6 messages and multicast addresses.
- Router Redirection - The router sends ICMPv6 messages to an IPv6 node to inform it of the presence of a better router address on the same local link to reach a destination network.
NDP is implemented as ICMPv6 with options
ICMP v6 Type 133: Router Solicitation
Send multicast to:
- ff02::2
- Routers respond
Router Advertisement
ICMPv6 Type 134
Clients receive RA from Router
Now have network Prefix info!
Neighbor Discovery
Neighbor Solicitations are sent to a "solicited-node multicast address"
- Each machine on a network is required to join such a group for each of its IPv6 addresses.
Neighbor Advertisements are sent in response to neighbor solicitations.
ICMPv6 Type Values:
- NS = 135, NA = 136
DHCPv6
Similarities
- Both protocols use the concepts of a DHCP client, DHCP relay and DHCP server
- Both protocols use the concepts of scopes and leases
- Both protocols use a 4-message stateful exchange between client and server
-
DHCP for IPv4: Discover/Offer/Request/Acknowledge (DORA)
-
DHCPv6: Solicit/Advertise/Request/Reply (SARR)
Differences between DHCP and DHCPv6
Even if SLAAC is used by clients to assign their own IP address – DHCP still needed for:
- DNS Servers
- Central Tracking of IP’s
- Gateway Preference
DHCPv6 uses ICMPv6 Router Advertisement (RA) and IPv6 multicast messages
- DHCP uses broadcast IPv4 messages on the LAN.
DHCPv6 uses link-local IPv6 addresses when communicating between client and relay/server (RFC 6939)
- DHCP for IPv4 uses unsolicited broadcasts.
Port numbers are different., DHCPv6 clients listen on UDP port 546, DHCPv6 servers and relay agents listen on UDP port 547.
- DHCP v4 servers and relay agents listen on UDP port 67,clients listen on UDP port 68
Whereas the IPv6 node learns about its first-hop router from the ICMPv6 RA message
- DHCP for IPv4 can provide the default gateway IP address to the client,