

















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
– A router has a distinguished role as a host because it will forward IP packets across network boundaries. – All internetworking is done below ...
Typology: Slides
1 / 25
This page cannot be seen from the preview
Don't miss anything!


















CS 422/522 Design & Implementation of Operating Systems
Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions of the CS422/522 lectures taught by Prof. Bryan Ford and Dr. David Wolinsky, and also from the official set of slides accompanying the OSPP textbook by Anderson and Dahlin. 1
! History:
connecting millions of computing devices throughout the world. ! Each network is administered independently of all other networks
Physical Data Link Network Transport Session Presentation Application Layer Name Description Specific application (file transfer, remote login, etc.) Data formatting and conversion (e.g. byte-swapping) Long-lived “virtual connection” primitives Reliable or unreliable end-to-end data delivery Packet routing through intermediate hosts Controls physical link between two endpoints Electrical signals over physical media 8
! TCP/IP based on a simplified form of OSI model: OSI model Physical Data Link Network Transport Session Presentation Application Internet model Application Network Transport Data Link (telnet, ftp, WWW, …) Transmission Control Protocol (TCP), UDP Internet Protocol (IP) (Ethernet, token ring, PPP,…) 9
! We want to transfer a file between two hosts directly connected by a Local Area Network (LAN): Ethernet FTP client FTP server 10
! Multiple networks are linked together by routers - special hosts with multiple network connections: Ethernet driver FTP client TCP IP Ethernet driver FTP server TCP IP FTP Protocol TCP Protocol IP Protocol Ethernet Ethernet Ethernet driver IP Ethernet driver IP Protocol router Ethernet Protocol Ethernet Protocol 13
! Items to note from this diagram:
! In the previous example, FTP is “above” TCP which is “above” IP, which is “above” the Ethernet driver. ! Q: What does this mean from an implementation point of view? ! A: Each network layer may only interact with layers located directly above and below it in the protocol stack.
! A network layer makes use of layers beneath it through encapsulation: application data application data application data application data TCP header TCP header TCP header IP header ENet header IP header ENet trailer TCP segment IP datagram Ethernet frame 16
! There are five different classes of Internet address: Class A Class B Class C Class D Class E (^0) netid 7 bits hostid 24 bits (^1 0) netid hostid 14 bits 16 bits (^1 1 0) netid hostid 21 bits 8 bits (^1 1 1 0) multicast group ID 28 bits (^1 1 1 1 0) reserved for future use 27 bits 19
! Certain IP addresses are assigned a “special” meaning: ! netid = 127:
! IP Addresses are not particularly convenient for humans. ! Therefore, each host may be assigned a hostname - a friendly, string “name” identifying the host. ! For example, the hostname: george.lbl.gov ! maps to the IP address: 128.3.196. 21
! Originally, the mapping from host names to IP addresses was administered through a single flat file: /etc/hosts.
! The process of looking up a domain name to address mapping is called name resolution. Name resolution happens recursively: ns.nasa.gov (root) client … abc.edu berkeley.edu …. 1 2 ns.berkeley.edu … cchem.berkeley.edu cs.berkeley.edu ... 3 4 ns.cchem.berkeley.edu … cesium.cchem.berkeley.edu selenium.cchem.berkeley.edu … 5 6 25
Application Network Transport Data Link (telnet, ftp, WWW, …) Transmission Control Protocol (TCP), UDP Internet Protocol (IP) (Ethernet, token ring, PPP,…) 27
! The Link Layer refers to the software directly responsible for a physical link.
! Key Points:
Application Network Transport Data Link (telnet, ftp, WWW, …) Transmission Control Protocol (TCP), UDP Internet Protocol (IP) (Ethernet, token ring, PPP,…) 32
! IP is a stateless, connectionless, unordered, unreliable, protocol. More sophisticated facilities such as logical connections and reliability are provided by higher layers. ! Internet hosts communicate by exchanging IP datagrams. 33
! IP is stateless - hosts do not retain any information at the level of IP about previous transmissions. ! IP is connectionless - a datagram may be sent from one node to another without first “opening a connection” to the node. ! IP is unordered^ - packets may arrive at their destination in a different order than they were sent. ! IP is unreliable - packets may be dropped or corrupted. 34
sent by a host
Application Network Transport Data Link (telnet, ftp, WWW, …) Internet Protocol (IP) (Ethernet, token ring, PPP,…) 38
! TCP is a transport-layer protocol layered on top of IP. TCP provides a connection-oriented, two-way, ordered, reliable, byte-stream model of communication.
this functionality is found in the TCP protocol. 39
! TCP is connection-oriented. A logical connection must be established before communication begins. ! TCP is ordered - data is delivered to a receiving application in the order it was transmitted by the sender. ! TCP is reliable - Retransmissions and acknowledgements are used to ensure that all data arrives at the destination. Checksums are used to ensure that data is not corrupted in transit. ! TCP presents a byte-stream model - data may be delivered in different-sized chunks than it was transmitted. 40