Internetworking the Internetworking Problem the Internetworking
Total Page:16
File Type:pdf, Size:1020Kb
The Internetworking Problem ► Two nodes communicating across a “network of networks”… How to transport packets through this heterogeneous mass ? Internetworking A B Cloud Cloud Cloud A Translation-based Solution The Internetworking Problem… ► Before Internet: different packet-switching networks (e.g., ARPANET, ARPA packet radio) … only nodes on ALG the same network could communicate ALG ALG ALG ► application-layer gateways difficult to deploy new internet-wide applications hard to diagnose and remedy end-to-end problems stateful gateways inhibited dynamic routing around failures ► no global addressability ad-hoc, application-specific solutions 1 Native Solution: Directly on IP as an Intermediary Network ► Key ideas: (FTP – File Transfer Protocol, NFS – Network File Transfer, HTTP – World Wide Web protocol) Overlay: better than any↔any translation. Fewer, simpler mappings. Application Telnet FTP NFS HTTP Network-layer: efficient implementation, global addressing Coaxial Fiber Packet Transmission Application Telnet FTP NFS HTTP Media cable optic radio Intermediate Layer (IP) ► No network level overlay: each new application has to be re-implemented for Transmission Coaxial Fiber Packet every network technology! Media cable optic radio Internet Protocol (IP) Overview ► IP runs over everything ► Networks linked together by Internetwork programs -- each host supports them ► Example Internetwork shown next: Consists of two networks – Ethernet and Token ring Host connected to Ethernet can talk to one connected to the Token 2 IP Overview… IP Host Processing ► The two hosts -- are end systems ► Host processing for TCP transfer is shown ► Router -- intermediate system next: data is sent down the protocol stack ► Application layer and transport layer (e.g., TCP, UDP) Æ End-to-end protocols each layer adds information to the data -- prepending headers and trailers ► Network layer Æ Hop-by-hop protocols used on the two end systems and every intermediate system IP Host Processing … IP Host Processing … ► Nearly identical scheme true for other protocols TCP, UDP, ICMP, and IGMP send data to IP IP adds protocol field in the IP packet to indicate what type of data is in the data segment -- ICMP = 1, IGMP =2, TCP=6, UDP = 17 ► Similarly, many different applications can be using TCP or UDP at any one time 3 IP Host Processing… IP Host Processing… ► Network interface sends/receives frames on behalf of IP, ARP, RARP -- a 16-bit frame type field in the Ethernet header is used to indicate the protocol ► Headers are removed as packet goes up ► Each protocol box uses the protocol field to demultiplex the packet among the upper layer receivers IP Host Processing… Internet Protocol: Details ► IP header not only carries Internet source and destination addresses -- specify a number of parameters that are essential for routers 4 IP Details… IP Details… ► Header has fixed fields present in every packets ► Total length: number of bytes contained and several options in the packet -- including the IP header ► Header fields are aligned at 32-bit boundary ► TTL (time-to-live): sets the upper limit on ► Version: 4 = IPv4 the number of routers through which a ► IHL: Internet header length -- in 32-bit words -- datagram can pass the length is 5 (when no options) and varies to each router decrements this by 1 as the 15 -- 40 bytes are allowed for IP options packet passes ► Type of service: defines packet’s precedence when it reaches 0, the packet is thrown away and desired type of routing and an ICMP message is sent to the source Internet Protocol Internet Protocol ► Identification, ► Routing protocols normally use the “best” route - Flags, - there are several definitions of “best” -- Fragment cheapest, fastest, most reliable offset: used by fragmentation ► Type of service specifies the requirement of the and reassembly application to the routing protocol ► Protocol: used at the destination for demultiplexing the packet 5 Internet Protocol Internet Protocol ► Precedence indicator does not affect Fragmentation and Reassembly: routing but queuing ► Internetworking programs are expected to relay several packets waiting for transmission on packets between heterogeneous networks the same channel ► Network technology implies a maximum packet highest precedence should in theory be size transmitted first ► Incoming packet fragmented: ► The “differentiated services” effort is refining this traditional interpretation of type-of-service Internet Protocol Internet Protocol ► Incoming fragment fragmented: ► Host can’t reuse an identifier if there is a risk of fragmentation and new fragments mixing with old fragments ► Wait for the expiration of the fragments -- TTL ► With a packet size of 4k, this translates to about 17Mbps transfer rate -- clearly not adequate ► Identification + source address uniquely identifies the packet fragment for the destination ► Correct way is to discovery the path MTU and use it as the max packet size -- no fragmentation ► Receiver assembles all fragments with same ID according to the “offset” 6 Internet Protocol Internet Protocol Path MTU discovery: IP Options: ► sets the DF (don’t fragment bit) in the IP header to discover if any router on the current path ► IP options field is used to carry specific needs to fragment functions ► ICMP error message is returned by a router request specific routing for some packets, asked to forward an IP with DF set when MTU is e.g., loose source routing, strict source less than datagram size routing ► this error message is used to decrease the in source routing, the send specifies the route datagram size until no error -- TCP path MTU by specifying intermediate routers discovery ► options are rarely used now. Why? Internet Protocol Internet Protocol Options and header processing: ► To speed up router processing ► IP options are used rarely because of the optimize the most commonly used case processing costs without the IP options -- the header has five ► naive implementation of IP routing will perform 32-bit words -- makes verification faster verify version field, checksum, compatibility checks, frequently used routes can be cached -- to and parse any IP options achieve Gigabit-per-second routing! look for next hop for destination address considering type of service, interface and so on. ► Packet with options create problems -- takes hundreds of instructions they are processed with low priority than “normal” packets 7 Internet Protocol Internet Protocol ► Because of the performance penalty for ► Cost at router C will be comparable, i.e., options -- alternatives are used for source processing options and unwrapping routing ► Cost at intermediate routers A to C, and C ► One technique is called “encapsulation” to B are less with the encapsulation -- ► Instead of specifying a loose source processed using the optimized methods -- routing “from A to B through C” -- no option processing encapsulate a packet “from A to B” in another packet “from A to C” Internet Control Message ICMP Details… Protocol ► IP is straightforward and simple –no ► Most ICMP packets are diagnostic info. feedback for diagnosing error conditions sent back when a router destroys a packet ► Internet Control Message Protocol (ICMP) -- e.g., destination unreachable, TTL does this feedback expired layered on top of IP -- protocol type 1 ► ICMP also defines a echo function used all routers and hosts are expected to “speak” for testing connectivity this protocol ► ICMP does not make IP datagram service reliable 8 ICMP Details… ICMP Details… ► Just provides feedback about network ► All ICMP messages problems start with a common 32-bit ICMP header ► ICMP is carried on IP datagrams -- these packets themselves could be victim of errors ► No ICMP error is triggered by an ICMP message ICMP Details… ICMP Details… ► Reporting “operational” problems such as ► Destination unreachable messages are time exceeded, destination unreachable, sent when a router cannot forward a source quench is the most common use packet ► These packets have the same format -- includes the entire header of and 8 bytes of the triggering packet ► Time exceeded message sent when a packet is destroyed because TTL expired 9 ICMP Details… ICMP Ping ► Source quench messages are sent by a ► When a router/host receives an ICMP message router that detects congestion -- source is of type echo, it responds by an “echo reply” supposed to reduce sending rate when it receives this message ► Parameter problem message is sent by a router that find an error in the encoding of ► Reply is derived from request by swapping the the IP header IP header’s source and destination address -- replacing ECHO by ECHO-REPLY and computing new checksums ICMP Traceroute ICMP Router Discovery ► Traceroute tries to discover intermediate routers ► To send a packet – a host needs nexthop ► Send packet with TTL = 1; first router Test whether packet destination in current decrements TTL to 0, destroy the packet and subnet send back a “TTL expired” ICMP message If not, forward packet to a router so that ► Source address of the ICMP identifies the first packet can reach the destination router ► With hen there are multiple routers ► Next message is sent with TTL+1 for second connected to the local network -- host router should select the one nearest to the ► Packet sent for an unused UDP port an ICMP destination port unreachable -- message is sent back 10 ICMP Router Discovery … ICMP Router Discovery … ► How to discovery local routers? ► Router advertisements contain a list of Read from a config