NL: Router


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Dotted decimal notation:
  • NL: Router

    1. 1. Network Layer <ul><li>Goals: </li></ul><ul><li>understand principles behind network layer services: </li></ul><ul><ul><li>routing (path selection) </li></ul></ul><ul><ul><li>dealing with scale </li></ul></ul><ul><ul><li>how a router works </li></ul></ul><ul><ul><li>advanced topics: IPv6, mobility </li></ul></ul><ul><li>instantiation and implementation in the Internet </li></ul>Network Layer 4-
    2. 2. Topics: <ul><li>Datagram vs Virtual Circuit </li></ul><ul><li>Router </li></ul><ul><li>IP: Internet Protocol </li></ul><ul><ul><li>Datagram format, IPv4 addressing </li></ul></ul><ul><ul><li>ICMP </li></ul></ul><ul><ul><li>IPv6 </li></ul></ul><ul><li>4.5 Routing algorithms </li></ul><ul><ul><li>Link state </li></ul></ul><ul><ul><li>Distance Vector </li></ul></ul><ul><ul><li>Hierarchical routing </li></ul></ul><ul><li>4.6 Routing in the Internet </li></ul><ul><ul><li>RIP, OSPF, BGP </li></ul></ul>Network Layer 4-
    3. 3. Network layer <ul><li>transport segment from sending to receiving host </li></ul><ul><li>on sending side encapsulates segments into datagrams </li></ul><ul><li>on rcving side, delivers segments to transport layer </li></ul><ul><li>network layer protocols in every host, router </li></ul><ul><li>Router examines header fields in all IP datagrams passing through it </li></ul>Network Layer 4- network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical application transport network data link physical
    4. 4. Key Network-Layer Functions <ul><li>forwarding: move packets from router’s input to appropriate router output </li></ul><ul><li>routing: determine route taken by packets from source to dest. </li></ul><ul><ul><li>Routing algorithms </li></ul></ul>Network Layer 4- <ul><li>analogy: </li></ul><ul><li>routing: process of planning trip from source to dest </li></ul><ul><li>forwarding: process of getting through single interchange </li></ul>
    5. 5. Network Layer 4- Interplay between routing and forwarding 1 2 3 0111 value in arriving packet’s header routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1
    6. 6. Connection setup <ul><li>3 rd important function in some network arch.: </li></ul><ul><li>Virtual circuits network provides network-layer conn service </li></ul><ul><ul><li>used in ATM, frame-relay, X.25 </li></ul></ul><ul><ul><li>Signaling protocols used to setup, maintain teardown VC </li></ul></ul>Network Layer 4- 1. Initiate call 2. incoming call 3. Accept call 4. Call connected 5. Data flow begins 6. Receive data application transport network data link physical application transport network data link physical
    7. 7. VC implementation <ul><li>A VC consists of: </li></ul><ul><ul><li>Path from source to destination </li></ul></ul><ul><ul><li>VC numbers, one number for each link along path </li></ul></ul><ul><ul><li>Entries in forwarding tables in routers along path </li></ul></ul><ul><li>Packet belonging to VC carries a VC number. </li></ul><ul><li>VC number must be changed on each link. </li></ul><ul><ul><li>New VC number comes from forwarding table </li></ul></ul>Network Layer 4-
    8. 8. Forwarding table in VC Network Layer 4- Forwarding table in northwest router: Routers maintain connection state information! Forwarding table is modified whenever there’s conn setup or teardown (happen at a microsecond timescale in a tier-1 router) 12 22 32 1 2 3 VC number interface number Incoming interface Incoming VC # Outgoing interface Outgoing VC # 1 12 3 22 2 63 1 18 3 7 2 17 1 97 3 87 … … … …
    9. 9. Network service model <ul><li>Example services for individual datagrams: </li></ul><ul><li>guaranteed delivery </li></ul><ul><li>Guaranteed delivery with less than certain delay (e.g. 40 msec)? </li></ul><ul><li>Example services for a flow of datagrams: </li></ul><ul><li>In-order datagram delivery </li></ul><ul><li>Guaranteed minimum bandwidth to flow </li></ul><ul><li>Restrictions on changes in inter-packet spacing </li></ul>Network Layer 4- Q: What service model for “channel” transporting datagrams from sender to rcvr? a service model defines the characteristics of end-to-end transport of packets between
    10. 10. Case study: ATM ABR congestion control <ul><li>two-byte ER (Explicit Rate) field in RM cell </li></ul><ul><ul><li>congested switch may lower ER value in cell </li></ul></ul><ul><ul><li>sender’ send rate thus minimum supportable rate on path across all switches </li></ul></ul><ul><li>EFCI (Explicit Forward Congestion Indication) bit in data cells: set to 1 in congested switch to indicate congestion to destination host. </li></ul><ul><ul><li>when RM arrives at destination, if most recently received data cell has EFCI=1, sender sets CI bit in returned RM cell </li></ul></ul>Network Layer 4-
    11. 11. Network layer service models: Network Layer 4- Network Architecture Internet ATM ATM ATM ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed rate guaranteed minimum none Loss no yes yes no no Order no yes yes yes yes Timing no yes yes no no Congestion feedback no (inferred via loss) no congestion no congestion yes no Guarantees ? CBR: constant bit rate VBR: variable bit rate ABR: available bit rate UBR: unspecified bit rate
    12. 12. Datagram or VC network: why? <ul><li>Internet </li></ul><ul><li>data exchange among computers </li></ul><ul><ul><li>“ elastic” service, no strict timing req. </li></ul></ul><ul><li>“ smart” end systems </li></ul><ul><ul><li>can adapt, perform control, error recovery </li></ul></ul><ul><ul><li>simple inside network, complexity at “edge” </li></ul></ul><ul><ul><li>Additional func built in higher levels </li></ul></ul><ul><li>many link types </li></ul><ul><ul><li>different characteristics </li></ul></ul><ul><ul><li>uniform service difficult </li></ul></ul><ul><li>VC network (e.g. ATM) </li></ul><ul><li>evolved from telephony </li></ul><ul><li>human conversation: </li></ul><ul><ul><li>strict timing, reliability requirements </li></ul></ul><ul><ul><li>need for guaranteed service </li></ul></ul><ul><li>“ dumb” end systems </li></ul><ul><ul><li>telephones </li></ul></ul><ul><ul><li>complexity inside network (e.g. network-assisted congestion control) </li></ul></ul>Network Layer 4-
    13. 13. Topics: <ul><li>Router </li></ul><ul><li>IP: Internet Protocol </li></ul><ul><ul><li>Datagram format, IPv4 addressing </li></ul></ul><ul><ul><li>ICMP </li></ul></ul><ul><ul><li>IPv6 </li></ul></ul><ul><li>4.5 Routing algorithms </li></ul><ul><ul><li>Link state </li></ul></ul><ul><ul><li>Distance Vector </li></ul></ul><ul><ul><li>Hierarchical routing </li></ul></ul><ul><li>4.6 Routing in the Internet </li></ul><ul><ul><li>RIP, OSPF, BGP </li></ul></ul>Network Layer 4-
    14. 14. Router Architecture Overview <ul><li>Two key router functions: </li></ul><ul><li>run routing algorithms/protocol (RIP, OSPF, BGP) </li></ul><ul><li>forwarding datagrams from incoming to outgoing link </li></ul><ul><li>E.g. Cisco 12K, Juniper M16, Foundry SuperX </li></ul>Network Layer 4-
    15. 15. Input Port Functions <ul><li>Decentralized switching : </li></ul><ul><li>given datagram dest., lookup output port using forwarding table in input port memory </li></ul><ul><li>goal: complete input port processing at ‘line speed’ </li></ul><ul><li>queuing: if datagrams arrive faster than forwarding rate into switch fabric </li></ul>Network Layer 4- Physical layer: bit-level reception Data link layer: e.g., Ethernet see chapter 5
    16. 16. Three types of switching fabrics Network Layer 4-
    17. 17. Switching Via Memory <ul><li>First generation routers: </li></ul><ul><li>traditional computers with switching under direct control of CPU </li></ul><ul><li>packet copied to system’s memory </li></ul><ul><li>speed limited by memory bandwidth (2 bus crossings per datagram) </li></ul>Network Layer 4- Recent development: Processors in input line cards perform lookup and storing packets into memory:  shared mem multiprocessors E.g. Cisco’s Catalyst 8500 Input Port Output Port Memory System Bus
    18. 18. Switching Via a Bus <ul><li>datagram from input port memory </li></ul><ul><li>to output port memory via a shared bus </li></ul><ul><li>bus contention: switching speed limited by bus bandwidth </li></ul><ul><li>1 Gbps bus, Cisco 1900 : sufficient speed for access and enterprise routers (not regional or backbone) </li></ul><ul><li>E.g. 1Gbps bw supports up to 10 T3 (45- Mbps) links </li></ul>Network Layer 4-
    19. 19. Switching Via An Interconnection Network <ul><li>overcome bus bandwidth limitations </li></ul><ul><li>A crossbar switch is an interconnection network consisting of 2 n buses that connect n input to n output ports. </li></ul><ul><li>Advanced design: fragmenting datagram into fixed length cells at the input port, switch cells through the fabric and assemble at output ports. </li></ul><ul><li>Cisco 12000 : switches 60 Gbps through the interconnection network </li></ul>Network Layer 4- Omega
    20. 20. Output Ports <ul><li>Buffering required when datagrams arrive from fabric faster than the transmission rate </li></ul><ul><ul><li>Queueing and Buffer management </li></ul></ul><ul><li>Scheduling discipline chooses among queued datagrams for transmission </li></ul>Network Layer 4-
    21. 21. Output port queueing <ul><li>buffering when arrival rate via switch exceeds output line speed (switching fabric speed: rate of moving pkt from in-ports to out-ports) </li></ul><ul><li>queueing (delay) and loss due to output port buffer overflow! </li></ul><ul><ul><li>Buffer size = RTT times Link Capacity </li></ul></ul><ul><li>A packet scheduler at output port must choose among queued to transmit using FIFO or more sophisticated such as weighted fair queuing (WFQ) that shares the outgoing link fairly among different end-to-end connections. </li></ul>Network Layer 4-
    22. 22. Input Port Queuing <ul><li>If fabric slower than input ports combined then queueing may occur at input queues. It can be eliminated if the switching fabric speed is at least n times as fast as the input line speed, where n is the number of input ports </li></ul><ul><li>Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward. Only occurs at input ports. As soon as the packet arrival rate on the input lines reaches 58% of their capacity, the input queue will grow to unbounded length, due to HOL blocking </li></ul><ul><li>queueing delay and loss due to input buffer overflow! </li></ul>Network Layer 4-
    23. 23. Active Queue Management <ul><li>Drop-Tail policy </li></ul><ul><ul><li>Drop arrival packets due to overflow </li></ul></ul><ul><li>Random Early Detection (RED) </li></ul><ul><ul><li>Maintain a weighted average for the length of the output queue </li></ul></ul><ul><ul><li>If queue length < Threshold_min, admit it </li></ul></ul><ul><ul><li>If queue length > Threshold_max, drop it </li></ul></ul><ul><ul><li>Otherwise, drop it with a probability (a function of the average queue length) </li></ul></ul><ul><li>RED drops packets before the buffer is full in order to provide congestion signals to senders </li></ul>Network Layer 4-
    24. 24. Router Processor <ul><li>Execute routing protocols </li></ul><ul><li>Maintain the routing information and forwarding tables </li></ul><ul><li>Perform network management functions </li></ul>Network Layer 4- CISCO 12000 Gigabit Router Processor (GRP)
    25. 25. Forwarding table Network Layer 4- Destination Address Range Link Interface 11001000 00010111 00010000 00000000 through 0 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111 otherwise 3 <ul><li>packets forwarded using destination host address </li></ul><ul><li>The tables are modified by routing alg anytime (every 1~5 minutes) </li></ul><ul><ul><ul><li>packets between same source-dest pair may take diff paths </li></ul></ul></ul>
    26. 26. Longest prefix matching Network Layer 4- DA: 11001000 00010111 00011000 10101010 Examples DA: 11001000 00010111 00010110 10100001 Which interface? Prefix Match Link Interface 11001000 00010111 00010 0 11001000 00010111 00011000 1 11001000 00010111 00011 2 otherwise 3 Forwarding table with 4 entries and using longest prefix match:
    27. 27. Lookup in an IP Router <ul><li>Unicast destination address based lookup </li></ul>Network Layer 4- Need to be as fast as line speed!! e.g OC48 link runs at 2.5Gbps, packet=256bytes  1 million lookups/s Low storage : ~100K entries Fast updates: few thousands per second, but ideally at lookup speed Dstn Addr Next Hop ---- ---- ---- ---- ---- ---- Dstn-prefix Next Hop Forwarding Table Next Hop Computation Forwarding Engine Incoming Packet HEADER
    28. 28. Route Lookup Using CAM Network Layer 4- To find the longest prefix cheaply, need to keep entries sorted in order of decreasing prefix lengths K. pagiamtzis, Intro to CAM <ul><li>Content-Address Memory: Fully associative mem: Cisco 8500 </li></ul><ul><li>Exact match (fixed-length) search op in a single clock cycle </li></ul>Priority Encoder Location 0 1 2 3 4 5 6 P1 P1 103.23.122/23 P2 P3 P4 P5 103.23/16 101.1/16 101.20/13 100/9 320.3.3.1 Prefix Next-hop 1 1 0 0 0 0 0
    29. 29. Topics: <ul><li>Router </li></ul><ul><li>IP: Internet Protocol </li></ul><ul><ul><li>Datagram format, IPv4 addressing </li></ul></ul><ul><ul><li>ICMP </li></ul></ul><ul><ul><li>IPv6 </li></ul></ul><ul><li>4.5 Routing algorithms </li></ul><ul><ul><li>Link state </li></ul></ul><ul><ul><li>Distance Vector </li></ul></ul><ul><ul><li>Hierarchical routing </li></ul></ul><ul><li>4.6 Routing in the Internet </li></ul><ul><ul><li>RIP, OSPF, BGP </li></ul></ul>Network Layer 4-
    30. 30. The Internet Network layer <ul><li>Host, router network layer functions: </li></ul>Network Layer 4- Transport layer: TCP, UDP Link layer physical layer Network layer forwarding table <ul><li>Routing protocols </li></ul><ul><li>path selection </li></ul><ul><li>RIP, OSPF, BGP </li></ul><ul><li>IP protocol </li></ul><ul><li>addressing conventions </li></ul><ul><li>datagram format </li></ul><ul><li>packet handling conventions </li></ul><ul><li>ICMP protocol </li></ul><ul><li>error reporting </li></ul><ul><li>router “signaling” </li></ul>
    31. 31. IP datagram format Network Layer 4- <ul><li>how much overhead with TCP? </li></ul><ul><li>20 bytes of TCP </li></ul><ul><li>20 bytes of IP </li></ul><ul><li>= 40 bytes + app layer overhead </li></ul>ver Datagram length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Header checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length, bytes) upper layer protocol to deliver payload to 6 for tcp, 17 for udp head. len type of service “ type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit.
    32. 32. IP Fragmentation & Reassembly <ul><li>network links have MTU (max.transfer size) - largest possible link-level frame. </li></ul><ul><ul><li>different link types, different MTUs </li></ul></ul><ul><li>large IP datagram divided (“fragmented”) within net </li></ul><ul><ul><li>one datagram becomes several datagrams </li></ul></ul><ul><ul><li>“ reassembled” only at final destination </li></ul></ul><ul><ul><li>IP header bits used to identify, order related fragments </li></ul></ul>Network Layer 4- fragmentation: in: one large datagram out: 3 smaller datagrams reassembly
    33. 33. IP Fragmentation and Reassembly Network Layer 4- <ul><li>Example </li></ul><ul><li>4000 byte IP datagram </li></ul><ul><li>MTU = 1500 bytes </li></ul><ul><li>(4000-20 bytes header)=3980 bytes of data to be fragmented </li></ul><ul><li>3 fragments (1480+1480+1020=3980) </li></ul><ul><li>amount of data in all but last fragment must be multiples of 8 </li></ul>1480 bytes in data field offset = 1480/8 ID =x offset =0 fragflag =0 length =4000 ID =x offset =0 fragflag =1 length =1500 ID =x offset =185 fragflag =1 length =1500 ID =x offset =370 fragflag =0 length =1040 One large datagram becomes several smaller datagrams
    34. 34. IP Addressing: introduction <ul><li>IP address: 32-bit identifier for host, router interface , in dotted-decimal notation </li></ul><ul><li>interface: connection between host/router and physical link </li></ul><ul><ul><li>router’s typically have multiple interfaces </li></ul></ul><ul><ul><li>host typically has one interface </li></ul></ul><ul><ul><li>IP addresses associated with each interface </li></ul></ul>Network Layer 4- = 11011111 00000001 00000001 00000001 223 1 1 1
    35. 35. Subnets (aka IP networks) <ul><li>IP address: </li></ul><ul><ul><li>subnet part (high order bits) </li></ul></ul><ul><ul><li>host part (low order bits) </li></ul></ul><ul><li>What’s a subnet ? </li></ul><ul><ul><li>device interfaces with same subnet part of IP address </li></ul></ul><ul><ul><li>can physically reach each other without intervening router </li></ul></ul>Network Layer 4- network consisting of 3 subnets subnet To determine the subnets, detach each interface from its host or router, creating islands of isolated networks. Each isolated network is called a subnet .
    36. 36. Subnets <ul><li>How many? </li></ul>Network Layer 4-
    37. 37. IP addressing: CIDR <ul><li>CIDR: C lassless I nter D omain R outing </li></ul><ul><ul><li>subnet portion of address of arbitrary length </li></ul></ul><ul><ul><li>address format: a.b.c.d/x , where x is # bits in subnet portion of address. </li></ul></ul><ul><ul><li>Notation /x is subnet mask. The high order x bits are the network prefix. </li></ul></ul><ul><li>Before CIDR, classful addressing: A (/8), B(/16), C(/24). Replaced by CIDRized address. </li></ul>Network Layer 4- 11001000 00010111 0001000 0 00000000 subnet part host part
    38. 38. IP addresses: how to get one? <ul><li>Q: How does host get IP address? </li></ul><ul><li>hard-coded by system admin in a file </li></ul><ul><ul><li>Wintel: control-panel->network->configuration->tcp/ip->properties </li></ul></ul><ul><ul><li>UNIX: /etc/rc.config </li></ul></ul><ul><li>DHCP: D ynamic H ost C onfiguration P rotocol: dynamically get address from as server </li></ul><ul><ul><li>“ plug-and-play” </li></ul></ul>Network Layer 4-
    39. 39. DHCP (Dynamic Host Configuration Protocol) 5: DataLink Layer 5- The DHCP relay agent (implemented in the IP router) records the subnet from which the message was received in the DHCP message header for use by the DHCP server.
    40. 40. IP addresses: how to get one? <ul><li>Q: How does network get subnet part of IP addr? </li></ul><ul><li>A: gets allocated portion of its provider ISP’s address space </li></ul>Network Layer 4- ISP's block 11001000 00010111 0001 0000 00000000 Organization 0 11001000 00010111 0001000 0 00000000 Organization 1 11001000 00010111 0001001 0 00000000 Organization 2 11001000 00010111 0001010 0 00000000 ... ….. …. …. Organization 7 11001000 00010111 0001111 0 00000000
    41. 41. Hierarchical addressing: route aggregation Network Layer 4- “ Send me anything with addresses beginning” Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “ Send me anything with addresses beginning” Organization 2 Hierarchical addressing allows efficient advertisement of routing information. Two example businesses . . . . . .
    42. 42. Hierarchical addressing: more specific routes Network Layer 4- Assume ISPs-R-Us has been acquired by FBN-ISP and Org1 be transferred to ISPs-R-Us: “ Send me anything with addresses beginning” Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “ Send me anything with addresses beginning or ” Organization 2 . . . . . .
    43. 43. IP addressing: the last word... <ul><li>Q: How does an ISP get a block of addresses? </li></ul><ul><li>A: ICANN : I nternet C orporation for A ssigned </li></ul><ul><li>N ames and N umbers: </li></ul><ul><ul><li>allocates address space </li></ul></ul><ul><ul><li>Top-level domain name system management </li></ul></ul><ul><ul><li>manages DNS root servers </li></ul></ul><ul><ul><li>Protocol identifier assignment </li></ul></ul><ul><ul><li>assigns domain names, resolves disputes </li></ul></ul>Network Layer 4-
    44. 44. NAT: Network Address Translation Network Layer 4- local network (e.g., home network) 10.0.0/24 rest of Internet Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) All datagrams leaving local network have same single source NAT IP address:, different source port numbers
    45. 45. NAT: Network Address Translation <ul><li>Motivation: local network uses just one IP address as far as outside world is concerned: </li></ul><ul><ul><li>no need to be allocated range of addresses from ISP: - just one IP address is used for all devices </li></ul></ul><ul><ul><li>can change addresses of devices in local network without notifying outside world </li></ul></ul><ul><ul><li>can change ISP without changing addresses of devices in local network </li></ul></ul><ul><ul><li>devices inside local net not explicitly addressable, visible by outside world (a security plus). </li></ul></ul>Network Layer 4-
    46. 46. NAT: Network Address Translation <ul><li>Implementation: NAT router must: </li></ul><ul><ul><li>outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #) </li></ul></ul><ul><ul><ul><li>. . . remote clients/servers will respond using (NAT IP address, new port #) as destination addr. </li></ul></ul></ul><ul><ul><li>remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair </li></ul></ul><ul><ul><li>incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table </li></ul></ul>Network Layer 4-
    47. 47. NAT: Network Address Translation Network Layer 4- NAT translation table WAN side addr LAN side addr, 5001, 3345 …… …… 3: Reply arrives dest. address:, 5001 4: NAT router changes datagram dest addr from, 5001 to, 3345 S:, 3345 D:, 80 1 1: host sends datagram to, 80 S:, 80 D:, 3345 4 S:, 5001 D:, 80 2 2: NAT router changes datagram source addr from, 3345 to, 5001, updates table S:, 80 D:, 5001 3
    48. 48. NAT: Network Address Translation <ul><li>16-bit port-number field: </li></ul><ul><ul><li>60,000 simultaneous connections with a single LAN-side address! </li></ul></ul><ul><li>NAT is controversial: </li></ul><ul><ul><li>routers should only process up to layer 3 but NAT router need to change the transport port. </li></ul></ul><ul><ul><li>violates end-to-end argument </li></ul></ul><ul><ul><ul><li>NAT possibility must be taken into account by app designers, eg, P2P applications </li></ul></ul></ul><ul><ul><li>address shortage should instead be solved by IPv6 </li></ul></ul>Network Layer 4-
    49. 49. Skype through NAT <ul><li>NAT prevents a connection from being initiated from outside. </li></ul><ul><li>How can Alice call Bob, both residing behind NAT ( NAT traversal ) ?? </li></ul><ul><ul><li>Alice sign-in with its super-peer (Sa) </li></ul></ul><ul><ul><li>Bob sign-in with its super-peer (Sb) </li></ul></ul><ul><ul><li>Alice calls Bob: Alice  Sa  Sb  Bob </li></ul></ul><ul><ul><li>If Bob takes the call, Sa and Sb select a non-NAT super-peer for voice relay </li></ul></ul><ul><ul><li>See chapter 2 (4 th ed) for details </li></ul></ul>Network Layer 4-
    50. 50. Recap: Internet Network layer <ul><li>Host, router network layer functions: </li></ul>Network Layer 4- Transport layer: TCP, UDP Link layer physical layer Network layer forwarding table <ul><li>Routing protocols </li></ul><ul><li>path selection </li></ul><ul><li>RIP, OSPF, BGP </li></ul><ul><li>IP protocol </li></ul><ul><li>addressing conventions </li></ul><ul><li>datagram format </li></ul><ul><li>packet handling conventions </li></ul><ul><li>ICMP protocol </li></ul><ul><li>error reporting </li></ul><ul><li>router “signaling” </li></ul>
    51. 51. ICMP: Internet Control Message Protocol <ul><li>used by hosts & routers to communicate network-level information </li></ul><ul><ul><li>error reporting: unreachable host, network, port, protocol </li></ul></ul><ul><ul><li>echo request/reply (used by ping) </li></ul></ul><ul><li>network-layer “above” IP: </li></ul><ul><ul><li>ICMP msgs carried in IP datagrams </li></ul></ul><ul><li>ICMP message: type, code, different fields depending on the type/code. If it’s a reply type then it would have IP Header and first 8 bytes of IP datagram data. </li></ul>Network Layer 4- Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header
    52. 52. Recap: “Real” Internet delays and routes <ul><li>What do “real” Internet delay & loss look like? </li></ul><ul><li>Traceroute program (in Unix) or Tracert (MS-DOS): provides delay measurement from source to router along end-end Internet path towards destination. For all i: </li></ul><ul><ul><li>sends three packets that will reach router i on path towards destination </li></ul></ul><ul><ul><li>router i will return packets to sender </li></ul></ul><ul><ul><li>sender times interval between transmission and reply. </li></ul></ul>Taxonomy 1- 3 probes 3 probes 3 probes
    53. 53. Traceroute and ICMP <ul><li>Source sends series of UDP segments to dest </li></ul><ul><ul><li>First has TTL =1 </li></ul></ul><ul><ul><li>Second has TTL=2, etc. </li></ul></ul><ul><ul><li>Unlikely port number (depends on implementation) </li></ul></ul><ul><li>When nth datagram arrives to nth router: </li></ul><ul><ul><li>Router discards datagram </li></ul></ul><ul><ul><li>And sends to source an ICMP message (type 11, code 0 which means TTL expired) </li></ul></ul><ul><ul><li>Message includes name of router& IP address </li></ul></ul><ul><li>When ICMP message arrives, source calculates RTT </li></ul><ul><li>Traceroute does this 3 times </li></ul><ul><li>Stopping criterion </li></ul><ul><li>UDP segment eventually arrives at destination host </li></ul><ul><li>Destination returns ICMP “host unreachable” packet (type 3, code 3) if port is sent. When source gets this ICMP, stops. </li></ul><ul><li>Other Tracert implementation stops when ping reply is received from destination. </li></ul>Network Layer 4-
    54. 54. IPv6 <ul><li>Initial motivation: 32-bit address space soon to be completely allocated. </li></ul><ul><ul><li>Expanded addressing capabilities: 128 bit </li></ul></ul><ul><li>Additional motivation: </li></ul><ul><ul><li>header format helps speed processing/forwarding </li></ul></ul><ul><ul><ul><li>fixed-length 40 byte header </li></ul></ul></ul><ul><ul><ul><li>no fragmentation allowed </li></ul></ul></ul><ul><ul><li>header changes to facilitate QoS </li></ul></ul><ul><ul><ul><li>Flow label and priority </li></ul></ul></ul>Network Layer 4- These are also three most important changes
    55. 55. IPv6 Header (Cont) Network Layer 4- Priority (8-bits): identify priority among datagrams in flow Flow Label (20-bits): identify datagrams in same “flow.” (concept of“flow” not well defined). Next header (8-bits): identify upper layer protocol for data (similar to Upper-layer protocol in IPv4) Traffic Class is similar to Type Of Service in IPv4 Similar to TTL in IPv4 (8-bits)
    56. 56. Other Changes from IPv4 <ul><li>Checksum : removed entirely to reduce processing time at each hop </li></ul><ul><li>Options: allowed, but outside of header, indicated by “Next Header” field </li></ul><ul><li>ICMPv6: new version of ICMP </li></ul><ul><ul><li>additional message types, e.g. “Packet Too Big” </li></ul></ul><ul><ul><li>multicast group management functions </li></ul></ul>Network Layer 4-
    57. 57. Transition From IPv4 To IPv6 <ul><li>Not all routers can be upgraded simultaneous </li></ul><ul><ul><li>no “flag days” </li></ul></ul><ul><ul><li>How will the network operate with mixed IPv4 and IPv6 routers? </li></ul></ul><ul><li>Two proposed solutions: </li></ul><ul><ul><li>Dual-stack approach: IPv6 to IPv4 and vice versa translation of datagrams at routers that can understand IPv6 and IPv4. Some fields data will be lost. </li></ul></ul><ul><ul><li>Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers </li></ul></ul>Network Layer 4-
    58. 58. Tunneling Network Layer 4- IPv6 IPv6 IPv6 IPv6 tunnel Logical view: Physical view: IPv6 IPv6 IPv6 IPv6 IPv4 IPv4 A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 D-to-E: IPv6 inside IPv4 A B E F A B E F C D Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data Src:B Dest: E
    59. 59. Summary <ul><li>Network Layer Services: </li></ul><ul><ul><li>forwarding, routing and connection setup in some networks </li></ul></ul><ul><li>Best effort network Service Models </li></ul><ul><li>Router Architecture Overview </li></ul><ul><ul><li>Input/Output ports and queuing </li></ul></ul><ul><ul><li>Switching via Memory/Bus/Interconnected network </li></ul></ul><ul><li>Network Layer Functions: </li></ul><ul><ul><li>forwarding via routing protocols, routing via IP error reporting via ICMP </li></ul></ul><ul><li>IP Datagram Format </li></ul><ul><li>IP Fragmentation and Reassembly </li></ul><ul><li>IP Addressing: subnets, CIDR, assignments, Hierarchical addressing </li></ul><ul><li>Network Address Translation (NAT) </li></ul><ul><li>Internet Control Message Protocol (ICMP) usage </li></ul><ul><li>IPv6 motivation, datagram format and transition to IPv4 through Tunneling </li></ul>Network Layer 4-