Network Layer -
Internet Protocol
2023-12-08
Physical addresses (\(\rightarrow\) MAC addresses) are bound to a device
\(\Rightarrow\) it is impossible to maintain a logical hierarchy or replace hosts in a transparent manner
Logical addresses are required, which are independent from the specific hardware
Address Assignment
For local networks manual address assignment is typically not desired, hence mechanisms for address autoconfiguration are required.
Address space = amount of all valid network identifiers
The usual representation of IPv4 uses the dot-decimal notation
e.g., 198.51.100.23
1
The usual representation of IPv6 uses the hexadectets (quad-nibbles) seperated by colons
e.g., 2001:0db8:0000:0000:0000:ff00:0042:8329
2
Two host IDs are reserved
(i.e., cannot be assigned to network devices):
Class | Prefix | Address range | Network ID | Host ID | ||
---|---|---|---|---|---|---|
A | 0 |
0.0.0.0 | - | 127.255.255.255 | 7 bits | 24 bits |
B | 10 |
128.0.0.0 | - | 191.255.255.255 | 14 bits | 16 bits |
C | 110 |
192.0.0.0 | - | 223.255.255.255 | 21 bits | 8 bits |
D | 1110 |
224.0.0.0 | - | 239.255.255.255 | — | — |
E | 1111 |
240.0.0.0 | - | 255.255.255.255 | — | — |
According CIDR IP address ranges are represented by this notation:
Network address/mask bits
The table shows the possible splits of a class C network into subnets
Mask bits (prefix) | /24 |
/25 |
/26 |
/27 |
/28 |
/29 |
/30 |
/31 |
/32 |
Subnet mask | 0 |
128 |
192 |
224 |
240 |
248 |
252 |
254 |
255 |
Subnet bits | 0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
Subnets IDs | 1 |
2 |
4 |
8 |
16 |
32 |
64 |
128 |
256 |
Host bits | 8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
0 |
Host IDs | 256 |
128 |
64 |
32 |
16 |
8 |
4 |
2 |
— |
Hosts (maximum) | 254 |
126 |
62 |
30 |
14 |
6 |
2 |
0 |
— |
Source: Computernetzwerke. Peterson and Davie. dpunkt (2000)
AND
operation for its own subnet mask and the destination IP address
Address space: | 10.0.0.0 to 10.255.255.255 |
CIDR notation: | 10.0.0.0/8 |
Number of addresses: | \(2^{24}\) = 16,777,216 |
Address space: | 172.16.0.0 to 172.31.255.255 |
CIDR notation: | 172.16.0.0/12 |
Number of addresses: | \(2^{20}\) = 1,048,576 |
Address space: | 192.168.0.0 to 192.168.255.255 |
CIDR notation: | 192.168.0.0/16 |
Number of addresses: | \(2^{16}\) = 65,536 |
With IPv6, NAT is unnecessary because the address space is large enough to allocate globally accessible addresses to all network devices
Limitations of IPv4
A very short history of IPv6
Source: Wikipedia, Author: Michel Bakni, License: CC BY-SA 4.0
Source: Google IPv6 Stats
0
(= 0000
), may be omitted exactly once within an IPv6 address
2a01:04f9:001a:9508:0000:0000:0000:0001
\(\Longrightarrow\) 2a01:4f9:1a:9508::1
Notation of IPv6 addresses (URLs)
http://[2001:500:1::803f:235]:8080/
IPv6 addresses consist of two parts
Described in RFC 4291
fc00::/7 (1111 110)
\(\Longrightarrow\) Unique local address, may be routed only in private networks.fe80::/10 (1111 1110 10)
\(\Longrightarrow\) Link local addresses, may not be routed.::1/128 (0000..1)
\(\Longrightarrow\) Loopback address::/128 (0000..0)}
\(\Longrightarrow\) Unspecified2000::/3
(2000...
until 3fff...
)ff01::1
and ff02::1
) and all routers (ff01::2
, ff02::2
and ff05::2
)./128
attached::1/128
0
127.0.0.1
)/64
or even a /56
network assigned
0:0:0:0:0:FFFF::/96
Example
IPv4 address: | 131.246.107.35 |
IPv6 address: | 0:0:0:0:0:FFFF:83F6:6B23 |
Shorter notation: | ::FFFF:83F6:6B23 |
Which information do you expect in the packet format?
4
\(\Longrightarrow\) IPv46
\(\Longrightarrow\) IPv65
\(\Longrightarrow\) \(5 * 4\) bytes \(= 20\) bytesThe fields Identification, Flags and Fragment offset control the assembly of fragmented IP packets
Do you expect the packet header to be longer or shorter compared to IPv4?
The size of the IPv6 header is fixed (320 bits \(\Longrightarrow\) 40 bytes)
The most prominent example The ping command uses ICMP messages.
Type | Name of type | Code | Description |
---|---|---|---|
0 |
Echo reply | 0 |
Echo reply (reply for ping ) |
3 |
Destination unreachable | 0 |
Destination network unreachable |
1 |
Destination host unreachable | ||
2 |
Destination protocol unreachable | ||
3 |
Destination port unreachable | ||
4 |
Fragmentation required, but forbidden by the IP packet’s flags | ||
13 |
Firewall at destination site rejects the IP packet | ||
5 |
Redirect | 0 |
Redirect Datagram for the Network (or subnet) |
1 |
Redirect Datagram for the Host | ||
8 |
Echo Request | 0 |
Echo request (ping ) |
11 |
Time Exceeded | 0 |
TTL (Time To Live) expired |
1 |
Fragment reassembly time exceeded |
ICMP Types and Codes
traceroute
traceroute
traceroute
determines, which routers are used to forward packets to the destination site - The sender transmits an IP packet to the destination with TTL=1
TTL=0
, discards the IP packet and transmits an ICMP message of message type 11
and code 0
to the senderTTL=2
TTL
is decrementedTTL=0
, discards the IP packet and transmits an ICMP message of message type 11
and code 0
to the senderOnce the value of TTL
is big enough that the destination site can be reached, the receiver transmits an ICMP message of message type 3
and code 3
to the sender
This way, the path from sender to receiver can be traced via ICMP
$ traceroute -q 1 wikipedia.de
traceroute to wikipedia.de (134.119.24.29), 30 hops max, 60 byte packets
1 fritz.box (10.0.0.1) 1.834 ms
2 p3e9bf6a1.dip0.t-ipconnect.de (62.155.246.161) 8.975 ms
3 217.5.109.50 (217.5.109.50) 9.804 ms
4 ae0.cr-polaris.fra1.bb.godaddy.com (80.157.204.146) 9.095 ms
5 ae0.fra10-cr-antares.bb.gdinf.net (87.230.115.1) 11.711 ms
6 ae2.cgn1-cr-nashira.bb.gdinf.net (87.230.114.4) 13.878 ms
7 ae0.100.sr-jake.cgn1.dcnet-emea.godaddy.com (87.230.114.222) 13.551 ms
8 wikipedia.de (134.119.24.29) 15.150 ms
RARP is obsolete. Replaced by DHCP (more modern and feature-rich).
169.254.0.0/16
, IPv6 uses the prefix fe80::/10
for link-local addressesA host generates a tentative link-local address
DAD: The host sends a Neighbor Solicitation (NS) with the chosen IP address as destination address
If no host responds to the NS with an Neighbor Advertisement (NA) it keeps this address
Router solicitations (RS) or Router Advertisements (RAs) are used to find the responsible router for the network
The RA contains the network prefix which is used to determine a routable IP address
You should now be able to answer the following questions:
Computer Networks - Network Layer - Internet Protocol - WS 23/24