Chapter 4-7_240815_091031.pdf
Document Details
Uploaded by LikeLlama4628
Arba Minch University
Full Transcript
Chapter 4 - 7 OSI Reference Model and TCP/IP Model 1 P r e p a r e d b y A l e m s e g e d K. ( A s s i. P r o f. ) , F C S E , A M i T, A M U THE OSI MODEL ❖It was developed by the International Organization for Standardization (ISO). ❖It was first introduced in t...
Chapter 4 - 7 OSI Reference Model and TCP/IP Model 1 P r e p a r e d b y A l e m s e g e d K. ( A s s i. P r o f. ) , F C S E , A M i T, A M U THE OSI MODEL ❖It was developed by the International Organization for Standardization (ISO). ❖It was first introduced in the late 1970s. ❖An ISO standard that covers all aspects of network communications is the Open Systems Interconnection (OSI) model. ❖OSI is model for a computer protocol architecture and as a framework for developing 2 protocol standards. Note ISO is the organization; OSI is the model. 3 The Principal Motivation for the Development of the OSI Model ✓ To provide a framework for standardization. ✓ Within the model, one or more protocol standards can be developed at each layer. ✓ Changes in standards in one layer need not affect already existing software in another layer. ✓ The design principle of information hiding is used: ✓ Lower layers are concerned with greater levels of detail; ✓ Upper layers are independent of these details. ✓ Replacing proprietary protocol implementations Advantages of OSI ✓ Network communication is broken into smaller, more manageable parts. ✓ Allows different types of network hardware and software to communicate with each other. ✓ All layers are independent and changes does not affect other layers. ✓ Easier to understand network communication. Why layered communication? ✓ To reduce complexity of communication task by splitting it into several layered small tasks ✓ Assists in protocol design ✓ Fosters competition ✓ Changes in one layer do not affect other layers ✓ Provides a common language OSI layers 7 Summary of OSI Layers 8 LAYER 7: APPLICATION ✓ The application layer is responsible for providing services to the user ✓ Closest to the user and provides user interface ✓ Establishes the availability of intended communication partners ✓ Examples of Application layer protocols are: Telnet, SMTP, FTP, SNMP 9 LAYER 6: PRESENTATION ✓ Concerned with the syntax and semantics of the information exchanged between two systems ✓ This layer is primarily responsible for the translation, encryption and compression of data ✓ Defines coding and conversion functions ✓ This layer also manages security issues by providing services such as data encryption and data compression ✓ Examples of these formats and schemes are: MPEG, QuickTime, ASCII, EBCDIC, GIF, TIFF, JPEG 1.10 LAYER 5: SESSION ✓ Defines how to start, control and end conversations (called sessions) between applications ✓ Establishes dialog control between the two computers in a session, regulating which side transmits, plus when and how long it transmits (Full duplex) ✓ Synchronization: Allows processes to add check points. 1.11 LAYER 4: TRANSPORT ✓ It regulates information flow to ensure process-to- process connectivity between host applications reliably and accurately ✓ Adds service point address or Port address ✓ Segmentation & Re-assembly: SEGMENTS data from sending node and reassembles data on receiving node ✓ Flow control / Error control at Source to destination level 1.12 Transport … ✓ Establishes, maintains and terminates virtual circuits ✓ Connection oriented / Connectionless: ✓ TCP (Reliable, provides guaranteed delivery), ✓ UDP (Unreliable, less overhead, reliability can be provided by the Application layer) ✓ Provides multiplexing: the support of different flows of data to different applications on the same host 1.13 LAYER 3: NETWORK ✓ Defines source to destination delivery of packets across NWs ✓ Defines logical addressing and best path determination. ✓ Treat each packet independently ✓ Defines how routing works and how routes are learned ✓ Routed protocols ( encapsulate data into packets) and Routing protocols (create routing tables) work on this layer ✓ Examples of Routed protocols are: IP, IPX, AppleTalk and Routing protocols are: OSPF, IGRP/EIGRP, RIP, BGP ✓ Routers operate at Layer 3. 1.14 LAYER 2: DATA LINK ✓ Packages raw bits from the physical layer into FRAMES ✓ This layer provides reliable transit of data across a physical link by using the Media Access Control (MAC) addresses ✓ Flow Control: Prevent overwhelming of Receiving Node ✓ Error Control: Through Trailer ✓ Access Control: Which device to have control ✓ Data Link LAN specifications: Fast Ethernet, Token Ring, FDDI. ✓ Data Link WAN specifications are: Frame Relay, PPP, X.25. ✓ Bridges and Switches operate at this layer 1.15 Sub layers of Layer 2 ✓ Logical link layer (LLC) ▪ Used for communication with upper layers ▪ Error correction ▪ Flow control ✓ Media Access Control (MAC) ▪ Access to physical medium ▪ Header and trailer ➔ Trailer: includes a frame check sequence (FCS), which is used to perform error detection. 1.16 DATA LINK Cont’d… ✓ Frames include information about: ✓ Which computers are in communication with each other ✓ When communication between individual computers begins and when it ends ✓ Which errors occurred while the computers communicated (LLC) ✓ frame check sequence calculation 1.17 Layer 1: Physical Layer ✓ Define physical characteristics of network. E.g. wires, connector, voltages, data rates, Asynchronous, Synchronous Transmission ✓ Handles bit stream or binary transmission ✓ Used to maintain, activate and deactivate physical link. ✓ For receiver it reassembles bits and send to upper layer for frames. ✓ For Sender it convert frames into bit stream and send on transmission medium. 1.18 Properties: Physical Layer ✓ Deals with bit stream. ✓ Transmits raw bit stream over physical cable ✓ Defines cables, cards, and physical aspects ✓ Defines techniques to transfer bit stream to cable ✓ Layer 1 Device: Repeater, Hub, Multiplexer 1.19 Physical Layer physical connection Transporting bits from one end node to the next ✓ Type of the transmission media (twisted-pair, coax, optical fiber, air) ✓ Bit representation (voltage levels of logical values) ✓ Data rate (speed) ✓ Synchronization of bits (time synchronization) 1.20 Data Encapsulation ✓ Data Encapsulation: is the process of adding a header to wrap/envelop the data that flows down the OSI model. ✓ The 5 Steps of Data Encapsulation are: I. The Application, Presentation and Session layers create DATA from users' input. II. The Transport layer converts the DATA to SEGMENTS III. The NW layer converts the SEGMENTS to PACKETS IV. The Data Link layer converts the PACKETS to FRAMES V. The Physical layer converts the FRAMES to BITS. 1.21 TCP/IP PROTOCOL SUITE ✓ By IETF: The Internet Engineering Task Force/ DoD ✓ The TCP/IP protocol suite was developed prior to the OSI model. ✓ Therefore, the layers in the TCP/IP protocol suite do not match exactly with those in the OSI model. ✓ The original TCP/IP protocol suite was defined as four software layers built upon the hardware. ✓ Today, however, TCP/IP is thought of as a five-layer model with the layers named similarly to the ones in the OSI model. 1.22 Layers in the TCP/IP Protocol Suite 23 The key features of a protocol ✓ In the context of data networking, a protocol is a formal set of rules and conventions that governs how computers exchange information over a network medium. ✓ The key features of protocol are: ✓ Syntax: data block format ✓ Semantics: control info. & error handling ✓ Timing: speed matching & sequencing 24 End Of Chapter 4-7 Class I 1.25 OSI and TCP/IP similarities Similarities include: ✓ Both have layers. ✓ Both have application layers, ✓ Both have comparable transport and network layers. ✓ Both assume packets are switched. This means that individual packets may take different paths to reach the same destination. This is contrasted with circuit- switched networks where all the packets take the same path. 26 OSI and TCP/IP Differences Differences include: ✓ TCP/IP combines the presentation and session layer issues into its application layer. ✓ TCP/IP combines the OSI data link and physical layers into the network access layer. ✓ TCP/IP appears simpler because it has fewer layers. ✓ TCP/IP protocols are the standards around which the Internet developed, ✓ In contrast, networks are not usually built on the OSI protocol, even though the OSI model is used as a guide. 27 OSI and TCP/IP Differences 28 TCP/IP Process/application layer ✓ These processes integrate the various activities and duties spanning the focus of the OSI’s corresponding top three layers (Application, Presentation, and Session). ✓ Controls user-interface specifications. ✓ A vast array of protocols join forces at the DoD model’s Process/Application layer. 29 TCP/IP Host-to-Host/Transport layer ✓ The Host-to-Host layer parallels the functions of the OSI’s Transport layer, defining protocols for setting up the level of transmission service for applications. ✓ It tackles issues like creating reliable end-to-end communication and ensuring the error-free delivery of data. ✓ It handles packet sequencing and maintains data integrity. 30 TCP/IP INTERNET LAYER ✓ The Internet layer corresponds to the OSI’s Network layer, designating the protocols relating to the logical transmission of packets over the entire network. ✓ It takes care of the addressing of hosts by giving them an IP (Internet Protocol) address and handles the routing of packets among multiple networks. 31 TCP/IP NETWORK ACCESS LAYER ✓ At the bottom of the DoD model, the Network Access layer implements the data exchange between the host and the network. ✓ The equivalent of the Data Link and Physical layers of the OSI model, the Network Access layer oversees hardware addressing and defines protocols for the physical transmission of data. ✓ The reason TCP/IP became so popular is because there were no set physical layer specifications, so it could run on any existing or future physical network! 32 33 Some TCP/IP Protocols 34 Some of application layer protocols and their functions 35 Simple Mail Transfer Protocol (SMTP) ✓ Governs the transmission of mail messages and attachments ✓ SMTP is used in the case of outgoing messages ✓ More powerful protocols such as POP3 and IMAP4 are needed and available to manage incoming messages ✓ POP3 (Post Office Protocol version 3) is the older protocol ✓ IMAP4 (Internet Mail Access Protocol version 4) is the more advanced protocol 36 Telnet: ✓ It allows a user on a remote client machine, called the Telnet client, to access the resources of another machine, the Telnet server, in order to access a command-line interface. 37 File Transfer Protocol (FTP) ✓ Lets us transfer files, and it can accomplish this between any two machines using it. ✓ But accessing a host through FTP is only the first step. ✓ Users must then be subjected to an authentication login that’s usually secured with passwords and usernames implemented by system administrators to restrict access. 38 Domain Name Service (DNS) ✓ Domain Name Service (DNS) resolves host names specifically, Internet names, such as www.amu.edu.et ✓ But you don’t have to actually use DNS. You just type in the IP address of any device you want to communicate with and find the IP address of a URL by using the Ping program. ✓ For example, >ping www.cisco.com will return the IP address resolved by DNS. www.amu.edu.et DNS Server 10.144.5.30 39 DNS cont’d… ✓ The very last section of the domain is called its top-level domain (TLD) name 40 Dynamic Host Configuration Protocol (DHCP) ✓ Dynamic Host Configuration Protocol (DHCP)assigns IP addresses to hosts dynamically. ✓ It allows for easier administration and works well in small to very large network environments. ✓ Many types of hardware can be used as a DHCP server, including a Cisco router. ✓ A DHCP address conflict occurs when two hosts use the same IP address. This sounds bad, and it is! 41 DHCP cont’d… ✓ Here’s a list of the most common types of information a DHCP server can provide: ✓ IP address ✓ Subnet mask ✓ Domain name ✓ Default gateway (routers) ✓ DNS server address ✓ WINS server address 42 Some of Transport layer protocols and their functions 43 TCP(Transmission Control Protocol) ✓ TCP: takes large blocks of information from an application and breaks them into segments. ✓ It numbers and sequences each segment to keep the order the application intended. ✓ After these segments are sent on the transmitting host, TCP waits for an acknowledgment of the receiving end’s. ✓ Retransmitting any segments that aren’t acknowledged. ✓ It is Connection oriented means that a virtual connection is established before any user data is transferred. 44 TCP cont’d.. ✓ TCP can also recognize duplicate messages and will discard them appropriately. ✓ If the sending computer is transmitting too fast for the receiving computer, TCP can employ flow control mechanisms to slow data transfer. ✓ TCP can also communicates delivery information to the upper-layer protocols and applications it supports. ✓ All these characteristics makes TCP an end-to-end reliable transport protocol. 45 TCP SEGMENT FORMAT ✓Below figure demonstrate how TCP segments a data stream and prepares it for the Internet layer. ✓When the Internet layer receives the data stream, it routes the segments as packets through an internetwork. 46 Some of fields in TCP segment ✓ Source port : This is the port number of the application on the host sending the data. ✓ Destination port: This is the port number of the application requested on the destination host. ✓ Sequence number: A number used by TCP that puts the data back in the correct order or retransmits missing or damaged data during a process called sequencing. ✓ Acknowledgment number: The value is the TCP octet that is expected next. 47 Some of fields Cont’d.. ✓ Header length: The number of 32-bit words in the TCP header, which indicates where the data begins. ✓ Reserved: for future use, Always set to zero. ✓ Code bits/flags: Controls functions used to set up and terminate a session. ✓ Window: is window size the sender willing to accept, in octets. ✓ Checksum: The cyclic redundancy check (CRC), used because TCP doesn’t trust the lower layers and checks everything. ✓ CRC checks the header and data fields 48 User Datagram Protocol (UDP) ✓ User Datagram Protocol (UDP) is basically the scaled- down economy model of TCP, which is why UDP is sometimes referred to as a thin protocol. ✓ A thin protocol doesn’t take up a lot of room—or in this case, doesn’t require much bandwidth on a network. ✓ UDP does not sequence the segments and does not care about the order in which the segments arrive at the destination. ✓ UDP just sends the segments off and forgets about them. 49 UDP cont’d… ✓ It doesn’t follow segments, check up on them, or even allow for an acknowledgment of safe arrival. Because of this, it’s referred to as an unreliable protocol. ✓ This does not mean that UDP is ineffective, only that it doesn’t deal with reliability issues at all. ✓ UDP doesn’t create a virtual circuit or doesn’t contact the destination before delivering information. ✓ Because of this, it’s also considered a connectionless protocol. 50 UDP cont’d… Note ✓ Since UDP assumes that the application will use its own reliability method, it doesn’t use any itself. ✓ This presents an application developer with a choice when running the Internet Protocol stack: TCP for reliability or UDP for faster transfers. ✓ TCP sequences the segments so they get put back together in exactly the right order, which is something UDP just can’t do. 51 UDP cont’d… Note 52 UDP cont’d… Note 53 End Of Chapter 4-7 Class II 1.54 Some of Internet or Network layer protocols and their functions 55 Internet Protocol (IP) (Layer 3 protocol) ✓ Used for data communication in packet switched network ✓ Unreliable and connectionless (no specific path) ✓ Unreliable ✓ Data corruption ✓ Packet lost ✓ Out of order ✓ Internet Protocol versions: IPv4, IPv6 56 IPv4 ✓ Internet protocol version 4 ✓ Uses 32 bit address. ✓ Possible addresses 232 = 4,294,967,296 (4.3 billion) ✓ Private addresses (LANs): ✓ 10.0.0.0 – 10.255.255.255 ✓ 172.16.0.0 – 172.31.255.255 ✓ 192.168.0.0 – 192.168.255.255 ✓ Total reserved private addresses = 18 Million ✓ Multicast addresses: ✓ 224.0.0.0 – 239.255.255.255 ✓ Total multicast addresses = 270 million ✓ Available addresses = possible addresses – (private addresses+ multicast addresses (288 Mn)) 57 IP Addresses - Class A ✓ 32 bit global internet address ✓ Network part and Host part ✓ Class A ✓ Start with binary 0 ✓ All 0 reserved ✓ 01111111 (127) reserved for loopback ✓ Range 1.x.x.x to 126.x.x.x ✓ All allocated 58 IP Addresses - Class B ✓ Start 10 ✓ Range 128.x.x.x to 191.x.x.x ✓ Second Octet also included in network address ✓ 214 = 16,384 class B addresses ✓ All allocated 59 IP Addresses - Class C ✓ Start 110 ✓ Range 192.x.x.x to 223.x.x.x ✓ Second and third octet also part of network address ✓ 221 = 2,097,152 addresses Note READ MORE ABOUT SUBNETTING 60 IP Addresses cont’d… 61 Subnet Mask Conversions 62 IPv6 ✓ Increase in number of addresses ✓ 128 bits long address ✓ Represented in hexadecimal. 128 ✓ Possible addresses 2 96 ✓ 2 more address than IPv4 ✓ ARP, RARP, IGMP are deleted or merged into ICMPv6 protocol. 63 Format of IP Datagram 64 IP datagram format c o n t ’ d … ✓ Vers (4 bits): Version of IP protocol (IPv4=4) ✓ Hlen (4 bits): Header length (usual case) = 20 ✓ Type of Service: TOS (8 bits): Little used in past, now being used for QoS ✓ Total length (16 bits): Length of datagram in bytes, includes header and data ✓ Time to live: TTL (8bits): Specifies how long datagram is allowed to remain in internet ✓ Routers decrement by 1 ✓ When TTL = 0 router discards datagram ✓ Prevents infinite loops ✓ Protocol (8 bits): specifies the format of the data area ✓ Protocol numbers administered by central authority to guarantee agreement, e.g. TCP=6, UDP=17 … 65 IP datagram format c o n t ’ d … ✓ Source & destination IP address (32 bits each): contain IP address of sender and intended recipient. ✓ Options (variable length): Mainly used to record a route, or timestamps, or specify routing. ✓ Identification: copied into fragment, allows destination to know which fragments belong to which datagram ✓ Fragment Offset (12 bits): specifies the offset in the original datagram of the data being carried in the fragment ✓ Flags (3 bits): control fragmentation 66 ARP Protocol (layer 3) ✓ Stands for Address Resolution Protocol ✓ Finding physical address from logical address ✓ Host or router transmit IP datagram packet containing logical address obtained from DNS. ✓ Query is broadcast but reply is unicast. ✓ Request contains sender and receiver IP plus sender physical address. ✓ Reply contains physical address. 67 ARP Cont’d… ✓ ARP is used in four cases of two hosts communicating: ✓ When two hosts are on the same network and one desires to send a packet to the other. (same network) ✓ When two hosts are on different networks and must use a gateway/router to reach the other host (internet) ✓ When a router needs to forward a packet for one host through another router. (internet) ✓ When a router needs to forward a packet from one host to the destination host on the same network. (internet) ✓ Reverse of ARP=RARP ✓ Finding logical address from physical address 68 ARP Cont’d… 69 ICMP (Layer 3) ✓ Used to report errors with delivery of IP data. ✓ E.g. if particular service or host not reachable or to check routers are correctly routing. ✓ ICMP message is delivered in IP packet. ✓ Error reporting not error correction. ✓ Two types of messages ✓ Error reporting message ✓ Problems with router or host e.g. destination unreachable, time exceeded, parameters problem ✓ Query message ✓ Help in getting specific information. e.g. neighbors 70 ICMP Cont’d… 71 IGMP (Layer 3) ✓ Internet group management protocol ✓ Protocol involved in multicasting. ✓ Protocol that manages group membership. ✓ Provides information to multicast routers about the membership status of hosts. ✓ Agent maintains, edit membership and provide information of group. 72 IGMP Cont’d… ✓ IGMP has following messages ✓ Query ✓ Request for information of hosts ✓ Joining report ✓ If one process in group sends membership report. ✓ Leaving report ✓ When no other processes in company 73 Routing Protocols ✓ Routing protocols use metrics to evaluate what path will be the best for a packet to travel. ✓ Dynamic Routing Protocols ✓ There are 3 types of Dynamic routing protocols, I. Distance Vector II. Link State III. Hybrid 74 Dynamic Routing Protocols I. Distance Vector: compute the best path from information passed to them from neighbors II. Link State: each have a copy of the entire network map ✓ Link State routers compute best routes from this local map. ✓ Link-state algorithms (also known as shortest path first algorithms) flood routing information to all nodes in the internetwork. III. Hybrid routers: combines distance vector and link state 75 Reading assignment: Study in detail how dynamic routing protocol works??? 76 End Of Chapter 4-7 Class III 1.77