CS 118 Spring 2014PowerPoint PresentationVirtual circuits: signaling protocolSubnetsNAT: Network Address TranslationSlide 6Slide 7Slide 8Slide 9Chapter 4: Network LayerICMP: Internet Control Message ProtocolTraceroute and ICMPSlide 16IPv6IPv6 Header (Cont)IP datagram formatOther Changes from IPv4Transition From IPv4 To IPv6TunnelingSlide 23Slide 24Interplay between routing, forwardingGraph abstraction: consider the graph associated with the physical topologyGraph abstraction: link costsRouting Algorithm classificationSlide 29A Link-State Routing AlgorithmDijsktra’s AlgorithmDijkstra’s algorithm: exampleDijkstra’s algorithm: example (2)Dijkstra’s algorithm, discussionSlide 35Distance Vector AlgorithmBellman-Ford exampleSlide 38Distance vector algorithm (4)Distance Vector Algorithm (5)Slide 41Slide 42Distance Vector: link cost changesSlide 44Transport Layer 3-1CS 118 Spring 2014Chpt 4 - Section 4BNetwork Layer 4-21230111value in arrivingpacket’s headerrouting algorithmlocal forwarding tableheader valueoutput link01000101011110013221Routing precedes forwardingNetwork Layer 4-3Virtual circuits: signaling protocolused to setup, maintain teardown VCapplicationtransportnetworkdata linkphysicalapplicationtransportnetworkdata linkphysical1. Initiate call2. incoming call3. Accept call4. Call connected5. Data flow begins6. Receive dataNetwork Layer 4-4SubnetsHow many?223.1.1.1223.1.1.3223.1.1.4223.1.2.2223.1.2.1223.1.2.6223.1.3.2223.1.3.1223.1.3.27223.1.1.2223.1.7.0223.1.7.1223.1.8.0223.1.8.1223.1.9.1223.1.9.2Network Layer 4-5NAT: Network Address Translation10.0.0.110.0.0.210.0.0.310.0.0.4138.76.29.7local network(e.g., home network)10.0.0/24rest ofInternetDatagrams with source or destination in this networkhave 10.0.0/24 address for source, destination (as usual)All datagrams leaving localnetwork have same single source NAT IP address: 138.76.29.7,different source port numbersNetwork Layer 4-6NAT: Network Address TranslationMotivation: local network uses just one IP address as far as outside world is concerned:range of addresses not needed from ISP: just one IP address for all devicescan change addresses of devices in local network without notifying outside worldcan change ISP without changing addresses of devices in local networkdevices inside local net not explicitly addressable, visible by outside world (a security plus).Network Layer 4-7NAT: Network Address TranslationImplementation: NAT router must:outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #). . . remote clients/servers will respond using (NAT IP address, new port #) as destination addr.remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pairincoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT tableNetwork Layer 4-8NAT: Network Address Translation10.0.0.110.0.0.210.0.0.3S: 10.0.0.1, 3345D: 128.119.40.186, 80110.0.0.4138.76.29.71: host 10.0.0.1 sends datagram to 128.119.40.186, 80NAT translation tableWAN side addr LAN side addr138.76.29.7, 5001 10.0.0.1, 3345…… ……S: 128.119.40.186, 80 D: 10.0.0.1, 33454S: 138.76.29.7, 5001D: 128.119.40.186, 8022: NAT routerchanges datagramsource addr from10.0.0.1, 3345 to138.76.29.7, 5001,updates tableS: 128.119.40.186, 80 D: 138.76.29.7, 500133: Reply arrives dest. address: 138.76.29.7, 50014: NAT routerchanges datagramdest addr from138.76.29.7, 5001 to 10.0.0.1, 3345Network Layer 4-9NAT: Network Address Translation16-bit port-number field: 60,000 simultaneous connections with a single LAN-side address!NAT is controversial:routers should only process up to layer 3violates end-to-end argument•NAT possibility must be taken into account by app designers, eg, P2P applicationsaddress shortage should instead be solved by IPv6Network Layer 4-13Chapter 4: Network Layer4. 1 Introduction4.2 Virtual circuit and datagram networks4.3 What’s inside a router4.4 IP: Internet ProtocolDatagram formatIPv4 addressingICMPIPv64.5 Routing algorithmsLink stateDistance VectorHierarchical routing4.6 Routing in the InternetRIPOSPFBGP4.7 Broadcast and multicast routingNetwork Layer 4-14ICMP: Internet Control Message Protocolused by hosts & routers to communicate network-level informationerror reporting: unreachable host, network, port, protocolecho request/reply (used by ping)network-layer “above” IP:ICMP msgs carried in IP datagramsICMP message: type, code plus first 8 bytes of IP datagram causing errorType Code description0 0 echo reply (ping)3 0 dest. network unreachable3 1 dest host unreachable3 2 dest protocol unreachable3 3 dest port unreachable3 6 dest network unknown3 7 dest host unknown4 0 source quench (congestion control - not used)8 0 echo request (ping)9 0 route advertisement10 0 router discovery11 0 TTL expired12 0 bad IP headerNetwork Layer 4-15Traceroute and ICMPSource sends series of UDP segments to destFirst has TTL =1Second has TTL=2, etc.Unlikely port numberWhen nth datagram arrives to nth router:Router discards datagramAnd sends to source an ICMP message (type 11, code 0)Message includes name of router& IP addressWhen ICMP message arrives, source calculates RTTTraceroute does this 3 timesStopping criterionUDP segment eventually arrives at destination hostDestination returns ICMP “host unreachable” packet (type 3, code 3)When source gets this ICMP, stops.Network Layer 4-16Chapter 4: Network Layer4. 1 Introduction4.2 Virtual circuit and datagram networks4.3 What’s inside a router4.4 IP: Internet ProtocolDatagram formatIPv4 addressingICMPIPv64.5 Routing algorithmsLink stateDistance VectorHierarchical routing4.6 Routing in the InternetRIPOSPFBGP4.7 Broadcast and multicast routingNetwork Layer 4-17IPv6Initial motivation: 32-bit address space soon to be completely allocated. This is no longer the driver:NATs allow to use a single address for entire CompanyAlso, Classless Addresses allow hierarchical address set
View Full Document