Unit 2 Network Model PDF
Document Details
Uploaded by MajesticIron
Tags
Summary
This document is a chapter on network models, specifically detailing the OSI and TCP/IP models. It discusses layered tasks, the functions and responsibilities of each layer, and various protocols and devices used in network communication. The document aims to provide an understanding of network addressing and communication methods.
Full Transcript
Chapter 2 Network Models 2.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2-1 LAYERED TASKS We Layered tasks refer to the division of complex communication processes into smaller and more manageable tasks. Each layer is responsi...
Chapter 2 Network Models 2.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2-1 LAYERED TASKS We Layered tasks refer to the division of complex communication processes into smaller and more manageable tasks. Each layer is responsible for a specific set of tasks. 2.2 2-1 LAYERED TASKS We use the concept of layers in our daily life. As an example, let us consider two friends who communicate through postal mail. The process of sending a letter to a friend would be complex if there were no services available from the post office. This concept is the foundation of layered architecture like the OSI and TCP/IP model. 2.3 Figure 2.1 Tasks involved in sending a letter 2.4 2-2 THE OSI MODEL Established in 1947, the International Standards Organization (ISO) is a multinational body dedicated to worldwide agreement on international standards. An ISO standard that covers all aspects of network communications is the Open Systems Interconnection (OSI) model. It was first introduced in the late 1970s. ISO is the organization whereas OSI is the model. 2.5 Figure 2.2 Seven layers of the OSI model 2.6 Physical Layer lowest layer. It is responsible for the actual physical connection between the devices It contains information in the form of bits. It is responsible for transmitting individual bits from one node to the next. When receiving data, this layer will get the signal received and convert it into 0s and 1s and send them to the Data Link layer, which will put the frame back together. Common physical layer devices are Hub, Repeater, Modem, and Cables. 2.7 Data-Link Layer It is responsible for the node-to-node delivery of the message. The main function of this layer is to make sure data transfer is error-free from one node to another, over the physical layer. When a packet arrives in a network, it is the responsibility of the DLL to transmit it to the Host using its MAC address. Packet in the Data Link layer is referred to as Frame. Switches and Bridges are common Data Link Layer devices. The Data Link Layer is divided into two sublayers: Logical Link Control (LLC) Media Access Control (MAC) 2.8 Network Layer It is works for the transmission of data from one host to the other located in different networks. It also takes care of packet routing i.e. selection of the shortest path to transmit the packet, from the number of routes available. The sender and receiver’s IP address are placed in the header by the network layer. Segment in the Network layer is referred to as Packet. Network layer is implemented by networking devices such as routers and switches. 2.9 Transport Layer The transport layer provides services to the application layer and takes services from the network layer. The data in the transport layer is referred to as Segments. It is responsible for the end-to-end delivery of the complete message. The transport layer also provides the acknowledgment of the successful data transmission and re-transmits the data if an error is found. Protocols used in Transport Layer are TCP, UDP NetBIOS, PPTP. 2.10 Session Layer Session Layer in the OSI Model is responsible for the establishment of connections, management of connections, terminations of sessions between two devices. It also provides authentication and security. Protocols used in the Session Layer are NetBIOS, PPTP. 2.11 Presentation Layer It is also called the Translation layer. The data from the application layer is extracted here and manipulated as per the required format to transmit over the network. Protocols used in the Presentation Layer are JPEG, MPEG, GIF, TLS/SSL, etc. 2.12 Application Layer At the very top of the OSI Reference Model stack of layers, we find the Application layer which is implemented by the network applications. These applications produce the data to be transferred over the network. This layer also serves as a window for the application services to access the network and for displaying the received information to the user. Protocols used in the Application layer are SMTP, FTP, DNS, etc. 2.13 Figure 2.3 The interaction between layers in the OSI model 2.14 Figure 2.4 An exchange using the OSI model 2.15 2-3 LAYERS IN THE OSI MODEL In this section we briefly describe the functions of each layer in the OSI model. 2.16 Figure 2.5 Application layer 2.17 Application Layer Function: Provides network services to end-users and applications. Responsibilities: Identifies communication partners. Ensures resource availability. Provides user interfaces for interaction. Protocols and Services: HTTP/HTTPS (Web browsing) FTP/SFTP (File Transfer) SMTP/IMAP/POP3 (Email) DNS (Domain Name Service) SNMP (Network Management) Examples: Browsers, email clients, file transfer software. 2.18 Figure 2.6 Presentation layer 2.19 Presentation Layer Function: Translates data between the application layer and the network format, ensuring compatibility. Responsibilities: Data translation (e.g., from ASCII to EBCDIC). Encryption and decryption for secure data transfer. Compression to reduce the size of data for faster transmission. Examples: SSL/TLS encryption, JPEG, MPEG, GIF. 2.20 Figure 2.7 Session layer 2.21 Session Layer Function: Establishes, manages, and terminates sessions between two communicating device. Responsibilities: Synchronization of data streams. Dialog control to manage communication sessions. Checkpointing for data recovery in case of failure. Examples: Remote Procedure Calls (RPCs), session management in applications like video conferencing. 2.22 Figure 2.8 Transport layer 2.23 Transport layer Function: Provides reliable data transfer services to the upper layers and ensures end-to-end communication. Responsibilities: Segmentation and reassembly of data. Error detection and correction. Flow control to prevent congestion. Port addressing to differentiate services. Protocols: TCP (Transmission Control Protocol): Ensures reliable, connection-oriented communication. UDP (User Datagram Protocol): Provides faster, connectionless communication. Examples: Data streaming, file downloads. 2.24 Figure 2.9 Network layer 2.25 Network layer Function: Handles logical addressing, routing, and forwarding of data packets across multiple networks. Responsibilities: Determines the best path for data delivery. Logical addressing using IP addresses. Manages fragmentation and reassembly of data packets. Protocols: IPv4, IPv6, ICMP (Internet Control Message Protocol), ARP (Address Resolution Protocol). Devices: Routers, Layer 3 switches. 2.26 Figure 2.10 Data link layer 2.27 Data link layer Function: Ensures reliable data transfer between two directly connected nodes. It handles framing, error detection/correction, and flow control. Responsibilities: Divides data into frames for transmission. Implements Media Access Control (MAC) for addressing and controlling access to the physical medium. Detects and possibly corrects errors in the Physical Layer. Sub-layers: MAC (Media Access Control): Manages access to shared resources. LLC (Logical Link Control): Provides error checking and flow control. Examples: Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11). Devices: Switches, network interface cards (NICs). 2.28 Figure 2.11 Physical layer 2.29 Physical layer Function: Deals with the transmission of raw binary data (0s and 1s) over physical media such as cables, switches, and other hardware. Responsibilities: Defines the physical characteristics of the transmission medium (e.g., type of cable, voltage levels, etc.). Handles data encoding and modulation. Manages the synchronization of bits. Ensures physical connections between devices. Examples: Ethernet cables, fibre optics, USB, and radio frequencies. Devices: Hubs, repeaters, network adapters. 2.30 Figure 2.15 Summary of layers 2.31 2-4 TCP/IP PROTOCOL SUITE The layers in the TCP/IP protocol suite do not exactly match those in the OSI model. The original TCP/IP protocol suite was defined as having four layers: host-to- network, internet, transport, and application. However, when TCP/IP is compared to OSI, we can say that the TCP/IP protocol suite is made of five layers: physical, data link, network, transport, and application. Topics discussed in this section: Physical and Data Link Layers Network Layer Transport Layer Application Layer 2.32 Figure 2.16 TCP/IP and OSI model 2.33 2-5 ADDRESSING It means assigning an address to a client or process or server or any other device to establish successful communication and to make the devices communicate with each other correctly. Four levels of addresses are used in an internet employing the TCP/IP protocols: physical, logical, port, and specific. Topics discussed in this section: Physical Addresses Logical Addresses Port Addresses Specific Addresses 2.34 Figure 2.17 Addresses in TCP/IP 2.35 Figure 2.18 Relationship of layers and addresses in TCP/IP 2.36 Physical Address It known as the MAC address. It works at the network access layer of the TCP/IP model. It is responsible for NIC to NIC communication between devices on the same network. It is 48 Bits number that is printed on the device’s NIC. The size and format of the MAC address may vary depending on the type of network. When the network access layer receives a segment from the transport layer it converts the segment into a frame. After that, the header and trailer are attached to the frame which also contains the physical addresses of the sender and receiver. The frame will be transmitted according to the physical addresses of the sender and receiver. “09:05:E2:07:3R:2A” Example of Physical Address. 2.37 Example 2.1 In Figure 2.19 a node with physical address 10 sends a frame to a node with physical address 87. The two nodes are connected by a link (bus topology LAN). As the figure shows, the computer with physical address 10 is the sender, and the computer with physical address 87 is the receiver. 2.38 Figure 2.19 Physical addresses 2.39 Example 2.2 Most local-area networks use a 48-bit (6-byte) physical 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. 2.40 Logical Address The Logical address is also known as the IP address. This address works at the Internet layer of the TCP/IP model. Whenever a host connects to the network, it gets a unique number known as an IP address to communicate with other hosts. The IP address helps in finding the path to transmit the data to the other host on the network. An IP address is a 32-bit number that uniquely identifies an end device on a network. IP addresses sent packets from sender to receiver and the receiver can be on the same network or another network. “192.168.1.1” is an example of an IP address. 2.41 Example 2.3 Figure 2.20 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. 2.42 Figure 2.20 IP addresses 2.43 Note The physical addresses will change from hop to hop, but the logical addresses usually remain the same. 2.44 Port Address It is used at the transport layer of the TCP/IP model to identify the process running on a device. The transport layer receives data from the application layer and divides the data into segments. Then segments are transmitted from sender to receiver using TCP or UDP. There is a field in the TCP/UDP header known as the port number. Once the receiver has successfully received the segment, the receiver will use the port address to determine the received segment belonging to which particular process out of several processes running in the machine The port address distributes the processes and labels them, so that the machine understands which process will be used for the particular communication. 2.45 Example 2.4 Figure 2.21 shows two computers communicating via the Internet. 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. 2.46 Figure 2.21 Port addresses 2.47 Example 2.5 A port address is a 16-bit address represented by one decimal number as shown. 753 A 16-bit port address represented as one single number. 2.48 Specific Address The specific address mainly interacts with the user. Sending an email using a mail address such as “[email protected]” and accessing the web by typing the URL of a website such as “www.example.com” are examples of specific addresses. The specific address changes based on the IP address and port numbers. Specific addresses operate at the application layer of the TCP/IP model. 2.49 How Addressing work in a Network? The specific address mainly interacts with the user. Sending an email using a mail address such as “[email protected]” and accessing the web by typing the URL of a website such as “www.example.com” are examples of specific addresses. The specific address changes based on the IP address and port numbers. Specific addresses operate at the application layer of the TCP/IP model. 2.50 2.51