CSIT340 Summer 2023 Murtadha Aldeer Lecture 2 Borrowed from D. Raychaudhuri (RUTGERS UNIVERSTY) Includes teaching materials from Peterson & Davie, Panagiota Fatourou, V. Ramachandran, Andrew T. Campbell and other sources © Copyright Statement: The materials provided by the instructor in this course are for the use of the students enrolled in the course. Course materials may not be further disseminated. Recap from previous lecture • The Internet is: - A federated system (a global network of networks) - Diverse and dynamic in range (different types of devices, different technologies, supports different applications, etc.) - Based on Packet Switching - Prone to failure - But it is working, relies on IP protocol 2 For your information Tier1, Tier2, and Tiers networks that constitute the Internet 3 Source: Wikipedia - Tier 1 networks can reach every other network on the Internet for free. - They are the largest in coverage and peering services - Ex of Tier1 networks: Verizon, AT&T. - A Tier 2 network peers with other Tier 2 networks for free - Purchase IP transit from Tier 1 to reach the Internet and peering with other Tier 2 networks - A Tier 3 network peers with other Tier 3 networks, and reaches the Internet via Tier 2 network(s), by purchasing service Today’s lecture Internet Protocol Stack 4 Protocol “l ayers ” and reference m odels Networks are complex, with many “pieces”: hosts routers links of various media applications protocols hardware, software Question: is there any hope of organizing structure of network? .... or at least our discussion of networks? Dear John, Your days are numbered. --Pat Inspiration... • CEO A writes letter to CEO B – Folds letter and hands it to administrative aide • Aide: – Puts letter in envelope with CEO B’s full name – Takes to FedEx • FedEx Office – Puts letter in larger envelope – Puts name and street address on FedEx envelope – Puts package on FedEx delivery truck • FedEx delivers to other company 6 CEO Aide FedEx CEO Aide FedEx Location Fedex Envelope (FE) The Path of the Letter Letter Envelope Semantic Content Identity “Peers” on each side understand the same things No one else needs to Lowest level has most packaging 7 The Path Through FedEx Truck Sorting Office Airport FE Sorting Office Airport Truck Sorting Office Airport Crate Crate FE New Crate Crate FE Higher “Stack” at Ends Partial “Stack” During Transit Deepest Packaging (Envelope+FE+Crate) at the Lowest Level of Transport Highest Level of “Transit Stack” is Routing 8 Layering To ease software development and maximize flexibility: - Network protocols are generally organized in layers - Replace one layer without replacing surrounding layers - Higher-level software does not have to know how to format an Ethernet packet ... or even know that Ethernet is being used What is a Protocol? 10 A human protocol and a computer network protocol http://www2.ic.uff.br/~michael Internet protocol stack What is a Protocol? (in computer networks) • E.g., the destination address is in the 1 st xx bytes of the packet • When A sends B a packet of type X, B should return a packet of type Y to A ... then A should respond with Z 11 Protocols On top of a packet switched network, need: • Set of rules governing communication between network elements (applications, hosts, routers) • Protocols define: – format and order of messages sent and received among network entities – actions taken on transmission and receipt of a message 12 What is a Protocol? • An agreement between parties on how to communicate • Include syntax and semantics – how a communication is specified and structured – what a communication means • Protocols exist at many hardware, software, all levels! • Defined by a variety of standards bodies – IETF (ietf.org), IEEE, ITU, ... 13 Protocol elements - Syntax: The term syntax refers to the structure or format of the data, meaning the order in which they are presented. For example, a simple protocol might expect the first 8 bits of data to be the address of the sender, the second 8 bits to be the address of the receiver, and the rest of the stream to be the message itself. - Semantics: The word semantics refers to the meaning of each section of bits. How is a particular pattern to be interpreted, and what action is to be taken based on that interpretation? For example, does an address identify the route to be taken or the final destination of the message? 14 From Forouzan, Data Communications & Networking, sec. 1.4 Internet protocol s tack application: supporting network applications • IMAP, SMTP, HTTP transport: process-process data transfer • TCP, UDP network: routing of datagrams from source to destination • IP, routing protocols link: data transfer between neighboring network elements • Ethernet, 802.11 (WiFi), PPP physical: bits “on the wire” application transport network link physical Internet Protocol suite* Layered Protocols Host Host Application Transport Network (or Internet) Link User A User B Teleconferencing Layering: technique to simplify complex systems Peers *commonly known as TCP/IP because the foundational protocols in the suite are the Transmission Control Protocol (TCP) and the Internet Protocol (IP). 16 physical Internet Reference Model • IP is the “narrow waist” of the Internet • Supports many different links below and apps above. • Examples of common protocols in each layer SMTP HTTP RTP DNS Ethernet 3G Cable DSL 802.11 5-7 Application TCP UDP 4 Transport IP 3 Internet 2/1 Link 17 Distributing Layers Across Network Layers are simple if only on a single machine Just stack of modules interacting with those above/below But we need to implement layers across machines Hosts Routers (switches) What gets implemented where? 18 What gets implemented at the end host? • Bits arrive on wire, must make it up to application • Therefore, all layers must exist at host! 19 What gets implemented in the network? • Bits arrive on wire – Physical layer necessary • Packets must be delivered to next-hop and across local networks – Datalink layer necessary • Packets must be delivered between networks for global delivery – Network layer necessary • The network doesn’t support reliable delivery – Transport layer (and above) not supported 20