Data and Computer Communications Chapter 2 Protocol Architecture, TCP/IP, and Internet-Based s 1
Need For Protocol Architecture data exchange can involve complex procedures better if task broken into subtasks implemented separately in layers in stack each layer provides functions needed to perform communication for layers above using functions provided by layers below modularization eases maintenance, updating of system peer layers communicate with a protocol 2
OSI OSI: Open Systems Interconnection Developed by the International Organization for Standardization (ISO) Has seven layers too many Is a theoretical system delivered TCP/IP is the de facto standard 3
OSI Layers 4
ISO/OSI Reference Model Host A Presentation Session Host B Presentation Session Medium 5
ISO/OSI Reference Model Layer 6/7 Interface Layer 5/6 Interface Layer 4/5 Interface Layer 3/4 Interface Layer 2/3 Interface Layer 1/2 Interface Host A Presentation Session Layer 7 Protocol Layer 6 Protocol Layer 5 Protocol Layer 4 Protocol Layer 3 Protocol Layer 2 Protocol Layer 1 Protocol Host B Presentation Session Exchanged Unit APDU PPDU SPDU Segment Packet (Datagram) Frame Bit Medium 6
ISO/OSI Reference Model The entities comprising the corresponding layers on different machines are called peers. Protocol: It is an agreement between peers on how communication is to proceed. Peers can communicate by using Protocols. Interface: It defines the primitive operations and services the lower layer makes available to the upper layer. A Service Access Point (SAP) has an address that uniquely identifies where the service can be accessed. A set of layers and protocols is called a Architecture.
Standardized Protocol Architectures 8
Layer Specific Standards 9
The OSI Environment 10
ISO/OSI Reference Model 11
ISO/OSI Reference Model 1. The Layer: It concerns with transmitting raw bits over a communication channel. Voltage Levels for 0 and 1. Connectors: Number of bins and purpose of each bin. Transmission Media. Attenuation and Distortion. Analog PSTN Circuits and Digital Leased Circuits. 12
ISO/OSI Reference Model 2. The Layer: FRAME is the basic protocol unit Framing: create and recognize frame boundaries. encapsulate datagram into frame, adding header, trailer Addressing: Header Message Trailer MAC () Addressing. Point-to-point Error Detection Point-to-point flow control Medium Access Control (MAC) Protocols 13
Ethernet Frame 7 bytes 1 byte 6 bytes 6 bytes 2 bytes 1500 bytes 4 bytes Preamble SFD Destination Address Source Address Length Data = IP Packet Pad FCS PACKET 14
ISO/OSI Reference Model 2. The Layer: Medium Access Control (MAC) single shared broadcast channel two or more simultaneous transmissions by nodes: interference collision if node receives two or more signals at the same time shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) 15
ISO/OSI Reference Model 2. The Layer: Medium Access Control (MAC) Protocols: Channel Partitioning divide channel into smaller pieces (time slots, frequency, code) allocate piece to node for exclusive use Random Access channel not divided, allow collisions recover from collisions Taking turns nodes take turns, but nodes with more to send can take longer turns 16
ISO/OSI Reference Model 3. The Layer: PACKET (DATAGRAM) is the basic protocol unit Addressing IP Addressing Routing: It determines source to destination. how packets are routed from Congestion Control: Many packets in the subnet trying to use the same route. Internetworking: It allows heterogeneous networks to be interconnected. 17
ISO/OSI Reference Model 4. The Layer: SEGMENT is the basic protocol unit Disassembling and Reassembling: It accepts data from a session layer, split it up to smaller units if needed, pass these to the network layer, and ensure that the pieces all arrive correctly at the other end. End-to-end error control. End-to-end flow control. Addressing Ports 18
ISO/OSI Reference Model 5. The Session Layer: It allows users on different machines to establish sessions between them. Interaction Management: The data exchange associated with a dialog may be: Duplex: Two-way simultaneous. Half-Duplex: Two-way alternate. Simplex: One-way. 6. The Presentation Layer: Data Compression. Data Encryption. 7. The Layer: The application layer contains a variety of protocols that are commonly needed. 19
Use of a Relay 20
TCP/IP Protocol Architecture developed by US Defense Advanced Research Project Agency (DARPA) for ARPANET packet switched network used by the global Internet protocol suite comprises a large collection of standardized protocols 21
OSI v TCP/IP 22
Internet protocol stack application: supporting network applications FTP, SMTP, HTTP transport: process-process data transfer TCP, UDP network: routing of datagrams from source to destination IP, routing protocols link: data transfer between neighboring network elements PPP, Ethernet physical: bits on the wire application transport network Data link physical 23
Operation of TCP/IP 24
Encapsulation Header Header Header Segment Data Trailer Packet Frame 25
Protocol Data Units Segments Packets 26
TCP/IP Reference Model Host A Host B Medium 27
TCP/IP Reference Model Sender Host A Repeater Receiver Host B Repeater 28
TCP/IP Reference Model Sender 10 83 Frame Switch 10 83 Frame Receiver MAC: 83 MAC: 10 Host A MAC: 42 MAC: 55 MAC: 45 Host B Switch 29
TCP/IP Reference Model MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B w z z Interface 3 w z IP Addresses w z a b MAC Addresses a b c d c d 30
TCP/IP Reference Model MAC: a IP = u Sender MAC: b IP = v MAC: c IP = w Interface 1 Interface 3 Interface 2 Interface 4 MAC: d IP = x MAC: e IP = y Interface 4 Interface 1 Interface 3 Interface 2 MAC: f IP = z Receiver Host A Host B u z u z z Interface 3 u z z Interface 1 u z a b a b c d e f e f 31
TCP/IP Reference Model application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical CT1403 32
segment datagram frame message H l H t H n H t H n H t M M M M source application transport network link physical Encapsulation link physical switch H l H n H n H t H t H t M M M M destination application transport network link physical H l H n H n H t H t M M network link physical H n H t M router 33
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Send Data 1 Host A Host B 34
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B 2 Disassembling: Split data into smaller units Reliable Data Transfer: Sequence Number Retransmission list Start timer upon transmission Flow Control: Receiver Window size Forming Segments 35
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B 3 IP addressing Forming Packets 36
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B 4 Forming Frames Encapsulate Packet into frame, adding header, trailer MAC () Addressing for point to point connection Computing checksum for error detection 37
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Convert bits to a signal 5 Transmission Media 38
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Convert the received signal into bits Transmission Media 6 39
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Frame Boundary Detection Error Detection Checking the correctness of the frame Checking the MAC Address De-encapsulate the frame and extract the packet 7 40
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Routing 8 41
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B 9 Forming Frames Encapsulate Packet into frame, adding header, trailer MAC () Addressing for point to point connection Computing the checksum for error detection 42
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Convert bits to a signal 10 43
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Transmission Media Convert the received signal into bits 11 44
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Frame Boundary Detection Error Detection Checking the correctness of the frame Checking the MAC Address De-encapsulate the frame and extract the packet 12 45
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Host B Extract the Segment 13 46
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Host A Interface 2 Interface 4 Reliable Data Transfer: Send to the sender an ACKNOWLEDGEMENT for a correct segment, and a NEGATIVE ACKNOWLEDGEMENT for an incorrect segment Ordered Delivery: Sequence Number Receiver Host B Re-assembling 14 47
Example of Data Transmission MAC: a IP = w MAC: b IP = x MAC: c IP = y Interface 1 Interface 3 MAC: d IP = z Sender Interface 2 Interface 4 Receiver Host A Receive Data Host B 15 48
TCP/IP Layers layer layer Internet layer access layer layer 49
Addressing Requirements two levels of addressing required each host on a subnet needs a unique global network address its IP address each application on a (multi-tasking) host needs a unique address within the host known as a port 50
Operation of TCP and IP 51
Transmission Control Protocol (TCP) usual transport layer is (TCP) provides a reliable connection for transfer of data between applications a TCP segment is the basic protocol unit TCP tracks segments between entities for duration of each connection 52
TCP Header 53
User Datagram Protocol (UDP) an alternative to TCP no guaranteed delivery no preservation of sequence no protection against duplication minimum overhead 54
UDP Header 55
IP Header 56
IPv6 Header 57
Ethernet Frame 7 bytes 1 byte 6 bytes 6 bytes 2 bytes 1500 bytes 4 bytes Preamble SFD Destination Address Source Address Length Data = IP Packet Pad FCS PACKET 58
TCP/IP s have a number of standard TCP/IP applications such as Simple Mail Transfer Protocol (SMTP) File Transfer Protocol (FTP) control and data connections Telnet HTTP 59
Some TCP/IP Protocols 60
Traditional vs Multimedia s traditionally Internet dominated by info retrieval applications typically using text and image transfer E.g. email, file transfer, web see increasing growth in multimedia applications involving massive amounts of data such as streaming audio and video 61
Elastic and Inelastic Traffic elastic traffic can adjust to delay & throughput changes over a wide range E.g. traditional data style TCP/IP traffic some applications more sensitive though inelastic traffic does not adapt to such changes E.g. real-time voice & video traffic need minimum requirements on net arch 62
Summary introduced need for protocol architecture OSI Model & protocol architecture standardization TCP/IP protocol architecture traditional vs multimedia application needs 63