Communication Networks Winter 2017/18

Communication Networks

Chapter 9 – The

Communication Networks: 9. The Internet 438

Overview

1. (Version 4) 2. Auxiliary Protocols in the Internet Layer 3. Internet Protocol (Version 6) 4. in the Internet 5. 6. 7. Applications a. E-Mail b. File Transfer c. Voice over IP d. World Wide Web

Communication Networks: 9. The Internet 439

Prof. Jochen Seitz 1 Communication Networks Winter 2017/18

9.1 IPv4 Repetition: The Internet Protocol Reference Model

Application Layer Application protocols implement application-specific functionalities

Transport Layer Data transmission end-to-end

Internet Layer Routing and addressing

Data Interface to the physical medium Network-to- (N2H) Physical Layer

The OSI layers 5 to 7 are integrated into one .

Communication Networks: 9. The Internet 440

9.1 IPv4 The Internet Layer

Transport Layer (TCP, UDP, ...) Internet Layer

Routing Protocols IP - Routing tables - Addressing - RIP, OSPF, BGP, ... - Packet format - Packet processing

Routing ICMP Table - Error/state messages - Control

ARP/RARP IGMP / DHCP / - Address translation NAT / CIDR / IP  MAC RSVP / ...

Network to Host Layer

Communication Networks: 9. The Internet 441

Prof. Jochen Seitz 2 Communication Networks Winter 2017/18

9.1 IPv4 The Internet Protocol

• History: . Initiated by the American Department of Defense (DoD) . Deployed in the so called ARPANET in 1969 (originally 4 hosts!) • Current state and further developments: . IP is the most commonly used layer-3-protocol nowadays . 1998, the project IPng (IP next generation) of the IETF (Internet Engineering Task Force) led to the new version IPv6

LAN

L A N Router Router Router

Communication Networks: 9. The Internet 442

9.1 IPv4 Characteristics of IP

• Packet-switched • Connectionless () • Unsecured data transmission: . may get lost . Datagram may get duplicated . Datagrams may overtake each other during transmission . Datagrams might circulate endlessly (theoretically…) . Errors on layer below cannot be corrected by IP entity . With the protocol ICMP (Internet Control Message Protocol) a means to report fatal errors is available • No flow control • No explicit congestion control • IP is used in both private and public networks worldwide • Global unique (hierarchical) IP addresses are necessary

Communication Networks: 9. The Internet 443

Prof. Jochen Seitz 3 Communication Networks Winter 2017/18

9.1 IPv4 Interworking with IP

LAN 1 WAN LAN 2

End System A End System B Router X Router Y TCP TCP IP IP IP IP t1 t6 t7 t12 t13 t18 LLC t t LLC X.25 t X.25 LLC LLC MAC 2 5 MAC HDLC 8 t11 HDLC MAC t14 MAC t17 t t PhL 3 4 PhL X.21 t9 t10 X.21 PhL t15 PhL t16

IP-H TCP-H Data t1, t6, t7, t12, t13, t18

LLC1-H IP-H TCP-H Data t2, t5

MAC1-H LLC1-H IP-H TCP-H Data MAC1-T t3, t4

X.25-H IP-H TCP-H Data t8, t11

HDLC-H X.25-H IP-H TCP-H Data HDLC-T t9, t10

LLC2-H IP-H TCP-H Data t14, t17

MAC2-H LLC2-H IP-H TCP-H Data MAC2-T t15, t16 Communication Networks: 9. The Internet 444

9.1 IPv4 IP Addresses

• Originally 5 address classes (32 bit length): . Class A for networks with up to 16 Mio. nodes 0 1 2 4 8 16 24 31 0 Network ID Node ID . Class B for networks with up to 65.536 nodes 1 0 Network ID Node ID

. Class C for networks with up to 256 nodes 1 1 0 Network ID Node ID

. Class D for 1 1 1 0

. Class E, reserved for future applications 1 1 1 1 0 reserved Communication Networks: 9. The Internet 445

Prof. Jochen Seitz 4 Communication Networks Winter 2017/18

9.1 IPv4 IP Subnetwork Addresses

. IP-Address (e.g. class B): Network Part Local Part

Network Part Subnetwork Part End System

. Subnetwork masks  network part and the subnetwork part (binary „1“s) . Example: IP Address: 129. 13. 3. 64 Subnetwork Mask: 255. 255. 255. 0 1111 1111 1111 1111 1111 1111 0000 0000 Network ID: 129. 13. Subnetwork ID: 3. End System: 64 . The network ID can be derived from the address class . If the subnetwork mask only covers the network part, there will be no subnetwork part (e. g. 255.255.0.0) Communication Networks: 9. The Internet 446

9.1 IPv4 IP Subnetworking: Example

Transition Computer Center - Institute 129.13.3 129.13.3.* 129.13.3.* 129.13.35.* 129.13.41.* 129.13.42.* 129.13.35 Router Router 129.13 129.13.41 University FDDI Network 129.13.41.* Ethernet

Router-RZ 129.13.42

129.13.*.* 129.13.42.* Ethernet Internet Communication Networks: 9. The Internet 447

Prof. Jochen Seitz 5 Communication Networks Winter 2017/18

9.1 IPv4

Delay Reliability Reserved Don‘t Fragment Throughput Cost Reserved More Fragments

Precedence D T R C 0 0 DF MF IPv4 Datagram Bit 0 3 7 15 31 Note: no sequence number Version Hdr.Len Type of Service Total Length Identifier Flags Fragment Offset

Time to Live Protocol Header Checksum Header

Source Address - IP Destination Address

Options and Padding

Data

Communication Networks: 9. The Internet 448

9.1 IPv4

Version Version number of IP (4) Header Length Length of IP header (in words of 32 bits) TOS / DiffServ Quality of service information IPv4 Datagram: Total Length Length of total datagram Identifier Datagram identifier (no sequence number!) Fields Flags Needed for segmenting TOS: Type of Service Fragmentation Offset Needed for Reassembly DiffServ: Differentiated Services Time to Live Maximum lifetime for the datagram Protocol Protocol of the higher layer (e.g. 6=TCP, 17=UDP) Header Checksum Error detection for header Source/Destination Address Source and destination system Options Additional information for special functions Padding for 32-Bit-Alignment Data User information

Communication Networks: 9. The Internet 449

Prof. Jochen Seitz 6 Communication Networks Winter 2017/18

9.1 IPv4 IP Routing

• Each IP entity has its routing table • According to the destination address, the table entry is chosen that defines the next hop: . Check the host addresses . Check the network addresses . Look for default entry

Destination is… Route MAC frame is addressed to… … directly connected Direct Route Destination System … not directly connected Indirect Route Next Router

Communication Networks: 9. The Internet 450

9.1 IPv4 Routing Example

• The following destination nodes shall be addressed . 129.13.35.73 (sioux.telematik.informatik.uni-karlsruhe.de) . 132.151.1.19 (www.ietf.org) • The system‘s routing table looks like this: Destination Gateway Flags Refs Use Interface Default i70lr0 UGS 1 13320 tu0 127.0.0.1 localhost UH 7 242774 lo0 (localhost) 129.13.3 i70r35 UGS 0 6 tu0 129.13.35 mohave U 11 3065084 tu0 129.13.41 i70r35 UGS 2 4433 tu0 129.13.42 i70r35 UGS 0 4 tu0

Communication Networks: 9. The Internet 451

Prof. Jochen Seitz 7 Communication Networks Winter 2017/18

9.1 IPv4 IP-Multicasting

• An IP datagram intended for more than one end system (optional) • Group of receiving nodes is managed using IGMP (Internet Group Management Protocol) • The address is a class D address starting with 1110 followed by a 28 bit long group ID

• Example Multicast A B Group Member Multicast Datagram Router R being delivered C 1 D (Multicast-)Router F Datagram coming from the Internet with E destination address H 1110 + Multicast Group Router R2

Communication Networks: 9. The Internet 452

9.1 IPv4 IP Functions: Header Check

• Checking the IP datagram header: . Checking the correct header length . Checking the IP version number . Checking the correct length of the datagram . Checking the header checksum . Checking the time to live . Checking the protocol ID . Checking the address classes of both source and destination address • If one check fails, the IP datagram will be discarded and an ICMP error message will be sent to the sender of the IP datagram

Communication Networks: 9. The Internet 453

Prof. Jochen Seitz 8 Communication Networks Winter 2017/18

9.1 IPv4 IP Function: Source Routing

• Usually, the IP entity is responsible for forwarding the datagram. • The sending protocol entity on top of IP may also define the path (a list of intermediate nodes) the packet must take to reach its destination: . Use pointer P to address the next router . This pointer then replaces its address with the outgoing address and increments pointer P by four [bytes] • Strict Source Routing . The sender has to define the complete path for the packet to the destination. • Loose Source Routing . The sender only specifies a subset of all the nodes on the path to the destination . Additional intermediate nodes will be chosen by the IP entities on the routers accordingly . Using the “Route Recording” option, the path of the packet is logged in the options field of the header

Communication Networks: 9. The Internet 454

9.1 IPv4

128.2.3.4/ 128.7.1.3 128.10.4.12/ IP Function: 128.2.14.16 128.7.8.9/ 128.9.12.4 128.10.4.2 Source Routing S (1) (2) (3) – Example D 128.9.3.17 128.7.3.9/ 128.2.5.7/ 128.33.5.8 128.11.2.4 128.33.7.6/ 128.10.7.7 128.33.4.9/ 128.9.1.2 128.11.2.7/ 128.33.4.4

Options P 128.2.3.4 128.7.8.9 128.10.4.12 (1)

IP P 128.7.1.3 128.7.8.9 128.10.4.12 (2) Data- gram P 128.7.1.3 128.10.4.2 128.10.4.12 (3)

Communication Networks: 9. The Internet 455

Prof. Jochen Seitz 9 Communication Networks Winter 2017/18

9.1 IPv4

128.2.3.4/ 128.7.1.3 128.10.4.12/ 128.2.14.16 128.7.8.9/ 128.9.12.4 128.10.4.2 IP Function: S D 128.9.3.17 Route Recording 128.7.3.9/ 128.2.5.7/ 128.33.5.8 In the datagram‘s option 128.11.2.4 128.33.7.6/ 128.10.7.7 field, the path is logged: 128.33.4.9/ 128.9.1.2 128.11.2.7/ 128.33.4.4

Options P 128.2.3.4 empty empty IP 1. Add your address in the field given by pointer P... Data- P 128.2.3.4 empty empty gram 2. ... and increment pointer P by 4 [byte] so that it points to the next empty entry in the list

Communication Networks: 9. The Internet 456

9.1 IPv4 IP Function: Time Stamp

• Each router adds a time stamp to the options field, which defines the point in time, at which the router processed the datagram. . Statements on the network load are possible . Efficiency of the routing algorithms cam be deduced • A 4 bits long field defines the possibilities: . Flag = 0: Just include time stamps, but no addresses. . Flag = 1: Both time stamps and addresses are logged (Route Recording) . Flag = 3: Addresses are given by the sender Source Routing), routers add their time stamps

Communication Networks: 9. The Internet 457

Prof. Jochen Seitz 10 Communication Networks Winter 2017/18

9.1 IPv4 IP Function: Segmentation and Reassembly

• To support different maximum transmission units (MTUs), IP provides segmentation and reassembly: . Example Ethernet: 1.500 byte user information • Information for segmentation and reassembly are stored in the header of the datagram: . Flags  Bit 0: Reserved  Bit 1: 0 = datagram may be segmeted 1 = datgram may no be segmented  Bit 2: 0 = last segment 1 = more segments to come . Fragment Offset  Gives the position, where the segment has to be included into the original message (unit 8 bytes)

Communication Networks: 9. The Internet 458

9.1 IPv4 IP Function: Segmentation and Reassembly – Example

• Example for computing the fragment offsets Datagram Data 1400 bytes Header Data 1 Data 2 Data 3 600 bytes 600 bytes 200 bytes

Fragment 1 Data 1 Header Fragment Offset: 0 Fragment 2 Data 2 Fragment Offset: 600/8 = 75 Header Fragment 3 Data 3 Fragment Offset: 1200/8 = 150 Header

Communication Networks: 9. The Internet 459

Prof. Jochen Seitz 11 Communication Networks Winter 2017/18

9.1 IPv4 IP: Resume

• Although IP is the most important protocol in the Internet, it does not provide all the required functionalities. Thus, there must be set of other protocols extending the functionality of the Internet layer. • The number of IP addresses has currently reached ist limits (though there are theoretically 232 = 4,294,967,296 addresses) . New scheme for addressing is required . The IP protocol has to be changed radically . Currently, there are some „patches“ to still work with the limited address space, but soon we run out of IP addresses!

Communication Networks: 9. The Internet 460

9.1 IPv4 Requests for Comments RFCs

• POSTEL, J.: Internet Protocol – DARPA Internet Program Protocol Specification, September 1981 (RFC 791). • NICHOLS, K.; BLAKE, S.; BAKER, S.; BLACK, D.: Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers. December 1998 (RFC 2474).

Communication Networks: 9. The Internet 461

Prof. Jochen Seitz 12 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer The Internet Layer

Transport Layer (TCP, UDP, ...) Internet Layer

Routing Protocols IP - Routing tables - Addressing - RIP, OSPF, BGP, ... - Packet format - Packet processing

Routing ICMP Table - Error/state messages - Control

ARP/RARP IGMP / DHCP / - Address translation NAT / CIDR / IP  MAC RSVP / ...

Network to Host Layer

Communication Networks: 9. The Internet 462

9.2 Auxiliary Protocols in the Internet Layer Internet Control Message Protocol (ICMP)

• If packets are discarded due to overload, the router will not notify the sender about it • Fatal problems (e.g. link failure) will be reported via ICMP in order to prevent subsequent faults

IP Datagram ICMP Message

Router

Link Sender Router Failure Router Receiver Router • ICMP provides error messages, status requests and state information

Communication Networks: 9. The Internet 463

Prof. Jochen Seitz 13 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer ICMP: Error Messages

• Destination unreachable: A packet could not be delivered, because the destination node is not available e.g. due to link or router failure. • Time exceeded: A packet has been discarded because its time to live counter has been decremented to zero. • Parameter problem: A packet has been discarded because the node could not deal with one of the parameters in the packet header (e.g. version number). • Source quench: An overloaded node requests the sender to decrease the transmission rate. In IP Version 4 routers are not allowed to originate a source quench and are not obligated to act on a received source quench. • Redirect: A packet should better be sent over another path.

Error Messages contain a field that explains the reason for the error in detail, e.g. network unreachable error or host unreachable error in the message destination unreachable.

Communication Networks: 9. The Internet 464

9.2 Auxiliary Protocols in the Internet Layer ICMP: Status Requests

• Echo and Echo Reply: Serves to monitor the activity of an Internet node. The receiver of an echo message sends an echo reply message with the received information to the sender. • Timestamp and Timestamp Reply: Serves to estimate packet round trip times. There are several fields in the packet containing time stamps which characterize the packet processing at the receiver and the delays in the network. Sender Receiver

Starting Time T0 Request [T0 , x, x]

Round Time of Receiption TE Trip Time Time Time of Sending TS

T1 Reply [T0 , TE, TS]

Communication Networks: 9. The Internet 465

Prof. Jochen Seitz 14 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer ICMP: Packet Format

• Transmission of ICMP messages IP Packet Header ICMP Message . ICMP messages transmitted in the data portion of an IP datagram [Protocol = 1] . Value of the “protocol” field in the IP header: “1”

Type Code Checksum Info • Format of ICMP messages . Type: message type (e.g. 3 means “Destination Unreachable”) . Code: detailed explanation of the message (e.g. 1 means “Host Unreachable”) . Checksum: error detection mechanism for the complete ICMP message . Info: depends on message type (e.g. fields for time stamps).

Communication Networks: 9. The Internet 466

9.2 Auxiliary Protocols in the Internet Layer ICMP: traceroute

Traceroute to www.ietf.org [4.17.168.6]:

1 <10 ms <10 ms <10 ms 141.24.95.253 2 <10 ms <10 ms <10 ms golden-gate.rz.tu-ilmenau.de [141.24.189.235] 3 <10 ms <10 ms <10 ms ar-ilmenau1.g-win.dfn.de [188.1.35.193] 4 <10 ms <10 ms <10 ms cr-leipzig1.g-win.dfn.de [188.1.70.37] TTL in 5 <10 ms 10 ms 10 ms cr-frankfurt1.g-win.dfn.de [188.1.18.97] IP datagram 6 10 ms 10 ms <10 ms so-6-0-0.ar2.FRA2.gblx.net [208.48.23.141] 7 10 ms 10 ms <10 ms pos3-0-622M.cr1.FRA2.gblx.net [62.16.32.73] 8 90 ms 90 ms 100 ms pos5-0-2488M.cr1.BOS1.gblx.net [64.212.165.130] 9 90 ms 100 ms 100 ms so0-1-0-622m.br1.BOS1.gblx.net [206.132.247.78] 10 90 ms 100 ms 100 ms 208.51.74.62 11 90 ms 90 ms 101 ms so-3-0-0.bstnma1-nbr1.bbnplanet.net [4.24.4.218] 12 90 ms 90 ms 101 ms p7-0.cambridge1-nbr1.bbnplanet.net [4.24.6.30] 3 packets 13 90 ms 90 ms 91 ms p2-0.cambridge1-cr1.bbnplanet.net [4.1.80.5] 14 100 ms 120 ms 111 ms s0.foretec.bbnplanet.net [4.1.138.146] 15 110 ms 110 ms 121 ms 4.17.168.6

End of trace.

Communication Networks: 9. The Internet 467

Prof. Jochen Seitz 15 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer Address Resolution Protocol (ARP)

• Task: . Mapping: IP Address  Layer-2-Address (MAC Address) . Example: PC „Sioux”:  IP-Address: 129.13.35.73  Ethernet Address: 08-00-2b-a2-80-dd • Modus operandi: . ARP receives an IP address for address resolution. . ARP sends a broadcast packet in the LAN containing the IP address. . All stations in the LAN receive this packet, but only the station that recognizes its IP address sends a reply. . The reply is stored in the originating station to avoid continuous ARP requests. . However, the entry must be deleted after a certain time.

Communication Networks: 9. The Internet 468

9.2 Auxiliary Protocols in the Internet Layer ARP: Example

129.13.35.71 Wanted: Hardware IP Address for 129.13.35.73 ARP (1) „Station 129.13.35.71 looks for station 129.13.35.73”

ARP ARP 129.13.35.73 129.13.35.75 (2) „I am station 129.13.35.73 and my MAC address is 08-00-2b-a2-80-dd”

Communication Networks: 9. The Internet 469

Prof. Jochen Seitz 16 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer ARP: Packet Format

• Transmission of an ARP message: . An ARP message is transferred in the information part of a data link frame. MAC/LLC ARP Message Packet Header • Format of ARP messages Bit 16 Bit 1 Type of physical address e.g. Ethernet Protocol of e.g. IP Length of Length of e.g. 6 byte or. 4 byte phys. address layer 3 address Type of message e.g. 1 for „request” e.g. Ethernet addr. Sender; IP addr. Sender Address fields Ethernet addr. Receiver; IP addr. Receiver

 Length and structure of the address fields depend on the type of the addresses Communication Networks: 9. The Internet 470

9.2 Auxiliary Protocols in the Internet Layer Reverse Address Resolution Protocol (RARP)

• Task: . Mapping MAC address  IP address . Used for diskless work stations that boot from a file server. Therefore, they need their IP address which they do not know when being switched on. . The file server only holds one operation system for all diskless works stations. • Modus operandi: . Station sends out a broadcast with its own MAC address given by the network card. . RARP server receives the broadcast and looks up the according IP address in a configuration file. . RARP server sends this IP address back to the MAC address given by the sender of the broadcast frame.

Communication Networks: 9. The Internet 471

Prof. Jochen Seitz 17 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer Internet Group Management Protocol (IGMP)

• Problem: . How does a router know, which multicast packets have to be forwarded over which network interfaces? • Example: G ? L 1 Receiver of WAN Router A Gi N Multicast group i G3 . Packets addressed to the groups 1 and 3 have to be forwarded to the LAN . Packets belonging to other groups can be discarded • Solution: . Manual entry of all group addresses in the configuration of the router  high effort in administration for dynamically changing groups . Self organized learning of the groups by exchanging information  such a procedure is defined by the Internet Group Management Protocol (IGMP)

Communication Networks: 9. The Internet 472

9.2 Auxiliary Protocols in the Internet Layer IGMP: Protocol Operation (I)

1. Router periodically sends 2. Starting a timer at each receiver „Membership Query“ - initialized with a random number - broadcast on all interface - for all groups it belongs to. - „Time To Live” (TTL) = 1 1. When timer expires, station replies with a „Membership Report“ - addressed to the group ID - „Time To Live” (TTL) = 1

WAN Router WAN Router

G G G G G G

Communication Networks: 9. The Internet 473

Prof. Jochen Seitz 18 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer IGMP: Protocol Operation (II)

4. All group members receive „Membership Report“ - stop their timer - avoid redundant replies 5. The router receives all „Membership Reports“ - accordingly updates its routing table - repeatedly missing „Membership Report“ leads to deletion of the entry

 If a station wants to join a group - send a „Membership Report“ to all routers connected to the LAN - repeat the message until an according „Membership Query“ is received

Communication Networks: 9. The Internet 474

9.2 Auxiliary Protocols in the Internet Layer IGMP: Packet Format

IP Packet Header • Transmission of IGMP messages IGMP Message [Protocol = 2] . IGMP messages are transmitted in the information field of an IP datagram. The protocol ID is 2.

IGMP-Version IGMP-Type Unused Checksum Group Address

• Format of IGMP messages . IGMP-Version: Version of the IGMP protocol (currently version 3). . IGMP-Type: Type of the message (e.g. 11 = query, 22 = report). . Unused: set to 0. . Checksum: error detection of the complete IGMP message. . Group Address: Set to 0 in a query message, otherwise it contains the group address the report is related to.

Communication Networks: 9. The Internet 475

Prof. Jochen Seitz 19 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer Classless Inter-Domain Routing (CIDR)

• Up to now: . 3 address classes for IP unicast . Many addresses cannot be used because they have been assigned to a certain network • Example: . A small company needs about 100 IP addresses  it applies for a class C address . 254 addresses are assigned  154 addresses remain unused • CIDR: Substitute the fixed classes by variable network prefixes with a length from 13 to 27 bits . Example: 129.24.12.0/14:  First 14 bits of the IP address – network ID  Remaining 18 bits – subnetwork / end system . Hierarchical routing now possible:  Backbone router, e.g. part of a transatlantic link, only considers the first 13 bits: smaller routing tables, low computation effort  Routers of connected providers then consider e.g. the first 15 bits  Finally, a router in a company network with 128 hosts considers the first 25 bits

Communication Networks: 9. The Internet 476

9.2 Auxiliary Protocols in the Internet Layer Network Address Translation (NAT)

• Problem: . Addresses have to be globally unique, even when CIDR is used • Idea: . In a company network, only those nodes require a globally unique address that want to communicate with another node somewhere outside the company‘s network . This globally unique address can be temporarily assigned . Addresses are administered in an address pool by the gateway . If there are too few globally unique addresses, a port mapping can help in distinguishing the different communication associations

Communication Networks: 9. The Internet 477

Prof. Jochen Seitz 20 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer NAT: Process

DST=10.0.0.5 DST=128.211.114.51 SRC=10.0.0.5 SRC=128.211.114.51

10.0.0.5 Address Translation 10.0.0.6 LAN Gateway Internet Internet Address Traffic Pool

10.0.0.7 Globally unique IP addresses: Local IP addresses • 128.211.114.51 assigned to 10.0.0.5 that are unique • 128.211.114.52 in the LAN only • 128.211.114.53

Communication Networks: 9. The Internet 478

9.2 Auxiliary Protocols in the Internet Layer Dynamic Host Configuration Protocol (DHCP)

• Task . Simplify the installation and administration of networked stations. . Provide necessary information about IP address, DNS server address, domain name, subnetwork mask, gateway, etc. . Automatically integrate a new station into the LAN / the Internet. . Based on ! • Client/Server Model . Client sends a request (via broadcast) to a DHCP server (possibly over a DHCP relay) . DHCP server provides the required information

Communication Networks: 9. The Internet 479

Prof. Jochen Seitz 21 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer DHCP: Process

1. Server is directly connected 2. Server is not directly connected: use of a DHCP relay

DHCPDISCOVER

DHCPDISCOVER DHCPDISCOVER

Server Other Dev. Relay Other Device Server Client Client Other Dev.

Communication Networks: 9. The Internet 480

9.2 Auxiliary Protocols in the Internet Layer Point-to-Point Protocol (PPP)

• The biggest part of the Internet is based on point-to-point links: . Links between routers in the WAN . Subscriber line to the Internet Provider • Predecessor Serial Line IP SLIP (RFC 1055):  No error detection  Support of IP only  No dynamic address assignment  No authentication • Point-to-Point Protocol PPP (RFC 1661 ff.) offers among other:  Layer 2 frame with error detection and frame boundaries  Control protocol (LCP, Link Control Protocol) for connection setup, connection test, connection negotiation and connection teardown  Possibility to negotiate options of network layer independently of the network layer protocol  Separate NCP (Network Control Protocol) for all supported protocols on the network layer

Communication Networks: 9. The Internet 481

Prof. Jochen Seitz 22 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer PPP: Packet Format

• Packet format according to HDLC: 1 1 1 1 or 2 variable 2 or 4 1 Bytes Flag Address Control Flag Protocol Payload Checksum 01111110 11111111 00000011 01111110

. Character-oriented (instead of bit-oriented), therefore character stuffing . Typically, only unnumbered frames are used . At high error rates (e.g. over a radio link), a more reliable mode with sequence numbers and acknowledgments can be selected . PPP support the following protocols in the payload field: IP, AppleTalk, IPX (among others) . The maximum payload length is set to 1,500 bytes if not negotiated otherwise . Length of the packet header can also be negotiated

Communication Networks: 9. The Internet 482

9.2 Auxiliary Protocols in the Internet Layer Recapitulation

• The Internet layer is not consisting of IP alone! • Functions that have to be provided by other protocols are . Notification of errors . Translation of addresses . Configuration of stations . Management of group members . Exchange of routing information

Communication Networks: 9. The Internet 483

Prof. Jochen Seitz 23 Communication Networks Winter 2017/18

9.2 Auxiliary Protocols in the Internet Layer RFCs (1)

• ARKKO, J.; PIGNATARO, C.: IANA Allocation • EGEVANG, K.; SRISURESH, P.: Traditional IP Guidelines for the Address Resolution Network Address Translator (Traditional NAT), Protocol (ARP), April 2009 (RFC 5494). Januar 2001 (RFC 3022). • CAIN, B.; DEERING, S.; KOUVELA, I.; FENNER, B.; • FINLAYSON, R.; MANN, T.; MOGUL, J.; THEIMER, M.: THYAGARAJAN, A.: Internet Group Management A Reverse Address Resolution Protocol, Juni Protocol, Version 3. Oktober 2002 (RFC 3376). 1984 (RFC 903). • CHESHIRE, S.: IPv4 Address Conflict Detection, • FULLER, V.; LI, T.: Classless Inter-domain July 2008 (RFC 5227). Routing (CIDR): The Internet Address • DROMS, R.: Dynamic Host Configuration Assignment and Aggregation Plan. August Protocol, März 1997 (RFC 2131). 2006 (RFC 4632).

Communication Networks: 9. The Internet 484

9.2 Auxiliary Protocols in the Internet Layer RFCs (2)

• HOLBROOK, H.; CAIN, B.; HABERMAN, B.: • PLUMMER, D.C.: An Ethernet Address Using Internet Group Management Resolution Protocol – or – Converting Protocol Version 3 (IGMPv3) and Network Protocol Addresses to 48.bit Multicast Listener Discovery Protocol Ethernet Address for Trans-mission on Version 2 (MLDv2) for Source-Specific Ethernet Hardware, November 1982 (RFC Multicast, August 2006 (RFC 4604). 826). • LEMON, T.; SOMMERFELD, B.: Node-specific • POSTEL, J.: Internet Control Message Client Identifiers for Dynamic Host Protocol – DARPA Internet Program Configuration Protocol Version Four Protocol Specification, September 1981 (DHCPv4), February 2006 (RFC 4361). (RFC 792). • LEMON, T.; CHESHIRE, S.: Encoding Long • SIMPSON, W.: The Point-to-Point Protocol Options in the Dynamic Host (PPP), Juli 1994 (RFC1661). Configuration Protocol (DHCPv4), • SIMPSON, W.: PPP Vendor Extensions, Mai November 2002 (RFC 3396). 1997 (RFC 2153)

Communication Networks: 9. The Internet 485

Prof. Jochen Seitz 24 Communication Networks Winter 2017/18

9.3 IPv6 Motivation for a „New” Internet Protocol

• Problems with addressing . IP address space is not adequate any more . Class-B-addresses are not available any more . CIDR is only an interim solution . There is no real hierarchical addressing . Routing tables grow rapidly, which slows down routing • No real integration of security mechanisms • QoS requirements caused by multimedia applications

Communication Networks: 9. The Internet 486

9.3 IPv6 History of IPv6

1993 Call for Proposals for IP next generation (IPng) in RFC 1550 1994 Proposal: SIPP (Simple Internet Protocol Plus), a combination of three submissions 1995 Proposed Standard „Internet Protocol Version 6” in RFC 1883 first prototypic implementations  soft migration is required 1996 First IPv6 backbone (6Bone), first products in store 1998 IPv6 becomes draft standard in RFC 2460 2006 6Bone was shut down 2016 Global Internet infrastructure is still not upgraded to IPv6…

Communication Networks: 9. The Internet 487

Prof. Jochen Seitz 25 Communication Networks Winter 2017/18

9.3 IPv6 Overview of the Main Characteristics of IPv6

• Enhanced addressing scheme • New IP packet header format . Simple structure . Better integration of different options • Segmentation only end-to-end • Autoconfiguration of IP systems • QoS support • Integration of multicast • Security mechanisms

Communication Networks: 9. The Internet 488

9.3 IPv6 IPv6 Address

• 128 bits long addresses . Theoretically 3. 4  1038 addresses . Optimistic estimation: 700  1021 per m2 . Pessimistic estimation (RFC1715): 1,700 per m2 • New notation . 8 hexadecimal numbers containing 4 digits separated by colons 5800:0000:0000:0000:0000:0000:0056:0078 . Sequences of „0“ can be omitted 5800::56:78 • IPv6 addresses can contain topology information for localization

Communication Networks: 9. The Internet 489

Prof. Jochen Seitz 26 Communication Networks Winter 2017/18

9.3 IPv6 IPv6 Addresses: Aggregatable Unicast Address

• Top-Level Aggregation (TLA) . Huge Internet Service Providers (ISP) with transit networks, to which other ISPs are connected • Next-Level Aggregation (NLA) . Organizations on a lower level . Several NLA-levels possible • Site-Level Aggregation (SLA) . Individual address hierarchy of a single organization / company

Public Topology Site Topology 3 13 8 24 16

001 TLA ID Res. NLA ID SLA ID

Interface ID

Communication Networks: 9. The Internet 490

9.3 IPv6 IPv6 Addresses: Special Unicast Addresses

• Local Unicast Address . Addresses in the link-local prefix are only valid on a single link (comparable to the auto- configuration addresses). . Unique local addresses (ULA's) are intended for local communication. They are routable only within a set of cooperating sites. • Compatible Unicast Address . IPv4-mapped addresses: Prefix (96 „0”-Bits) + IPv4-Address . IPv4-translated addresses: Prefix (80 „0”-Bits + 16 „1”-Bits) + IPv4-Address as used by the Stateless IP/ICMP Translation (SIIT) protocol . IPX- or OSI-compatible • Unspecified Address . 0::0 (or ::) e.g. for booting • Loopback Address . 0::1 (or ::1) corresponds to v4 address 127.0.0.1

Communication Networks: 9. The Internet 491

Prof. Jochen Seitz 27 Communication Networks Winter 2017/18

9.3 IPv6 IPv6 Addresses: Anycast

• New type of address in IPv6 • Part of the unicast address space • A group of stations is addressed, only the station with the lowest load / smallest distance / best communication path… replies • For each anycast address, there is an entry in the routing table • Anycast addresses are relevant for routers • Application example: Distribution of a web server over several physical stations

Communication Networks: 9. The Internet 492

9.3 IPv6 IPv6 Addresses: Multicast

• All routers and end systems support multicast • There is a predefined multicast group for control and management tasks • IGMP was integrated into ICMPv6 • The multicast address additionally contains . Flags (for the distinction temporary/permanent) . Scope (to define the in which the packet is distributed)

1 1 1 1 1 1 1 1 Flags Scope Group Identification 112 bits 8 bits 4 bits 4 bits

Communication Networks: 9. The Internet 493

Prof. Jochen Seitz 28 Communication Networks Winter 2017/18

9.3 IPv6 Comparison of Addressing in IPv4 and IPv6

Type of Outgoing Destination IPv4 IPv6 Address Interfaces Nodes

Unicast Obligatory Obligatory 1 1

All members of Multicast Optional Obligatory Group the group

Broadcast Obligatory — All All

Anycast — Obligatory Group 1

Communication Networks: 9. The Internet 494

9.3 IPv6 Packet Headers – Comparison of IPv4 and IPv6

V HL TOS Total Length V C Flow Label

Identifier Segmentation Info Payload Length Next hdr. Hop Limit

TTL Protocol Header Checksum

IP Source Address 128 bit Source IPv6 Address IP Destination Address

20 bytes V: Version HL: Header Length TOS: Type of Service TTL: Time To Live 128 bit Destination IPv6 Address C: Class : deleted : shifted Communication Networks: 9. The Internet 40 bytes 495

Prof. Jochen Seitz 29 Communication Networks Winter 2017/18

9.3 IPv6 Extension Headers

• Chain of extension headers . Small minimal packet header . According to the requirements of the application and to the characteristics of the network, extension headers may be added in a given sequence . New options or extensions can be added easily • Routers need not process all the extension headers • Types of extension headers: . Hop-By-Hop Options . Routing . Fragment . Authentication Header (AH) . Encapsulating Security Payload (ESP) . Destination Options . No Next Header

Communication Networks: 9. The Internet 496

9.3 IPv6 Examples for Extension Headers

NH = Next Header TCP-Header IPv6-Header +Data NH

Routing TCP-Header IPv6-Header Header +Data NH NH

Routing Fragment TCP-Header IPv6-Header Header Header +Data NH NH NH

Communication Networks: 9. The Internet 497

Prof. Jochen Seitz 30 Communication Networks Winter 2017/18

9.3 IPv6 ICMPv6

• ICMPv6 substitutes the protocols ICMP(v4), IGMP(v4) and ARP(v4) • ICMPv6 is transmitted using IPv6  Value of „Next Header” field: 58 • Returns as many information as possible of the concerned packet without violating the minimal MTU (576 bytes) • Works like TCP and UDP with a pseudo header:

0 8 16 31 Type Code Checksum Depending on Type

Additional Data depending on Type

Communication Networks: 9. The Internet 498

9.3 IPv6 IPv6: Segmentation

• Only the sender may fragment the packet • If the packet is too big, the router will send an ICMPv6 message „packet too big” • The Maximum Transfer Unit (MTU) can be determined by information given in the ICMPv6 packet:

MTU= MTU= MTU= R1 R2 1500 576 1500 SYN; MSS=1440 SYN; ACK MSS=1440 Data; 1440 byte ICMPv6 error Packet too big MTU=576

Communication Networks: 9. The Internet 499

Prof. Jochen Seitz 31 Communication Networks Winter 2017/18

9.3 IPv6 IPv6: Support of Mobile Nodes

• Mobile nodes need a new configuration when they enter a new network • Using the autoconfiguration mechanism, they receive a new valid IP address • Still, their old IP address can be used to communicate with the mobile device • Thus, packets have to be forwarded from their original network to the new network

Home Network? Foreign Network

New current and old IP address

Communication Networks: 9. The Internet 500

9.3 IPv6 IPv6: Automatic Address Configuration

• „Plug & Play” . Acquisition of an IP address . Discovery of duplicated IP addresses . Address resolution . Determination of location-dependent parameters (subnet-ID, MTU, DNS server, ...) . Router discovery . Support of mobile devices • Neighbor Discovery . Special ICMP messages:  Router Solicitation / Advertisement  Neighbor Solicitation / Advertisement

Communication Networks: 9. The Internet 501

Prof. Jochen Seitz 32 Communication Networks Winter 2017/18

9.3 IPv6 IPv6: Security Mechanisms

• IPsec . Security on IP level . Encryption . Authentication • Implemented in special extension headers . Authentication Header  Data integrity  Sender identity . Security Encapsulation Header  Confidentiality  Integrity  Authenticity

Communication Networks: 9. The Internet 502

9.3 IPv6 IPv6 and Multimedia

• IPv6 is ready for multimedia streams . Flow Label  Packets with the same destination get the same flow label  These packets can be processed equally . Priority  Packets can be processed according to their priority  Rough differentiation  Non real time  Real time • Special mechanisms required in routers . No guarantees for special QoS requirements!

Communication Networks: 9. The Internet 503

Prof. Jochen Seitz 33 Communication Networks Winter 2017/18

9.3 IPv6 Migration to IPv6

• Currently, most nodes communicate over IPv4 • How can billions of nodes be migrated to IPv6? . Convert all nodes at one point in time – impossible! . Thus, slow graceful migration to IPv6: Both standards co-exist for a certain time! . Mechanisms  Tunneling IPv4 t  Dual Stack IPv6  Protocol translation according to the number of nodes working with IPv6

Communication Networks: 9. The Internet 504

9.3 IPv6 Migration Approach: Tunneling

• IPv6 router encapsulates IPv6 packets in IPv4 packets and forwards them to the next IPv6 router. . IPv6 communication between IPv6 routers (tunnel end points) . Other (IPv4) routers do not notice IPv6 communication . Addressing  Automatic (IPv4-compatible addresses) or  Configurable (statically configured addresses for tunnel end points)

IPv6 IPv6 Packet R1 IPv4 R3 IPv4 IPv4 R2 IPv6 IPv6 Packet R1 R2

Communication Networks: 9. The Internet 505

Prof. Jochen Seitz 34 Communication Networks Winter 2017/18

9.3 IPv6 Migration Approach: Dual Stack

• Both end nodes and routers possess two protocol stacks: IPv4 and IPv6 • The type of address given in the reply of the DNS server decides which stack should be used • DNS needs to support both protocols • Number of IPv4 addresses can be reduced by and by

Applications Socket Interface UDP for IPv4 TCP for IPv4 UDP for IPv6 TCP for IPv6 IPv4 etc. IPv6 etc. Network Interface

Communication Networks: 9. The Internet 506

9.3 IPv6 Migration Approach: Protocol Translation

• Translation of IPv4 packets into IPv6 packets • Application layer is independent of this translation process • Examples . Stateless IP/ICMP Translator (SIIT) . Network Address Translation – Protocol Translation (NAT-PT) . Socket-based IPv4/IPv6 Gateway . Bump In The Stack (BIS)

Communication Networks: 9. The Internet 507

Prof. Jochen Seitz 35 Communication Networks Winter 2017/18

9.3 IPv6 IPv6 in Praxis

• Operation systems usually support IPv6 • Many current devices also support IPv6 • But . Usually, IPv4 is used (protection of investment) . Add-ons to IPv4 allow the application of old technology . Applications still not need the new features of IPv6 or are satisfied with the add-ons to IPv4 • IPv6 is still subject to special research networks . 6bone, the first IPv6-Backbone was shut down on June 6, 2006 . Internet2 as platform to develop new applications based on IPv6 has not proven to be very successful

Communication Networks: 9. The Internet 508

9.3 IPv6 RFCs

• S. Bradner and A. Mankin, IP: Next Generation (IPng) • T. Narten, E. Nordmark, W. Simpson et al., Neighbor White Paper Solicitation, 1550, Discovery for IP version 6 (IPv6), Request for Comments Internet Engineering Task Force, 1993. 4861, Internet Engineering Task Force, 2007. • R. Callon and D. Haskin, Routing Aspects of IPv6 • E. Nordmark and R. Gilligan, Basic Transition Mechanisms Transition, Request for Comments 2185, Internet for IPv6 Hosts and Routers, Request for Comments 4213, Engineering Task Force, 1997. Internet Engineering Task Force, 2005. • A. Conta, S. Deering, and M. Gupta, Internet Control • S. Thomson, T. Narten, and T. Jinmei, IPv6 Stateless Message Protocol (ICMPv6) for the Internet Protocol Address Autoconfiguration, Request for Comments 4862, Version 6 (IPv6) Specification, Request for Comments Internet Engineering Task Force, 2007. 4443, Internet Engineering Task Force, 2006. • S. Deering and R. Hinden, Internet Protocol, Version 6 (IPv6) Specification, Request for Comments 2460, Internet Engineering Task Force, 1998.

Communication Networks: 9. The Internet 509

Prof. Jochen Seitz 36 Communication Networks Winter 2017/18

References References

• Comer, Douglas (2015): Computer Networks and . Sixth edition. Boston, Massachusetts: Pearson. • Comer, Douglas (2014): with TCP/IP. Sixth edition. Upper Saddle River: Pearson Education Inc. • Fall, Kevin R.; Stevens, W. Richard (2012): TCP/IP Illustrated. Volume 1: The Protocols. Second Edition. Upper Saddle River, N.J.: Addison-Wesley. • Kurose, James F.; Ross, Keith W. (2017): Computer Networking. A Top-Down Approach. 7th edition. Hoboken, New Jersey: Pearson. • Peterson, Larry L.; Davie, Bruce S. (2012): Computer Networks. A Systems Approach. 5th edition. Amsterdam: Morgan Kaufmann (The Morgan Kaufmann series in networking). • Tanenbaum, Andrew S.; Wetherall, David J. (2011): Computer Networks. 5th edition. Boston: Pearson Prentice Hall.

Communication Networks: 9. The Internet 510

Prof. Jochen Seitz 37