Document Details

StableWalnutTree

Uploaded by StableWalnutTree

Sri Lanka Institute of Information Technology (SLIT)

Tags

protocol architecture networking TCP/IP

Full Transcript

Sri Lanka Institute of Information Technology Faculty of Computing Protocol Architecture Shashika Lokuliyana Year 01 and Semester 01 Year 01 Semester 01 1 Lesson outline What are Protocols? Need fo...

Sri Lanka Institute of Information Technology Faculty of Computing Protocol Architecture Shashika Lokuliyana Year 01 and Semester 01 Year 01 Semester 01 1 Lesson outline What are Protocols? Need for protocols in networking Protocol layering and Encapsulation TCP/IP protocol stack ISO/OSI reference model Comparison of OSI and TCP/IP Year 01 Semester 01 Year 01 Semester 01 2 Key terms and concepts Protocol Protocol Data Unit Encapsulation De-encapsuation Protocol architecture Protocol layering Protocol stack Protocol suite Protocol family Reference model Year 01 Semester 01 Year 01 Semester 01 3 What’s a protocol? Human protocols: Network protocols: § “What is the time?” § computers (devices) rather than humans § “Any questions?” § all communication activity in Internet § Introductions governed by protocols Rules for: Protocols define the format, order of … specific messages sent messages sent and received … specific actions taken when message received, among network entities, and or other events actions taken on message transmission, receipt Year 01 Semester 01 Year 01 Semester 01 4 Example: What is the time? Example human protocol A Excuse me B Are these steps essential? Yes What is the time? 2 pm Thank you time Are these steps essential? No problem. Year 01 Semester 01 Year 01 Semester 01 5 Example: What is the time? Example human protocol A B Με συγχωρείς Are these steps essential? Sorry. I don’t understand Not essential if both are speaking the same language. In this case the But safer to have them communication task to make sure that both can is incomplete time understand each other cannot proceed to make sure that A has got to steps 3 and 4 B’s attention Year 01 Semester 01 Year 01 Semester 01 6 Example: What is the time? Example human protocol A B A did not have B’s attention to ask What is the time? the question. Sorry. What did you say? What is the time? 2 pm time Year 01 Semester 01 Year 01 Semester 01 7 Example: What is the time? Example human protocol A Excuse me B Yes What is the time? 2 pm These two steps are optional. - No “Thank you” Thank you time - Just “Thank you” No problem - “Thank you” followed by “No problem” Year 01 Semester 01 Year 01 Semester 01 8 Example: DNS request Client Server What is the IP address of www.sliit.lk? Use any of 108.156.133.34 108.156.133.43 108.156.113.114 108.156.113.114 time 9 Year 01 Semester 01 Year 01 Semester 01 Example: Web page request A web browser(client) accessing a web page on a web server using HTTP (Hyper Text Transfer Protocol) Client Server GET /index.html 200 OK GET /image.png 404 Not found time Year 01 Semester 01 Year 01 Semester 01 10 Example: Four frame exchange in Wi-Fi 1. Source issues a Request to Send (RTS) frame 2. Destination responds with Clear to Send (CTS) 3. After receiving CTS, source transmits data 4. Destination responds with ACK Year 01 Semester 01 Year 01 Semester 01 11 Example: Four frame exchange in Wi-Fi (ctd) Sender (A) waits until no one else is “speaking” Continues to wait for a specified time period (DIFS = 34 μs) If no one is “speaking” even after that time period, it sends a Request to Send (RTS) to the intended recipient After receiving the RTS, the recipient (B) waits for a time period (SIFS = 16 μs) Recipient sends Clear to Send (CTS) to the sender After receiving CTS, the sender waits for a time period (SIFS) and sends the data Other stations “keep quiet” for a time period specified in RTS/CTS messages After receiving the data, the recipient waits for a time period (SIFS) and sends an Acknowledgment If no Acknowledgement is received within a timeout, sender starts all over again Year 01 Semester 01 Year 01 Semester 01 12 Example: Four frame exchange in Wi-Fi (ctd) Message format for Wi-Fi Year 01 Semester 01 Year 01 Semester 01 13 Revisit: What is a protocol? Protocols define the format, order of messages sent and received among network entities, and actions taken on message transmission, receipt Also define what to do if an expected message is not received Some messages are essential, while others may be optional or required in certain situations In “What is the time?”, don’t hit the other person for not saying “Thank you” Violating the protocol can make the communication difficult or impossible The messages exchanged are called protocol data units (PDUs) Year 01 Semester 01 Year 01 Semester 01 14 Exercises What are possible variations in the “What is the time?” Expected response / action not received Identify the messages and actions involved in another human transaction, like Teacher asking “Do you have any questions?” in a lecture Buying a lunch packet from the canteen …. …. …. Year 01 Semester 01 Year 01 Semester 01 15 Need for a protocol architecture Communicating with another device is a complex task Better if this big task can be broken into a number of smaller subtasks An example 5-layer architecture Each subtask can be performed by hardware and/or software layer specialized to do that subtask The layers and subtasks can be organized such that each layer provides some services to the layer above each layer uses the services provided by the layer below Each layer can be modified independently, as long as the services provided to the upper layer and the services expected from the lower layer do not change i.e. the interfaces between the layers do not change Peer layers at the two ends communicate using a protocol specific to that layer Can be changed without affecting the upper or lower layers Year 01 Semester 01 Year 01 Semester 01 16 Protocol layering: an analogy Consider an office consisting of the following personnel Officer grade: Engineer and Finance officer Secretary grade: A confidential secretary to handle confidential matters and a secretary to handle other matters Office assistant: Sends documents given by a secretary to the destination, and passes received documents to the appropriate secretary Each layer provides services to the upper layer and uses the services provided by the lower layer It is obvious that dividing the tasks in the office into subtasks and using specialized persons to do each subtask is better than having a single person doing all the tasks Each person can be changed independently without affecting others in the office Year 01 Semester 01 Year 01 Semester 01 17 Protocol layering analogy – scenario 1 Engineer in Office A communicating with engineer in office B Using the services of the normal secretary Note that the message is ”encapsulated” by each layer Year 01 Semester 01 Year 01 Semester 01 18 Protocol layering analogy – scenario 2 Finance officer in Office A communicating with finance officer in office B Message requires confidentiality § Use the services of confidential secretary § Message may be encrypted Because the envelope is marked as confidential, Office Assistant in office B passes it over to the confidential secretary Year 01 Semester 01 Year 01 Semester 01 19 Layered Internet (TCP/IP) protocol stack § application: supporting network applications HTTP, IMAP, SMTP, DNS § transport: process-process data transfer application application TCP, UDP § network: routing of datagrams from source to transport transport destination IP, routing protocols network § link: data transfer between neighboring link network elements Ethernet, 802.11 (WiFi), PPP physical § physical: bits “on the wire” Year 01 Semester 01 Year 01 Semester 01 20 TCP/IP layers: Application layer The application layer is where network applications and their application- layer protocols reside HTTP: for web document request and transfer SMTP: for the transfer of e-mail messages FTP: for the transfer of files DNS: for translation of human-friendly names like www.ietf.org to a numerical network address An application in one end system exchanges packets of information with the application in another end system following the rules of the specific application layer protocol We refer to this packet (PDU) of information at the application layer as a message Year 01 Semester 01 Year 01 Semester 01 21 TCP/IP layers: Transport layer The Internet’s transport layer is responsible for transporting application-layer messages between application endpoints In the TCP/IP Internet there are two transport protocols, TCP and UDP, either of which can transport application layer messages TCP – Transport Control Protocol UDP – User Datagram Protocol TCP provides a connection- oriented service to its applications. Includes guaranteed delivery of application-layer messages to the destination Provides flow control (that is, sender/receiver speed matching) Breaks long messages into shorter segments Provides a congestion-control mechanism, so that a source throttles its transmission rate when the network is congested. The UDP protocol provides a connectionless service to its applications provides no reliability, no flow control, and no congestion control A transport-layer packet (PDU) as a segment Year 01 Semester 01 Year 01 Semester 01 22 TCP/IP layers: Network layer The network layer is responsible for moving network-layer packets known as datagrams from one host to another The Internet transport-layer protocol (TCP or UDP) in a source host passes a transport-layer segment and a destination address to the network layer just like destination address of a letter that you post using the postal service The network layer then provides the service of delivering the segment to the transport layer in the destination host The main protocol used in the network layer is the IP protocol (Internet Protocol) There is only one IP protocol, and all devices on the Internet must use IP Two versions: IPv4 and IPv6 The Internet’s network layer also has a number of other protocols such as routing protocols The network layer is also called IP layer, as IP is the main protocol used in this layer Year 01 Semester 01 Year 01 Semester 01 23 TCP/IP layers: Link layer The IP layer routes a datagram through a series of routers between the source and destination To move a packet from one node (host or router) to the next node in the route, the network layer relies on the services of the link layer At each node, the network layer passes the datagram down to the link layer, which delivers the datagram to the next node along the route At this next node, the link layer passes the datagram up to the network layer. The services provided by the link layer depend on the specific link-layer protocol that is employed over the link Examples of link-layer protocols include Ethernet: for wired local area networks (LANs) Wi-Fi: wireless LANs PPP: for point-to-point links HDLC: for point-to-point links We refer to the link-layer packets (PDUs) as frames Year 01 Semester 01 Year 01 Semester 01 24 TCP/IP layers: Physical layer The job of the physical layer is to move the individual bits (1s and 0s) in the link layer frame from one node to the next The protocols in this layer depend on the actual transmission medium of the link twisted-pair copper wire optical fiber For example, Ethernet has many physical-layer protocols: one for twisted-pair copper wire another for coaxial cable another for fiber … and so on In each case, a bit is moved across the link in a different way Year 01 Semester 01 Year 01 Semester 01 25 Services, Layering and Encapsulation M application Application exchanges messages to implement some application application service using services of transport layer Ht M transport Transport-layer protocol transfers M (e.g., reliably) from transport one process to another, using services of network layer network § transport-layer protocol encapsulates network application-layer message, M, with link transport layer-layer header Ht to create a link transport-layer segment Ht used by transport layer protocol to physical implement its service physical source destination Year 01 Semester 01 Year 01 Semester 01 26 Services, Layering and Encapsulation M application application Ht M transport Transport-layer protocol transfers M (e.g., reliably) from transport one process to another, using services of network layer network Hn Ht M network Network-layer protocol transfers transport-layer segment [Ht | M] from one host to another, using link link layer services link § network-layer protocol encapsulates transport-layer segment [Ht | M] with physical physical network layer-layer header Hn to create a network-layer datagram source Hn used by network layer protocol to destination implement its service Year 01 Semester 01 Year 01 Semester 01 27 Services, Layering and Encapsulation M application application Ht M transport transport network Hn Ht M network Network-layer protocol transfers transport-layer segment [Ht | M] from one host to another, using link layer services link Hl Hn Ht M link Link-layer protocol transfers datagram [Hn| [Ht |M] from host to neighboring host, using network-layer services physical physical § link-layer protocol encapsulates network datagram [Hn| [Ht |M], with link-layer source header Hl to create a link-layer frame destination Year 01 Semester 01 Year 01 Semester 01 28 Encapsulation Encapsulation means putting in a cover or a container Putting medicine in a capsule Putting a letter in an envelope In networking, encapsulation is done by adding a header In some cases a trailer as well De-encapsulation means removing the header (and trailer) to extract the original data Year 01 Semester 01 Year 01 Semester 01 29 Encapsulation Matryoshka dolls (stacking dolls) message segment datagram frame Credit: https://dribbble.com/shots/7182188-Babushka-Boi Year 01 Semester 01 Year 01 Semester 01 30 Services, Layering and Encapsulation application message M M application transport segment Ht M Ht M transport network datagram Hn Ht M Hn Ht M network link frame Hl Hn Ht M Hl Hn Ht M link physical physical source destination Year 01 Semester 01 Year 01 Semester 01 31 Encapsulation: an end-end view source message application segment Ht M M transport datagram Hn Ht M network frame Hl Hn Ht M link physical link physical switch destination Hn Ht M network M application Hl Hn Ht M link Hn Ht M Ht M transport physical Hn Ht M network Hl Hn Ht M link router physical Year 01 Semester 01 Year 01 Semester 01 32 ISO / OSI reference model Open Systems Interconnect (OSI) architecture developed by ISO (International Standards Organization) It is more of a “reference” architecture as opposed to the TCP/IP stack which is based on actual protocols in use Has a total of 7 layers, compared to the 5 layers of TCP/IP stack Additional layers are Session and Presentation In the TCP/IP stack the functions of these layers are performed by Transport and Application layers Year 01 Semester 01 Year 01 Semester 01 33 Lesson summary Protocol Data Unit (PDU): The packet of information at each layer. Encapsulation and De-encapsulation: Wrapping data with protocol-specific headers/trailers and removing them at the destination. Protocol Architecture: Organized structure of protocols and layers facilitating network communication. Protocol Suite/Stack/Family: A set of protocols working together in a layered architecture. Layered Services: Each layer provides services to the layer above and utilizes services from the layer below. Year 01 Semester 01 Year 01 Semester 01 34 References Chapter 1 - Introduction James F. Kurose and Keith W. Ross, Computer Networking – A Top- Down Approach, (8th Edition), Pearson, 2020 Chapter 2 - Protocol Architecture, TCP/IP, and Internet-Based Applications William Stallings, Data and Computer Communications (10th Edition), Pearson, 2014 Credit to the content creator : Dr. Nimal Rajapaksha Year 01 Semester 01 Year 01 Semester 01 35

Use Quizgecko on...
Browser
Browser