Chapter 2 Network Models 2-1 LAYERED TASKS We use the concept of layers in our daily life As an example, let us consider 2 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. Process of sending a letter Sender, Receiver, and Carrier Hierarchy Tasks must be done in order given in hierarchy Services each layer at the sending site uses the services of the layer below it. Tasks involved in sending a letter A network model is a layered architecture Task broken into subtasks Implemented separately in layers in stack Functions need in both systems Peer layers communicate Protocol A set of rules that governs data communication It represents an agreement between the communicating devices Internet layers The TCP/IP protocol suite is made of 5 layers Layer A grouping of related tasks involving the transfer of information . Each layer addresses an essential networking tasks PEER-TO-PEER PROCESS Peer-to-peer processes Are the processes on each machine that communicate at a given layer Between machines layer x communicates with layer x on another machine by protocols Communication between machines is peer-to-peer processing using the protocols appropriate to a given layer The passing of the data and network information down through the layers of the sending device and backup through the layers of the receiving device is made possible by interface between each pair of adjacent layers Interface defines what info. and services a layer must provide for the layer above it 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. (theoretical model for networks of all kinds) OSI reference model, drafted in late 1970s by ISO By 1983, the draft became ISO Standard 7498 Common framework for developers and students of networking to work with and learn from Attempt to develop a working set of protocols and technologies based on the OSI model and to put those efforts into common use never materialized THE OSI MODEL Model’s foundation Networking can be separated into a series of related tasks Each task can be conceptualized as a single layer, of the communication process Reduces complexity of networked communications into series of interconnected tasks and activities “Divide and conquer” approach: relationship among tasks persists, but each can be handled separately, and its issues solved independently Reference models and standards enable interoperability among layers Role of a Reference Model Computer networking, computer compatibility, and networking features and functions can be daunting concepts to grasp The OSI model and its seven-layer approach to networking provides this common framework The interaction between layers in the OSI model Communication between peer layers is “virtual” In reality, communications pass up and down the protocol stacks on both machines As data gets passed from layer to layer, it’s divided into data units appropriate for the layer Protocol data units (PDUs) are passed as a self-contained data structure from layer to layer Encapsulation process adds “headers” to allow successful delivery of each layer’s payload Decapsulation strips header information on way up No layer can pass information directly to its peer counterpart except for the Physical layer Figure 2.4 An exchange using the OSI model 2-3 LAYERS IN THE OSI MODEL In this section we briefly describe the functions of each layer in the OSI model. Topics discussed in this section: Physical Layer Data Link Layer Network Layer Transport Layer Session Layer Presentation Layer Application Layer Duties of the Physical layer Responsible for movements of individual bits from one hop (node) to the next Physical characteristics of interfaces and media It defines the characteristic of the interface between devices and media. It also define the type of transmission media Representation of bits Data rate The bit stream must be encoded into signals. It defines the type of representation ( how 0, 1 are changed to signal). It defines the number of bits sent per second and also the duration of bits Synchronization of bits The sender and receiver must be use the same bit rate also the receiver clock must be synchronized Duties of the Physical layer Line configuration Physical topology Physical layer is concerned with the connection of devices to the media ( point-to point or multipoint) How devices connected to make a network Devices can connected by using Star, mesh , bus, ring or hybrid topology Transmission mode It defines the direction of transmission between two devices (simplex, half-duplex, or full duplex) Duties of the data link layer Responsible for moving frames from one hop (node) to the next Framing Divide the stream of bits received from network layer into data units called frames Physical addressing Known also as the MAC or link address Data Link Layer adds a header to the frame to define the sender and receiver of the frame. If the frame for a system outside the sender’s network the receiver address : is the address of the connecting device that connects the network to next one (Router/switch). Ethernet uses 6-bytes (48-bits) physical address that imprinted on the NIC Duties of the data link layer Flow control Error control It imposes a flow control mechanism , if the data rate at the receiver is less than produced by sender the data link layer imposes a flow control to avoid overwhelming the receiver Add mechanisms to detect and retransmit damaged or lost frames. Prevent also duplication of frames. Error control is normally achieved through a trailer added to the end of frame. Access control When two or more devices than one devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at given time Figure 2.7 Hop-to-hop delivery Example 2.1 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. Most LANs use a (6-byte) physical address written as 12 Hex digit Every byte (2 Hex digits) is separated by a colon 07:01:02:01:2C:4B NETWORK LAYER Responsible from the delivery of packets from the original source to the final destination across multiple networks If 2 systems are connected to the same link, there is no need for network layer Duties of network layer Logical addressing Network layer adds unique ( IP or logical address) to the packet. IP addresses are necessary for universal communications that are independent of physical network No two host address on the internet can have the same IP address IP addresses 32-bit address that uniquely define a host connected to the Internet Routing Provide the routing mechanism for the router which route the packet to their final destination. Routers: devices used when independent networks are connected to create an internetworking ( network of networks) Figure 2.9 Source-to-destination delivery Example Each computer is connected to only one link and therefore has only one pair of addresses (logical & physical ) Each router, however, is connected to 3 networks, therefore; each router has 3 pairs of addresses, 1 for each connection. MAC addresses will change from hop to hop, but the logical addresses will not TRANSPORT LAYER Responsible for delivery of a message from one process to another PDU is called segment Layer 4 problem is that segments might be too large for the medium between the source and destination networks The latter forces Network layer to fragment segments, which causes performance degradation Duties of transport layer Segmentation and reassembly A message is divided into small pieces (Segment) Each segment containing sequence number. These number enable the transport layer to reassemble the message correctly at destination and to identify and replace segment that were lost in transmission. Port addressing (Service-point addressing) Computer often run several process ( running programs) at the same time, so the process to process delivery means delivery from a specific process on a computer to specific process to the other. The transport layer header must include Port address( 16-bit addresses represented by decimal number range from 0-65535) to choose among multiple processes on the destination host Destination port No is needed for delivery Source port no is needed for replay Example Port address is a 16-bit address represented by one decimal number Two PC communicating via the Internet. The sending PC is running 3 processes at this time with port addresses a, b, and c. The receiving PC is running 2 processes at this time with port addresses j and k. Process a in the sending PC needs to communicate with process j in the receiving PC Duties of transport layer Flow control Transport layer responsible for flow control end to end rather than across a signal link Error control Performed process-to-process rather than across a single link The sending transport layer makes sure that the entire message arrives at the receiving transport layer without error (damage, loss or duplicated). Error correction is usually achieved through retransmission Duties of transport layer Connection control The transport layer can be either 1. Connection oriented Makes a connection with the transport layer at the destination machine first before delivering the packers. When the connection established a sequence of packets from source to the destination can be sent one after another on the same path and in sequential order When all packets of message have been delivered, the connection is terminated This makes the sending transport layer ensure that the message arrives at the receiving transport layer without error ( damage, loss or duplication) Transmission control protocol(TCP) Stream Control Transmission Protocol (SCTP) 2. Connection Less ( as Internet) It sends the data, but does not establish and verify a connection between hosts before sending data Treats each packet independently, the packets in a message may or may not travel the same path to their destination User datagram protocol (UDP) Connection-less Session layer It establishes, maintains and synchronize the interaction between communicating system Monitors session identification so that only designated parties can participate Examples: name lookup and user logon and logoff E.g., DNS name resolution, FTP’s logon/logoff Function Dialog control Allows two systems to enter into dialog It allows the communication between two processes to take place in either half-duplex or full-duplex. Synchronization It allows a process to add checkpoints into a stream of data So that if a failure of some sort occurs between checkpoints, the layer can retransmit all data since the last checkpoint. Presentation layer Concerned with the syntax and semantics of the information exchanged between two systems Functions Translation Encryption At the sender it changes the information from its sender –dependent format into common format. At receiving, changes the common format into its receiver-dependent format To ensure privacy and security Compression Data compression reduces the number of bits contained in the information. It is important in the transmission of multimedia such as audio or video Application layer Set of interfaces to access networked services Responsible for providing services to the user Mail services File transfer and access FTP : A protocol enable moving file across the network Remote log-in SMTP: Simple mail transfer protocol used to send electronic mail on the internet Telnet: A service that enables users on the internet to log onto remote systems from their own host system Accessing the World Wide Web HTTP: Hyper text transfer protocol used for network file transfers in WWW environment Figure 2.16 TCP/IP and OSI model Encapsulation Process Addresses in TCP/IP e-mail addresses : ( programmer@yahoo.com) to define the recipient of an e-mail URL addresses ( www. Mhhe.com) to find a document on the world wide web Relationship of layers and addresses in TCP/IP