🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

Lvl_3_ComputerNetworks_lec_05&06.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Document Details

CompactSerpentine2104

Uploaded by CompactSerpentine2104

الجامعة الوطنية

Tags

computer networks network models communication protocols

Full Transcript

Computer Networks Network Models Dr. Amr A. Alammari Lecture (5&6) Network Models- Introduction Introduction Network Models- Introduction Simple Communication â–ª A common language allows individuals to understand and convey their thoughts, ide...

Computer Networks Network Models Dr. Amr A. Alammari Lecture (5&6) Network Models- Introduction Introduction Network Models- Introduction Simple Communication â–ª A common language allows individuals to understand and convey their thoughts, ideas, and messages clearly to one another. - It serves as a means of shared understanding and enables smooth communication between individuals. â–ª In the context of network layering models, simple communication refers to the basic process of exchanging data between two entities over a network. It involves the transmission of information from a source to a destination, typically through multiple layers of protocols. â–ª The common language refers to the protocols and standards that enable communication between different layers of the network stack. Network Models- Introduction Protocols â–ª In data communication and networking, a protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate effectively. â–ª A protocol needs to be precisely defined, specifying the format, structure, and sequence of messages exchanged between the sender and receiver. â–ª This specification ensures that both ends of the communication and any intermediate devices can interpret and process the messages correctly. â–ª When communication is simple, we may need only one simple protocol. â–ª When the communication is complex, we may need to divide the task between different layers, in this case, we need a protocol at each layer or protocol layering. Network Models- Introduction Understand Protocol Layering â–ª To better understand the need for protocol layering, we consider two scenarios: â–ª One Layer Scenario Communication: - Face to face, in the same language. - A single-layer protocol Layer 1 Layer 1 Rules: - Greet each other when they meet. - Refrain from speaking when the other party is speaking - Confine their vocabulary to the level of - The conversation should be a dialog, not a monolog. their friendship. - Exchange some nice words when they leave. Network Models- Introduction Understand Protocol Layering â–ª Three Layer Scenario Tasks involved in sending a letter Network Models- Introduction Understand Protocol Layering â–ª Three Layer Scenario (Example) Layer 3 Layer 3 Layer 2 Layer 2 Layer 1 Layer 1 Network Models- Introduction Understand Protocol Layering â–ª Three Layer Scenario (Example) â–ª Communication: â–ª Encryption/decryption technique: - The sender encrypts the letter to make it - Regular mail through the post unreadable by an intruder; office. - The receiver of the letter decrypts it to get the - A Multi-layer protocol original letter. â–ª Layers Tasks (Assume that we have three machines performing the task at each layer.) Third layer: The machine listens and creates the plaintext (a letter in English), which is passed to the second layer machine. Second layer: The machine takes the plaintext, encrypts it, and creates the ciphertext, which is passed to the first layer machine. First layer: The machine takes the ciphertext, puts it in an envelope, adds the sender and receiver addresses, and mails it. Network Models- Introduction Advantages of Protocol Layering â–ª Task Distribution - Protocol layering enables us to divide a complex task into several smaller and simpler tasks. â–ª Modularity. - Modularity means independent layers. - If there is a problem in one machine in a specific layer, we only need to change that machine; the other can remain the same. - If two machines provide the same outputs when given the same inputs, they can replace each other. Hence machines can be bought from different manufacturer. â–ª Separate the Services from the Implementation - A layer needs to be able to receive a set of services from the lower layer and to give the services to the upper layer; we don’t care about how the layer is implemented. Network Models- Introduction Principles of Protocol Layering â–ª First Principles - In bidirectional communication, we need to make each layer so that it is able to perform two opposite tasks, one in each direction. - For example, the third layer task is to listen (in one direction) and talk (in the other direction). The second layer needs to be able to encrypt and decrypt. The first layer needs to send and receive mail. â–ª Second Principle - The two objects under each layer at both sites should be identical. - For example, the object under layer 3 at both sites should be a plaintext letter. The object under layer 2 at both sites should be a ciphertext letter. The object under layer 1 at both sites should be a piece of mail. Network Models- Introduction Logical Connections â–ª We can think about logical connection between each layer. This means that we have layer- to-layer communication. Think that there is a logical (imaginary) connection at each layer through which they can send the object created from that layer. The concept of logical connection will help us better understand the task of layering in data communication and networking. Network Models- Introduction Logical Connections- Example Network Models OSI and TCP/IP Model Network Models OSI and TCP/IP â–ª OSI (Open Systems Interconnection) and TCP/IP (Transmission Control Protocol/Internet Protocol) are two different conceptual models that provide a framework for understanding and implementing network protocols and communication systems. Network Models OSI versus TCP/IP Network Models OSI versus TCP/IP Network Models OSI Model Network Models- OSI OSI Model â–ª The International Organization for Standardization (ISO) is a multinational body dedicated to worldwide agreement on international standards. Almost three- fourths of the countries in the world are represented in the ISO. - An ISO standard that covers all aspects of network communications is the Open Systems Interconnection (OSI) model. - The OSI model is a reference model that helps in understanding and designing network protocols. It allows for interoperability between different vendors and devices by standardizing the functions and interactions at each layer. Network Models- OSI OSI Model- Overview of the Layers Network Models TCP/IP Protocol Suite Network Models- TCP/IP TCP/IP Protocol Suite â–ª TCP/IP is a protocol suite (a set of protocols organized in different layers) used in the Internet today. â–ª It is a hierarchical protocol made up of interactive modules, each of which provides a specific functionality. The term hierarchical means that each upper level protocol is supported by the services provided by one or more lower level protocols. â–ª Layered Architecture Example: - Three LANs (links), each with a link-layer switch. - The links are connected by one router. - Computer A communicates with computer B. - Five communicating devices in this communication. Network Models- TCP/IP TCP/IP Protocol Suite â–ª Each device is involved with a set of layers depending on the role of the device in the internet. - The two hosts are involved in all five layers; the source host needs to create a message in the application layer and send it down the layers so that it is physically sent to the destination host. - The router is involved in only three layers, however, the switch is involved only in two layers. Network Models- TCP/IP Layers in the TCP/IP Protocol Suite â–ª Using logical connections makes it easier for us to think about the duty of each layer. Network Models- TCP/IP Layers in the TCP/IP Protocol Suite â–ª The duty of the application, transport, and network layers is end-to-end. However, the duty of the data-link and physical layers is hop-to-hop, in which a hop is a host or router. - This means that the domain of duty of the top three layers is the internet, and the domain of duty of the two lower layers is limited to the individual links or hops between adjacent devices in the network. Identical objects in the TCP/IP protocol suite Network Models- TCP/IP Layers in the TCP/IP Protocol Suite Note that In the TCP/IP network model, the units of data are commonly referred to as: - Messages or Data in the application layer. - Segments or Datagrams in the transport layer. - Packets in the network layer. - Frames in the data link layer. - Bits at the physical layer. Network Models- TCP/IP Physical Layer â–ª Physical layer is responsible for carrying individual bits in a frame across the link. - Two devices are connected by a transmission medium (cable or air). The transmission medium does not carry bits; it carries electrical, optical, or electromagnetic signals. - The bits received in a frame from the data-link layer are transformed in the physical layer and sent through the transmission media. Network Models- TCP/IP Data-link Layer â–ª The data-link layer is responsible for moving the packet through the link. - The routers are responsible for choosing the best links. - When the next link to travel is determined by the router, the data-link layer (through the router) then forwards the frame to the appropriate outgoing interface connected to the next hop or link. - TCP/IP does not define any specific protocol for the data-link layer. - The data-link layer takes a packet from the network layer and encapsulates it in a frame. Network Models- TCP/IP Hop-to-hop delivery Network Models- TCP/IP Network Layer â–ª Network layer is responsible for host-to-host communication and routing the packet through possible routes. - The network layer in the Internet includes the main protocol, Internet Protocol (IP), that defines the format of the packet, called a datagram at the network layer. - IP also defines the format and the structure of addresses used in this layer. Network Models- TCP/IP Source-to-destination delivery Network Models- TCP/IP Transport Layer â–ª Transport layer is responsible for the delivery of a message from one process to another. - In other words, the transport layer is responsible for giving services to the application layer: to get a message from an application program running on the source host and deliver it to the corresponding application program on the destination host. Network Models- TCP/IP Reliable process-to-process delivery of a message Network Models- TCP/IP Application Layer â–ª The application layer is responsible for providing services to the user. - Communication at the application layer is between two processes (two programs running at this layer). To communicate, a process sends a request to the other process and receives a response. To Transport Layer From Transport Layer Network Models- TCP/IP TCP/IP- Main Protocols in each Layers Network Models- TCP/IP Encapsulation and Decapsulation â–ª One of the important concepts in protocol layering in the Internet is encapsulation/ decapsulation. We have not shown the layers for the link-layer switches because no encapsulation/ decapsulation occurs in this device. In the figure, we show the encapsulation in the source host, decapsulation in the destination host, and encapsulation and decapsulation in the router. Network Models- TCP/IP Encapsulation and Decapsulation (Video) Network Models- TCP/IP Encapsulation at the Source Host â–ª At the source host, encapsulation occurs in multiple layers: - The application layer refers to the data as a message and passes it to the transport layer. - The transport layer adds a header to the message payload, including identifiers, and additional information for end-to-end delivery. This results in a transport-layer packet, known as a segment (TCP) or user datagram (UDP), which is then passed to the network layer. - The network layer adds its own header to the transport-layer packet, including source and destination addresses, error checking information, and fragmentation details. This creates a network-layer packet called a datagram, which is then passed to the data- link layer. - The data-link layer adds its own header, containing link-layer addresses, and produces a link-layer packet or frame. Finally, the frame is transmitted by the physical layer. Network Models- TCP/IP Decapsulation and Encapsulation at the Router â–ª At the router, both decapsulation and encapsulation occur due to its connection to multiple links. - The data-link layer at the router decapsulates the datagram from the received frame. - The network layer inspects the source and destination addresses in the datagram header and consults its forwarding table to determine the next hop for delivery. - The network layer does not modify the contents of the datagram unless fragmentation is required to fit the next link. The datagram is then passed to the data-link layer of the next link. - The data-link layer of the next link encapsulates the datagram into a frame. The frame is then transmitted by the physical layer. Encapsulation at the Destination Host â–ª At the destination host, decapsulation takes place in each layer. - Each layer in the host decapsulates the received packet by removing its payload. The payload is then delivered to the next-higher layer protocol. - This process continues until the message reaches the application layer. - Decapsulation in the host also involves error checking to ensure data integrity. Network Models- TCP/IP Addressing â–ª In the context of protocol layering in the Internet, addressing is an important concept. Communication between layers in this model requires two addresses: a source address and a destination address. While it may initially seem like we need five pairs of addresses (one per layer), in practice, we typically have only four pairs. This is because the physical layer, which exchanges data at the bit level, does not require addresses. Network Models- TCP/IP Addressing â–ª In the protocol layering model, there is a relationship between the layer, the address used in that layer, and the packet name at that layer. - At the application layer, names are commonly used to identify the site or service provider, such as "someorg.com" or an email address like "[email protected]". - The transport layer uses addresses known as port numbers, which identify the specific application-layer programs at the source and destination. Port numbers allow for distinguishing between multiple programs running simultaneously on a device. - The network-layer addresses are global and have the entire Internet as their scope. These addresses uniquely define the connection of a device to the Internet. - The link-layer addresses, also known as MAC addresses, are locally defined addresses. They identify specific hosts or routers within a network (LAN or WAN). Network Models- TCP/IP Multiplexing and Demultiplexing â–ª Since the TCP/IP protocol suite uses several protocols at some layers, we can say that we have multiplexing at the source and demultiplexing at the destination. - Multiplexing refers to the ability of a protocol at a layer to encapsulate packets from multiple next-higher layer protocols, one at a time. - Demultiplexing, on the other hand, involves the ability of a protocol to decapsulate and deliver a packet to multiple next-higher layer protocols, one at a time. - This allows for efficient and organized communication between protocols at different layers. The Figure shows the concept of multiplexing and demultiplexing at the three upper layers. Network Models- TCP/IP Multiplexing and Demultiplexing â–ª To be able to multiplex and demultiplex, a protocol needs to have a field in its header to identify to which protocol the encapsulated packets belong. - At the transport layer, both UDP and TCP can handle messages from multiple application-layer protocols. - At the network layer, IP can accept segments from TCP or user datagrams from UDP. Additionally, IP can receive packets from other protocols like ICMP and IGMP. - At the data-link layer, a frame can carry the payload coming from IP or other protocols like ARP (Address Resolution Protocol). - These capabilities enable protocols to efficiently handle and route data between different layers in the TCP/IP protocol suite. Textbooks â–ª Data Communications and Networking Behrouz Forouzan. Chapter #2

Use Quizgecko on...
Browser
Browser