1 Designing IP EE 122: Intro to Communication Networks Fall 2010 (MW 4-5:30 in 101 Barker) Scott Shenker TAs: Sameer Agarwal, Sara Alspaugh, Igor Ganichev,

Slides:



Advertisements
Similar presentations
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
Advertisements

Computer Networks20-1 Chapter 20. Network Layer: Internet Protocol 20.1 Internetworking 20.2 IPv IPv6.
CE363 Data Communications & Networking Chapter 7 Network Layer: Internet Protocol.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IPv4 - The Internet Protocol Version 4
Fundamentals of Computer Networks ECE 478/578 Lecture #14: InternetWorking Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University.
1 IP - The Internet Protocol Relates to Lab 2. A module on the Internet Protocol.
1 EE 122: Designing IP Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson, Jennifer.
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
Today IP Addressing IP Header IP Fragmentation
Chapter 20 Network Layer: Internet Protocol Stephen Kim 20.1.
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 5-1 Internet Protocol (IP): Packet Format, Fragmentation, Options Shivkumar Kalyanaraman Rensselaer.
1 K. Salah Module 5.2: Internet Protocol CO vs. CL protocols IP Features –Fragmentation –Routing IP Datagram Format IPv6.
Network Layer Packet Forwarding IS250 Spring 2010
Internet Control Message Protocol (ICMP). Introduction The Internet Protocol (IP) is used for host-to-host datagram service in a system of interconnected.
IP Protocol. The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains addressing information and some control information that enables.
1 Designing IP EE122 Fall 2011 Scott Shenker Materials with thanks to Jennifer Rexford, Ion Stoica, Vern Paxson and.
Internet Protocol-IP. Objective l TCP/IP vs. OSI models l CO vs. CL protocols l IP Features »Fragmentation »Routing l IP Datagram Format l IPv6.
The IP Data Plane CS168, Fall 2014 Sylvia Ratnasamy
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
ICMP (Internet Control Message Protocol) Computer Networks By: Saeedeh Zahmatkesh spring.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Network Layer ICMP and fragmentation.
Introduction to Networks CS587x Lecture 1 Department of Computer Science Iowa State University.
Network Layer Last Update Copyright Kenneth M. Chipps Ph.D.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Fall 2005Computer Networks20-1 Chapter 20. Network Layer Protocols: ARP, IPv4, ICMPv4, IPv6, and ICMPv ARP 20.2 IP 20.3 ICMP 20.4 IPv6.
Suez Canal University – Faculty of Computers & Informatics - Cisco Local Academy Network Fundamentals.
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
 The basis the Internet is built upon  Very simple, but allows more complex stuff to be layered on top.
TCOM 515 IP Routing. Syllabus Objectives IP header IP addresses, classes and subnetting Routing tables Routing decisions Directly connected routes Static.
Dr. John P. Abraham Professor UTPA
Chapter 81 Internet Protocol (IP) Our greatest glory is not in never failing, but in rising up every time we fail. - Ralph Waldo Emerson.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
ECE 4110 – Internetwork Programming IP Protocol. 2 * From TCP/IP Protocol Suite, B. A. Forouzan, Prentice Hall Position of IP in TCP/IP Protocol Suite.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
The Internet Protocol Dr. Adil Yousif. 2  IP (Internet Protocol) is a Network Layer Protocol. Orientation.
Packet switching network Data is divided into packets. Transfer of information as payload in data packets Packets undergo random delays & possible loss.
CS 4396 Computer Networks Lab
1 Chapter 23 Internetworking Part 3 (Control Messages, Error Handling, ICMP)
Internet Protocols (chapter 18) CSE 3213 Fall 2011.
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.1 Computer Networks and Internets, 5e By Douglas E. Comer Lecture PowerPoints.
CSC 600 Internetworking with TCP/IP Unit 5: IP, IP Routing, and ICMP (ch. 7, ch. 8, ch. 9, ch. 10) Dr. Cheer-Sun Yang Spring 2001.
1 Computer Communication & Networks Lecture 19 Network Layer: IP and Address Mapping Waleed Ejaz.
Internet Protocol Version 4 VersionHeader Length Type of Service Total Length IdentificationFragment Offset Time to LiveProtocolHeader Checksum Source.
2016/3/16 1 Network Layer. 2016/3/ Layer 3 Functionalities The Network layer provides services to exchange the individual pieces of data over the.
COMPUTER NETWORKS CS610 Lecture-30 Hammad Khalid Khan.
Network Layer Protocols COMP 3270 Computer Networks Computing Science Thompson Rivers University.
Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IPv4 IPv4 The Internet Protocol version 4 (IPv4) is the delivery mechanism used by the TCP/IP protocols. Datagram Fragmentation Checksum Options Topics.
Lecture 13 IP V4 & IP V6. Figure Protocols at network layer.
20.1 Chapter 20 Network Layer: Internet Protocol Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Network Layer & IP Protocol.
Behrouz A. Forouzan TCP/IP Protocol Suite, 3rd Ed.
IP - The Internet Protocol
IP (slides derived from past EE122 sections)
IP - The Internet Protocol
IP - The Internet Protocol
Dr. John P. Abraham Professor UTPA
Chapter 20 Network Layer: Internet Protocol
Dr. John P. Abraham Professor UTRGV, EDINBURG, TX
IP - The Internet Protocol
Dr. John P. Abraham Professor UTPA
Network Layer 2019/1/13.
Net 323 D: Networks Protocols
Chapter 15. Internet Protocol
IP - The Internet Protocol
ITIS 6167/8167: Network and Information Security
IP - The Internet Protocol
NET 323D: Networks Protocols
Presentation transcript:

1 Designing IP EE 122: Intro to Communication Networks Fall 2010 (MW 4-5:30 in 101 Barker) Scott Shenker TAs: Sameer Agarwal, Sara Alspaugh, Igor Ganichev, Prayag Narula Materials with thanks to Jennifer Rexford, Ion Stoica, Vern Paxson and other colleagues at Princeton and UC Berkeley

2 Goals of Today’s Lecture Transitioning from high-level principles to low-level design Review basic design decisions Discuss the design of IP –The “what” and “why” of the IP header Compare with IPv6

Review of Basic Design Decisions 3

Five Basic Design Decisions (so far) 1.Packet-switching 2.Best-effort service model 3.Layering 4.A single internetworking layer 5.The end-to-end principle (and fate-sharing) 4

1. What is Packet Switching? Divide messages into a sequence of packets Network deals with each packet individually –What is an alternative to this? Means that each packet must contain all relevant network information in its header –Design of protocol almost synonymous with header 5

Why Packet-Switching? Achieve higher levels of utilization –Statistical multiplexing –Why is this more important for the Internet than for the phone network? Avoid per-flow state inside the network –Plenty of routing state, but no per-flow state –Follows from notion of fate-sharing –Enables robust fail-over Why not virtual circuits? –The notion of “soft-state” is midway between DG and VC 6

7 2. What is “Best Effort”? Network makes no service guarantees –Just gives its “best effort Service can be imperfect –Packets may be lost –Packets may be corrupted –Packets may be delivered out of order –Packet may be significantly delayed source destination IP network

8 Why Best-Effort (BE)? BE means never having to say you’re sorry… –No need to reserve bandwidth and memory –No need to do error detection & correction –No need to remember from one packet to next –No need to make packets follow same path Easier to survive failures –Transient disruptions are okay during failover Simplifies interconnection between networks –Minimal service promises

But What About Applications? Some applications want more: –No losses or corruption, with packets delivered in order oThey just want the data –Minimal and predictable delays oAnd they want it now! Is Best Effort good enough for these applications? Perhaps most important question Internet got right 9

10 Use Higher Layers to Compensate No error detection or correction –Higher-level protocol can provide error checking Successive packets may not follow the same path –Not a problem as long as packets reach the destination Packets can be delivered out-of-order –Receiver can put packets back in order (if necessary) Packets may be lost or arbitrarily delayed –Sender can send the packets again (if desired) –Receiver can buffer packets for smooth playout No network congestion control (beyond “drop”) –Sender can slow down in response to loss or delay

What Can’t Higher Layers Do? Higher layers cannot make delay smaller If applications needs guarantee of low-delay, then need to ensure adequate bandwidth –Will keep queueing delay low –No way to help with speed-of-light latency What applications need guaranteed low-delay? Can the Internet support phone calls? 11

3. What is and Why Layering? Modularity partitions functionality into modules Laying is a particularly simple form of modularity Modules only deal with layers above and below –Simplifies interactions between modules –Simplifies introduction of new protocols 12

4. Why one networking layer protocol? Unifies the architecture As long as applications can run over IP-based protocols, they can run on any network As long as networks support IP, they can run any application 13

14 The Internet Hourglass Data Link Physical Applications The Hourglass Model Waist There is just one network-layer protocol, IP. The “narrow waist” facilitates interoperability. SMTPHTTPNTPDNS TCPUDP IP EthernetSONET Transport FiberCopperRadio

Alternatives to universal IP? What would happen if we had more than one network layer protocol? Are there disadvantages to having only one network layer protocol? –Some loss of flexibility, but the gain in interoperability more than makes up for this –Because IP is embedded in applications and in interdomain routing, it is very hard to change –Having IP be universal made this mistake easier to make, but it didn’t cause this problem 15

16 5. What is the End-to-End Principle? E2E Principle guides placement of functionality –If hosts can implement functionality correctly, implement it in a lower layer only as a performance enhancement –But do so only if it does not impose burden on applications that do not require that functionality Fate Sharing guides placement of state –Keep state on elements that rely on it, when possible

The Design of IP 17

18 Designing IP What does it mean to “design” a protocol? Answer: specify the syntax of its messages and their meaning (semantics). –Syntax = elements in packet header, their types & layout orepresentation –Semantics = interpretation of elements oinformation What semantics do we need in the IP header?

What Info Should Header Provide? Getting the packet there: –Where is packet going? –Which protocol will process packet on host? Network handling of packet: –How should the packet be forwarded (e.g., priority) –Where does header and packet end? Dealing with problems: –Has header been corrupted? [Why not payload?] –Has packet been fragmented? oIf so, provide information needed to reconstruct –Is packet caught in a loop? oIf so, drop packet 19

Header Info (continued) Extensibility: (how can we let IP change?) –Which IP version and options are expected? Miscellaneous: –Where did packet come from? [Why is this needed?] 20

From Semantics to Syntax The past two slides discussed the kinds of information the header must provide Will now show the syntax (layout) of the header, and discuss the semantics in more detail 21

22 5 Minute Break Questions Before We Proceed?

IP Packet Structure 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

IP Packet Structure 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

25 IP Packet Header Fields Version number (4 bits) –Indicates the version of the IP protocol –Necessary to know what other fields to expect –Typically “4” (for IPv4), and sometimes “6” (for IPv6) Header length (4 bits) –Number of 32-bit words in the header –Typically “5” (for a 20-byte IPv4 header) –Can be more when IP options are used Type-of-Service (8 bits) –Allow packets to be treated differently based on needs –E.g., low delay for audio, high bandwidth for bulk transfer

IP Packet Structure 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

27 IP Packet Header Fields (Continued) Total length (16 bits) –Number of bytes in the packet –Maximum size is 65,535 bytes ( ) –… though underlying links may impose smaller limits Fragmentation: when forwarding a packet, an Internet router can split it into multiple pieces (“fragments”) if too big for next hop link Must reassemble to recover original packet –Need fragmentation information (32 bits) –Packet identifier, flags, and fragment offset

28 Where Should Reassembly Happen? A1: router R MTU=1000B MTU=500B MTU=1000B Host A Host B R1 R2 MTU (Maximum Transfer Unit) = Maximum packet size handled by network 1000

29 Where does Reassemble Happen? A2: end-host B (receiver) 500 MTU=1000B MTU=500B MTU=1000B Host A Host B R1 R2 MTU (Maximum Transfer Unit) = Maximum packet size handled by network 1000

30 Where does Reassemble Happen? A2: correct answer –Fragments can travel across different paths! 500 MTU=1000B MTU=500B MTU=1000B Host A Host B R1 R2 MTU (Maximum Transfer Unit) = Maximum packet size handled by network 1000 R3 500

31 Fragmentation, con’t Identifier (16 bits): used to tell which fragments belong together Flags (3 bits): –Reserved (RF): unused bit –Don’t Fragment (DF): instruct routers to not fragment the packet even if it won’t fit oInstead, they drop the packet and send back a “Too Large” ICMP control message oForms the basis for “Path MTU Discovery”, covered later –More (MF): this fragment is not the last one Offset (13 bits): what part of datagram this fragment covers in 8-byte units

32 Example of Fragmentation Suppose we have a 4,000 byte datagram sent from host to host … … and it traverses a link that limits datagrams to 1,500 bytes Version 4 Header Length 5 Type of Service 0 Total Length: 4000 Identification: R/D/M 0/0/0 Fragment Offset: 0 TTL 127 Protocol 6 Checksum: Source Address: Destination Address: (3980 more bytes here)

33 Example of Fragmentation (con’t) Datagram split into 3 pieces Example:

34 Example of Fragmentation, con’t Datagram split into 3 pieces. Possible first piece: Version 4 Header Length 5 Type of Service 0 Total Length: 1500 Identification: R/D/M 0/0/1 Fragment Offset: 0 TTL 127 Protocol 6 Checksum: xxx Source Address: Destination Address:

35 Example of Fragmentation, con’t Possible second piece: Version 4 Header Length 5 Type of Service 0 Total Length: 1220 Identification: R/D/M 0/0/1 Fragment Offset: 185 (185 * 8 = 1480) TTL 127 Protocol 6 Checksum: yyy Source Address: Destination Address:

36 Example of Fragmentation, con’t Possible third piece: Version 4 Header Length 5 Type of Service 0 Total Length: 1320 Identification: R/D/M 0/0/0 Fragment Offset: 335 (335 * 8 = 2680) TTL 127 Protocol 6 Checksum: zzz Source Address: Destination Address:

37 Offsets vs Numbering Fragments? Q: why use a byte-offset for fragments rather than a numbering each fragment? Ans #1: with a byte offset, the receiver can lay down the bytes in memory when they arrive Ans #2 (more fundamental): allows further fragmentation of fragments

IP Packet Structure 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

39 Time-to-Live (TTL) Field (8 bits) Potentially lethal problem –Forwarding loops can cause packets to cycle forever –As these accumulate, eventually consume all capacity Time-to-live field in packet header –Decremented at each hop, packet discarded if reaches 0 –…and “time exceeded” message is sent to the source oUsing “ICMP” control message; basis for traceroute

40 IP Packet Header Fields (Continued) Protocol (8 bits) –Identifies the higher-level protocol oE.g., “6” for the Transmission Control Protocol (TCP) oE.g., “17” for the User Datagram Protocol (UDP) –Important for demultiplexing at receiving host oIndicates what kind of header to expect next IP header TCP headerUDP header protocol=6 protocol=17

41 IP Packet Header Fields (Continued) Checksum (16 bits) –Complement of the ones-complement sum of all 16-bit words in the IP packet header If not correct, router discards packet oSo it doesn’t act on bogus information Checksum recalculated at every router –Why? –Why include TTL? –Why only header?

IP Packet Structure 4-bit Version 4-bit Header Length 8-bit Type of Service (TOS) 16-bit Total Length (Bytes) 16-bit Identification 3-bit Flags 13-bit Fragment Offset 8-bit Time to Live (TTL) 8-bit Protocol 16-bit Header Checksum 32-bit Source IP Address 32-bit Destination IP Address Options (if any) Payload

43 IP Packet Header (Continued) Two IP addresses –Source IP address (32 bits) –Destination IP address (32 bits) Destination address –Unique identifier/locator for the receiving host –Allows each node to make forwarding decisions Source address –Unique identifier/locator for the sending host –Recipient can decide whether to accept packet –Enables recipient to send a reply back to source

IPv6

IPv4 and IPv6 Header Comparison VersionIHLType of ServiceTotal Length IdentificationFlags Fragment Offset Time to LiveProtocolHeader Checksum Source Address Destination Address OptionsPadding VersionTraffic ClassFlow Label Payload Length Next Header Hop Limit Source Address Destination Address IPv4 IPv6 Field name kept from IPv4 to IPv6 Fields not kept in IPv6 Name & position changed in IPv6 New field in IPv6

Summary of Changes Eliminated fragmentation Eliminated header length Eliminated checksum New options mechanism (next header) Expanded addresses Added Flow Label 46

IPv4 and IPv6 Header Comparison VersionIHLType of ServiceTotal Length IdentificationFlags Fragment Offset Time to LiveProtocolHeader Checksum Source Address Destination Address OptionsPadding VersionTraffic ClassFlow Label Payload Length Next Header Hop Limit Source Address Destination Address IPv4 IPv6 Field name kept from IPv4 to IPv6 Fields not kept in IPv6 Name & position changed in IPv6 New field in IPv6

48 Next Lecture IP Addressing Read K&R: If you want to check out IPv6: K&R 4.4.4