Review of Important Networking Concepts / / Protocol Suite Assignment of Protocols to Layers Addressing / Layers in the Example Encapsulation and Demultiplexing Different Layers Views of Networking
/ Protocol Suite Summary of OSI Layers Physical: how to transmit bits Data link: how to transmit frames Network: how to route packets Transport: how to send packets end2end Session: how to tie flows together Presentation: byte ordering, security Application: everything else Yuriy Shamshin, ys@academy.lv 2
/ Protocol Suite Summary of OSI layers Yuriy Shamshin, ys@academy.lv 3
/ Protocol Suite / and OSI model Yuriy Shamshin, ys@academy.lv 4
/ Protocol Suite Summary of / layers The layers in the / protocol suite do not exactly match those in the OSI model. The original / protocol suite was defined as having four layers: host-tonetwork, internet, transport, and application. However, when / is compared to OSI, we can say that the / protocol suite is made of five layers: partial physical, data link, network, transport, and application. The / protocol suite is the protocol architecture of the Internet. The / protocol stack does not define the lower layers of a complete protocol stack. Application Transport Network Data Link Data Link Media Access Control (MAC) User-level programs Operating system Sublayer in Local Area Networks Yuriy Shamshin, ys@academy.lv 5
/ Protocol Suite Services & Functions of the / Layers Each layer relies on services from layer below and exports services to layer above Interface defines interaction. Hides implementation - layers can change without disturbing other layers (black box). Data Link Layer: Service: Functions: Network Layer: Service: Functions: Transport Layer: Service: Functions: Reliable transfer of frames over a link Media Access Control on a LAN Framing, media access control, error checking Move packets from source host to destination host Routing, addressing Delivery of data between hosts Connection establishment/termination, error control, flow control Application Layer: Service: Functions: Application specific (delivery of email, retrieval of HTML documents, reliable transfer of file) Application specific Yuriy Shamshin, ys@academy.lv 6
/ Protocol Suite Layer Encapsulation, Protocol Multiplexing & Demultiplexing User A User B Get index.html Connection ID Source/Destination Link Address Yuriy Shamshin, ys@academy.lv 7
/ Protocol Suite Layer Encapsulation, Protocol Multiplexing & Demultiplexing Multiple choices at each layer FTP NV TFTP UDP X Network /UDP NET 1 NET 2 NET n Type Field Protocol Field Port Number Yuriy Shamshin, ys@academy.lv 8
/ Protocol Suite Layers and Services Service provided by to : reliable transmission of data over a logical connection Service provided by to : unreliable transmission of datagrams across an network Service provided by Ethernet to : transmission of a frame across an Ethernet segment Other services: DNS: translation between domain names and addresses ARP: Translation between addresses and MAC addresses Yuriy Shamshin, ys@academy.lv 9
/ Protocol Suite Assignment of Protocols to Layers ping application Telnet FTP DNS SNMP Application Layer UDP Transport Layer Routing Protocols ICMP R IGMP PIM Network Layer DHCP OSPF ARP Ethernet Data Link Layer Network Interface Yuriy Shamshin, ys@academy.lv 10
/ Protocol Suite Protocols Acronyms SNMP LLDP WAP S X PPP FTP UDP OSPF RTP ICMP IMAP BGP PIM RED ARP R SMTP NNTP SACK DNS POP VLAN MPLS RTSP BFD TLS NAT SSH LISP VTP TFTP MAC H IGMP ECN R CIDR STUN DHCP LDP Yuriy Shamshin, ys@academy.lv 11
Addressing / Yuriy Shamshin, ys@academy.lv 12
Addressing / Addressing Levels Four levels of addresses are used in an internet employing the / protocols: physical, logical, port, and specific. Yuriy Shamshin, ys@academy.lv 13
Addressing / Relationship of layers and addresses in / Yuriy Shamshin, ys@academy.lv 14
Addressing / Example of Physical (MAC) addresses The two nodes are connected by a link (bus topology LAN). As the figure shows, the computer with physical address 10 (is the sender) sends a frame to the computer with physical address 87 (is the receiver). Most local-area networks use a 48-bit (6-byte) physical (MAC) address written as 12 hexadecimal digits; every byte (2 hexadecimal digits) is separated by a colon, as shown below: 07:01:02:01:2C:4B A 6-byte (12 hexadecimal digits) physical address. Yuriy Shamshin, ys@academy.lv 15
Addressing / Example of Logical () addresses Figure below shows a part of an internet with two routers connecting three LANs. Each device (computer or router) has a pair of addresses (logical and physical) for each connection. In this case, each computer is connected to only one link and therefore has only one pair of addresses. Each router, however, is connected to three networks (only two are shown in the figure). So each router has three pairs of addresses, one for each connection. Note. The physical addresses willchange from hop to hop, but the logicaladdresses usually remain the same. Yuriy Shamshin, ys@academy.lv 16
Addressing / Example of Logical () addresses Yuriy Shamshin, ys@academy.lv 17
Addressing / Example of Port addresses Figure below shows two computers communicating via the Internet. A port address is a 16-bit address represented by one decimal number as show The sending computer is running three processes at this time with port addresses a, b, and c. The receiving computer is running two processes at this time with port addresses j and k. Process a in the sending computer needs to communicate with process j in the receiving computer. Note that although physical addresses change from hop to hop, logical and port addresses remain the same from the source to destination. 753 A 16-bit port address represented as one single number. Yuriy Shamshin, ys@academy.lv 18
Addressing / Example of Port addresses Yuriy Shamshin, ys@academy.lv 19
Layers in the Example Yuriy Shamshin, ys@academy.lv 20
Layers in the Example argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 21
Layers in the Example DNS: What is the address of neon.tcpip-lab.edu? argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 22
Layers in the Example DNS: The address of neon.tcpip-lab.edu is argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 23
Layers in the Example is not on my local network. Therefore, I need to send the packet to my default gateway with address 128.143.137.1 argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 24
Layers in the Example ARP: What is the MAC address of 128.143.137.1? argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 25
Layers in the Example ARP: The MAC address of 128.143.137.1 is 00:e0:f9:23:a8:20 argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 26
Layers in the Example argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router frame Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 27
Layers in the Example argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 frame Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 28
Layers in the Example is on my local network. Therefore, I can send the packet directly. argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 frame router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 29
Layers in the Example argon.tcpip-lab.edu "Argon" 128.143.137.144 ARP: What is the MAC address of? neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 30
Layers in the Example ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28 argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 31
Layers in the Example argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 Router Ethernet Network frame Ethernet Network Yuriy Shamshin, ys@academy.lv 32
Layers in the Example argon.tcpip-lab.edu "Argon" 128.143.137.144 neon.tcpip-lab.edu "Neon" router137.tcpip-lab.edu "Router137" 128.143.137.1 router71.tcpip-lab.edu "Router71" 128.143.71.1 frame Router Ethernet Network Ethernet Network Yuriy Shamshin, ys@academy.lv 33
Layers in the Example protocol protocol protocol protocol Ethernet Ethernet Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 34
Layers in the Example Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 35
Layers in the Example Send Request to neon Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 36
Layers in the Example Establish a connection to at port 80 Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 37
Layers in the Example Open connection to port 80 Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 38
Layers in the Example Send a datagram (which contains a connection request) to Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 39
Layers in the Example Send datagram to Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 40
Layers in the Example Send the datagram to 128.143.137.1 Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 41
Layers in the Example Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu router71.tcpiplab.edu Send Ethernet frame to 00:e0:f9:23:a8:20 128.143.137.144 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 42
Layers in the Example Frame is an datagram Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 43
Layers in the Example Send data-gram to Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 44
Layers in the Example Ethernet Ethernet Ethernet Send the datagram Ethernet to 128.143.7.21 argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 45
Layers in the Example Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu neon.tcpip-lab.edu Send Ethernet frame to 00:20:af:03:98:28 128.143.71.1 Yuriy Shamshin, ys@academy.lv 46
Layers in the Example Frame is an datagram Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 47
Layers in the Example datagram is a segment for port 80 Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 48
Layers in the Example request flow for a neon Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 49
Layers in the Example Ethernet Ethernet Ethernet Ethernet argon.tcpiplab.edu 128.143.137.144 router71.tcpiplab.edu 128.143.137.1 00:e0:f9:23:a8:20 router137.tcpiplab.edu 128.143.71.1 neon.tcpip-lab.edu Yuriy Shamshin, ys@academy.lv 50
Encapsulation And Demultiplexing As data is moving down the protocol stack, each protocol is adding layer-specific control information User data Header User data Header Header User data segment Header Header Header User data Ethernet datagram Ethernet Header Header Header Header User data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 51
Encapsulation and Demultiplexing in our Example Let us look in detail at the Ethernet frame between Argon and the Router, which contains the connection request to Neon. This is the frame in hexadecimal notation. 00e0 f923 a820 00a0 2471 e444 0800 4500 002c 9d08 4000 8006 8bff 808f 8990 808f 4715 065b 0050 0009 465b 0000 0000 6002 2000 598e 0000 0204 05b4 Yuriy Shamshin, ys@academy.lv 52
Encapsulation and Demultiplexing: Ethernet Header 6 bytes destination address source address type 4 bytes CRC Ethernet Header Header Header Application data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 53
Encapsulation and Demultiplexing: Ethernet Header 00e0 f923 a820 00a0 2471 e444 0800 4500 002c 9d08 4000 8006 8bff 808f 8990 808f 4715 065b 0050 0009 465b 0000 0000 6002 2000 598e 0000 0204 05b4 6 bytes 00:e0:f9:23:a8:20 0:a0:24:71:e4:44 0x0800 4 bytes CRC Ethernet Header Header Header Application data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 54
Encapsulation and Demultiplexing: Header 32 bits version (4 bits) header length TTL Time-to-Live (8 bits) DS Identification (16 bits) Protocol (8 bits) ECN flags (3 bits) Total Length (in bytes) (16 bits) Fragment Offset (13 bits) Header Checksum (16 bits) Source address (32 bits) Destination address (32 bits) Ethernet Header Header Header Application data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 55
Encapsulation and Demultiplexing: Header 00e0 f923 a820 00a0 2471 e444 0800 4500 002c 9d08 4000 8006 8bff 808f 8990 808f 4715 065b 0050 0009 465b 0000 0000 6002 2000 598e 0000 0204 05b4 32 bits 0x4 0x5 0x0 0x0 44 10 9d08 010 2 0000000000000 2 128 10 0x06 8bff 128.143.137.144 Ethernet Header Header Header Application data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 56
Encapsulation and Demultiplexing: Header 32 bits Source Port Number Destination Port Number Sequence number (32 bits) Acknowledgement number (32 bits) header length 0 Flags checksum option type length window size urgent pointer Max. segment size Option: maximum segment size Ethernet Header Header Header Application data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 57
Encapsulation and Demultiplexing: Header 00e0 f923 a820 00a0 2471 e444 0800 4500 002c 9d08 4000 8006 8bff 808f 8990 808f 4715 065b 0050 0009 465b 0000 0000 6002 2000 598e 0000 0204 05b4 32 bits 1627 10 80 10 607835 10 0 10 6 10 000000 2 000010 2 8192 10 0x598e 0000 2 2 10 4 10 1460 10 Ethernet Header Header Header Application data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 58
Encapsulation and Demultiplexing: Application data 00e0 f923 a820 00a0 2471 e444 0800 4500 002c 9d08 4000 8006 8bff 808f 8990 808f 4715 065b 0050 0009 465b 0000 0000 6002 2000 598e 0000 0204 05b4 No Application Data in this frame Ethernet Header Header Header Application data Ethernet Trailer Ethernet frame Yuriy Shamshin, ys@academy.lv 59
Different Layers View Of Networking Different Layers of the protocol stack have a different view of the network. Yuriy Shamshin, ys@academy.lv 60
Different Layers View Of Networking Network View of s and s Argon 128.143.137.144 Neon client server server client server server Network Yuriy Shamshin, ys@academy.lv 61
Different Layers View Of Networking Network View of Protocol Yuriy Shamshin, ys@academy.lv 62
Different Layers View Of Networking Network View of Ethernet Yuriy Shamshin, ys@academy.lv 63