Slide 1Goal of Today’s LectureOur Story So Far (Context)The Internet HourglassOur Story So Far (Context), Con’tIP Service: Best-Effort Packet DeliveryIP Service Model: Why Best-Effort?IP Service: “Best Effort” SufficesLet’s Design IPInformation to Capture in IP HeaderSlide 11IP Packet StructureIP Packet StructureIP Packet Header FieldsIP Packet StructureIP Packet Header Fields (Continued)Where does Reassemble Happen?Where does Reassemble Happen?Where does Reassemble Happen?IP Packet StructureFragmentation (con’t)Example of FragmentationExample of Fragmentation (con’t)Example of Fragmentation (con’t)Example of Fragmentation (con’t)Example of Fragmentation (con’t)Some Fragmentation Design DecisionsIP Packet StructureTime-to-Live (TTL) Field (8 bits)IP Packet Header Fields (cont’d)IP Packet Header Fields (cont’d)One’s ComplementChecksum ExampleIP Packet StructureIP Packet Header (cont’d)Next Lecture1EE 122: Designing IPIon StoicaTAs: Junda Liu, DK Moon, David Zatshttp://inst.eecs.berkeley.edu/~ee122/(Materials with thanks to Vern Paxson, Jennifer Rexford,and colleagues at UC Berkeley)2Goal of Today’s LectureWork through process of designing IP, the Internet’s (sole) network-layer protocol3Our Story So Far (Context)The Internet uses packet-switching rather than circuit-switching in order toAchieve higher levels of utilization (we can use statistical multiplexing to more aggressively share network links)Avoid state inside the network (robust fail-over)Make interconnection between different parties easy (minimal service promises)The Internet architecture uses layering to partition functionality into modulesThe “internetworking layer” (or just network layer) forms the waist of the layering hourglass …4The Internet Hourglas sData LinkPhysicalApplicationsThe Hourglass ModelWaistThere is just one network-layer protocol, IP.The “narrow waist” facilitates interoperability.SMTP HTTP NTPDNSTCP UDPIPEthernet SONET 802.11TransportFiberCopper Radio5Our Story So Far (Context), Con’tThe End-to-End Principle guides us in where to place functionalityIf hosts can implement functionality correctly, implement it in a lower layer only as a performance enhancementBut do so only if it does not impose burden on applications that do not require that functionalityThe principle of Fate Sharing guides us to keep state with the elements that rely on it, when possible6IP Service: Best-Effort Packet DeliveryPacket switchingDivide messages into a sequence of packetsEach packet (datagram) is dealt with individually“Best-effort” deliveryPackets may be lostPackets may be corruptedPackets may be delivered out of ordersourcedestinati onIP network7IP Service Model: Why Best-Effort?IP means never having to say you’re sorry…Don’t need to reserve bandwidth and memoryDon’t need to do error detection & correctionDon’t need to remember from one packet to nextEasier to survive failuresTransient disruptions are okay during failover… but, applications do want efficient, accurate transfer of data in order, in a timely fashion8IP Service: “Best Effort” SufficesNo error detection or correctionHigher-level protocol can provide error checkingSuccessive packets may not follow the same pathNot a problem as long as packets reach the destinationPackets can be delivered out-of-orderReceiver can put packets back in order (if necessary)Packets may be lost or arbitrarily delayedSender can send the packets again (if desired)No network congestion control (beyond “drop”)Sender can slow down in response to loss or delay9Let’s Design IPWhat 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 & layoutrepresentationSemantics = interpretation of elementsinformationFor IP, what fields do we need & why?10Information to Capture in IP HeaderAddresses: datagram destination & sourceFraming: datagram lengthPriority: any special forwarding?Extensibility: what if we need to tweak/change IP?Dealing with problems:Integrity: is the header what it’s supposed to be?Loop avoidance: make sure packets don’t endlessly circulateFragmentation: what if the datagram is too large?115 Minute BreakQuestions Before We Proceed?IP Packet Structure4-bitVersion4-bitHeaderLength8-bitType of Service(TOS)16-bit Total Length (Bytes)16-bit Identification3-bitFlags13-bit Fragment Offset8-bit Time to Live (TTL)8-bit Protocol16-bit Header Checksum32-bit Source IP Address32-bit Destination IP AddressOptions (if any)PayloadIP HeaderIP Packet Structure4-bitVersion4-bitHeaderLength8-bitType of Service(TOS)16-bit Total Length (Bytes)16-bit Identification3-bitFlags13-bit Fragment Offset8-bit Time to Live (TTL)8-bit Protocol16-bit Header Checksum32-bit Source IP Address32-bit Destination IP AddressOptions (if any)Payload14IP Packet Header FieldsVersion number (4 bits)Indicates the version of the IP protocolNecessary to know what other fields to expectTypically “4” (for IPv4), and sometimes “6” (for IPv6)Header length (4 bits)Number of 32-bit words in the headerTypically “5” (for a 20-byte IPv4 header)Can be more when IP options are usedType-of-Service (8 bits)Allow packets to be treated differently based on needsE.g., low delay for audio, high bandwidth for bulk transferIP Packet Structure4-bitVersion4-bitHeaderLength8-bitType of Service(TOS)16-bit Total Length (Bytes)16-bit Identification3-bitFlags13-bit Fragment Offset8-bit Time to Live (TTL)8-bit Protocol16-bit Header Checksum32-bit Source IP Address32-bit Destination IP AddressOptions (if any)Payload16IP Packet Header Fields (Continued)Total length (16 bits)Number of bytes in the packetMaximum size is 65,535 bytes (216 -1)… though underlying links may impose smaller limitsFragmentation: when forwarding a packet, an Internet router can split it into multiple pieces (“fragments”) if too big for next hop linkFragmentation information (32 bits)Packet identifier, flags, and fragment offset17Where does Reassemble Happen?A1: router R21000500 500MTU=1000BMTU=500BMTU=1000BHost AHost BR1R2MTU (Maximum Transfer Unit) = Maximum packet size handled by network100018Where does Reassemble Happen?A2: end-host B (receiver)500
View Full Document