Future Internet Technologies Traditional Internet Dr. Dennis Pfisterer Institut für Telematik, Universität zu Lübeck http://www.itm.uni-luebeck.de/people/pfisterer Internet Protocol v4 (IPv4)
IPv4 Model Packet-Switched Datagram Service Each packet is independent from any other packet Routing is done on a per-packet basis yx yx yx yx yx yx Routing Tables used to select next hop i.e., which link to use Best-effort Service No guarantees regarding QoS, in-order delivery, real-time, Routing tables Router R1 DA Next hop y R3, R4...... Router R3 DA Next hop y R6...... Router R6 DA Next hop y -...... 6-3 IPv4 packet format Version (4 bit) IPv4 (0x04), IPv6 (0x06) HdrLen (4 bit) Header Length in multiples of 32-bit (>5) Type of Service (8 bit) now obsolete Precedence ToS 0 Precedence: 7=High, 0=Normal ToS: 8=min. Delay, 4=max. Throughput, 2=max. Reliability, 0=normal Bits: 0 4 8 16 19 31 Version HdrLen Type of service Total length Identification Flags Fragment offset 20 Time to live Protocol Header checksum octets Source address Destination address Options + padding Data (! 65536 octets) 0 1 2 3 4 5 6 7 6-4
IPv4 packet format Total length (16 bit) Including Header Identification (16 bit) Used for fragmentation 0 1 2 - D M Flags (3 bit) D = Don t fragment, M = More Fragments Fragment offset Offset in multiples of 8 Byte Bits: 0 4 8 16 Version HdrLen Type of service 20 octets Time to live Identification Protocol Flags Source address Destination address Options + padding Data (! 65536 octets) 19 31 Total length Fragment offset Header checksum 6-5 IPv4 packet format Time To Live (8 bit) Decremented at each hop, packet dropped if zero is reached Protocol (8bit) Indicates next protocol (upper layer protocol such as UDP=17/TCP=6) Header Checksum (16 bit) CRC-16 (complete header) Source- and Destination IP-Address (32 bit) Options Security, Source routing, Bits: 0 4 8 16 Version HdrLen Type of service 20 octets Time to live Identification Protocol Flags Source address Destination address Options + padding Data (! 65536 octets) 19 31 Total length Fragment offset Header checksum 6-6
Some Protocol Numbers See http://www.iana.org/assignments/protocol-numbers/ for reference Unix lists these well-known numbers in /etc/protocols 7 IPv4 Fragmentation
IPv4 Fragmentation IP packets are transported over a variety of networks Each network has a maximum transmission unit (MTU) Examples Ethernet (1500 bytes) ATM (multiples of 48 bytes) PPPoE (1480 bytes) X.25 (576 bytes) FDDI (4352 bytes) Sender and receiver only know the link s local MTU The maximum path MTU is unknown 9 IPv4 Fragmentation IP packets may exceed a link s MTU IP packet size > MTU Must be split into fragments smaller than the current MTU Fragmentation options Transparent fragmentation Non-transparent fragmentation 10
IPv4 Fragmentation Transparent fragmentation Fragmentation and reassembly performed on each link Non-transparent fragmentation Fragmentation at each intermediate station, reassembly at destination IP: Non-transparent fragmentation Relevant fields in IP packet header: Ver HL TOS Total length Identification D,M Fragment offset TTL Protocol Header checksum... Flags: D = Don t fragment M = More fragments 11 IP Packet Fragmentation Split up packets into segments smaller than MTU (including IP header, 20-60 bytes) Compute new value for Total Length Set More Fragments -bit, except for the last fragment Compute Fragment Offset value Multiple of 8 bytes, offset of the data in the original packet Re-Compute header checksum Relevant fields in IP packet header: Ver HL TOS Total length Identification D,M Fragment offset TTL Protocol Header checksum... Flags: D = Don t fragment M = More fragments 12
IPv4 Reassembly Fragmented packet arrives if either More Fragments" flag is set Fragment Offset" field is non-zero Store all related packets (final size yet unknown) Wait until packet with MF=0 arrives Original IP packet length: Fragment Offset + Total Length Reassemble packet in original order Relevant fields in IP packet header: Ver HL TOS Total length Identification D,M Fragment offset TTL Protocol Header checksum... Flags: D = Don t fragment M = More fragments 13 Internet Addressing
IPv4 Adressing 32-bit " 2 32 # 4.29 Billion addresses (in theory) Some reserved (e.g., private networks: ~18 million, multicast : ~270 million) 31 24 23 16 15 8 7 0 Binary value: 11010100 01111110 11010000 10000111 Dotted decimal notation: 212. 126. 208. 135 Types of Addresses Unicast Identifies a single network interface (multiple interfaces: multi-homing) May be used as source- and destination address Broadcast Addresses all hosts in a certain scope (e.g., on a link), only as destination Multicast Addresses a group of interfaces (hosts) Evolution of IPv4 Addressing How to structure the address space? Goals Hierarchical address allocation and routing Support for multi- and broadcasting History ARPANET: highest 8 bit as network identifier: 254 networks RFC 791, 1981: Classful IP addressing Later: additional levels of hierarchy (1985-1987) 1993-Until today: Classless Inter-Domain Routing (CIDR) 6-16
IPv4: Classful Addressing Address space divided into 5 classes 5 classes: A-E Fixed prefix (1-4 bit) depending on the network class Class Prefix Address Range Networks Hosts A 0 001.0.0.0-127.255.255.255 128 16M B 10 128.0.0.0-191.255.255.255 16k 65k C 110 192.0.0.0-223.255.255.255 2M 256 D 1110 224.0.0.0-239.255.255.255 268M groups E 1111 240.0.0.0-255.255.255.255 reserved 17 IPv4: Classful Addressing Networks assigned by Internet Assigned Numbers Authority (IANA) Host identifiers assigned by local authority (e.g., an administrator) 8 bits (128 nets) 24 bits (2 24 # 16M hosts) 0 network host 16 bits (2 14 nets # 16K hosts) 16 bits (2 16 # 65K hosts) 10 network host 24 bits (2 21 # 2 M nets) 8 bits (256 hosts) 110 network host 28 bits (2 28 groups) 1110 multicast group address 1111 reserved 18
IPv4: Classful Addressing: Special Addresses Network Host Description net-id All 0 Network Address: Not a source/destination but defines a network (e.g., for routing). Example: 212.126.208.0 (net-id 212: Class C) net-id All 1 All 1 All 1 127 Arbitrary Broadcast Address: Destination of a packet. Addresses all stations of a network. Example: 212.126.208.255 Network-Broadcast Address: Destination address only. Addresses all hosts of a network. Not forwarded by routers. Example: 255.255.255.255 Loopback Address: Useful for tests, local host. Example: 127.0.0.1, 127.34.43.1 All 0 host-id or all 0 Special address for bootstrapping (e.g., DHCP) Example: 0.0.0.0 19 IPv4: Subnetting Network sizes Class C: 256 hosts! to few for an organization Class B: 65K hosts! too much for most organizations Class A: 16mio. hosts! only for large ISPs Problems Fixed class sizes led to IP address exhaustion Many IP addresses were unused but could not be reassigned Routers experienced heavy loads Large routing tables: No route aggregation possible! Sub-networks were created by splitting the host into sub-network/host 20
IPv4: Subnetting Advantages Subnetworks give additional structure to the host part Routers are agnostic to this structure! only one routing table entry Subnetmasks describe structure of IP addresses Information no longer contained in the IP address Address Structure for address block assigned to a network: network host Address structure for subnetted network: network subnet host Example: Assigned Class B network address block network host Example: Subnetting with 8 subnet bits, 8 host bits (256 hosts/subnet) network subnet host Binary subnet mask: 11111111 11111111 11111111 00000000 Dotted-decimal subnet mask: 255. 255. 255. 0 21 IPv4: Subnetting Subnetting creates sub-networks of equal size Problems Still an inefficient use of IP addresses IP address space exhausted in the 1990s Nearly no route aggregation possible (Backbone router would need to store 2mio. entries only for Class C networks) Solution Classless Inter-Domain Routing (CIDR) 22
Classless Inter-Domain Routing (CIDR) Classless Inter-Domain Routing (CIDR) Replaces fixed <network, sub-network, host> structure Arbitrary network/host size (2 N, 2 32-N ) Networks are specified using /N syntax Example: 212.126.208.0/24 Allows upstream path aggregation Smaller routing tables 24
Example: Classless Inter-Domain Routing (CIDR) ISP-0 Aggregated route 200.10.128.0/18 s2 R0 s1 (128 class C blocks, from 200.10.0.0 up to 200.10.127.0) R11 2048 addresses 200.10.0.0/21 8 class C (0-7) Aggregated route 200.10.0.0/17 ISP-2: 200.10.128.0/18 s1 s0 R2 s2 R12 1024 addresses 200.10.8.0/22 4 class C (8-11) ISP-1: 200.10.0.0/17 R1 s3 s4 R13 512 addresses 200.10.12.0/23 2 class C (12-13) R14 256 addresses 200.10.14.0/24 1 class C (14) Router R0 - Routing table Route Interf. Next hop 200.10.0.0/17 s1 R1 200.10.128.0/18 s2 R2......... Router R1 - Routing table Route Interf. Next hop 200.10.0.0/21 s1 R11 200.10.8.0/22 s2 R12 200.10.12.0/23 s3 R13 200.10.14.0/24 s4 R14......... 25 CIDR: Properties Routing decision based on prefixes Prefix length not evident from IP address (use of CIDR /xx syntax mandatory) Address allocation based on topology (ISP! reseller! customer) Must be signaled out of band (e.g., BGP) Routing tables entries may contain overlapping entries A longer prefix is more specific Routing uses longest prefix match to select outgoing link 26
CIDR: Longest Prefix Match (Examples) Entries: 192.168.20.16/28 & 192.168.0.0/16 IP-Address to match: 192.168.20.19 Both network masks match! /28 is used IP / Netmask IP / Netmask [binary notation] 192.168.20.16/28 /28 11111111 11111111 11111111 11110000 Entry 11000000 10101000 00010100 00010000 192.168.20.19 IP 11000000 10101000 00010100 00010011 192.168.0.0/16 /16 11111111 11111111 00000000 00000000 Entry 11000000 10101000 00000000 00000000 192.168.20.19 IP 11000000 10101000 00010100 00010011 27 CIDR: Limitations CIDR provides better address space utilization Without CIDR: address space exhaustion in the 1990s Still, the 2 32 limit sustains Prediction: Last IP addresses assigned 2012 [potaroo.net] Current countermeasures Network address translation (NAT) Dynamic Host Configuration Protocol (DHCP) HTTP Name-based virtual hosting Network renumbering (reclaim IP address blocks space allocated in the early days of the Internet) Use of IPv6 28
Literature [potaroo.net] IPv4 Address Report, http:// www.potaroo.net/tools/ipv4/index.html #29