1 / 34

CSE 30264 Computer Networks

CSE 30264 Computer Networks. Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 11 – February 16, 2010. Today’s Lecture. Internetworking Local Network NAT ICMP Routing Routing in the WAN. Application. Transport. Network. Data.

nerina
Download Presentation

CSE 30264 Computer Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE 30264Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 11 – February 16, 2010

  2. Today’s Lecture • Internetworking • Local Network • NAT • ICMP • Routing • Routing in the WAN Application Transport Network Data Physical CSE 30264

  3. Internetworking Outline Local Network Routing CSE30264

  4. Routing Table – netscale01 Local or next hop? Mask result Interface to pass to CSE 30264

  5. Datagram Forwarding • Strategy • Always have dest address • In IP header • Two choices • Local network (subnet) • Pass it off directly • Not on my local network • Pass to some router • Routing table • Maps network to next hop • Routing entries • Default router How do I find that next hop? Have IP, need Ethernet CSE30264

  6. Address Translation • Layer 3 -> Layer 2 Translation • IP -> Ethernet • Destination host • Next hop router • Techniques • Do nothing • Make Layer 2 part of Layer 3 address • Table • Convert Layer 3 to Layer 2 • ARP – Address Resolution Protocol • Broadcast, observe, refresh CSE30264

  7. Example – ARP Table CSE 30264

  8. ARP Key Concepts • Broadcast request • Send to FF:FF:FF:FF:FF:FF • Who is 129.74.50.20? • Says AA:BB:CC:DD:EE:FF of 129.74.153.157 • Response • Respond directly or broadcast • I am 01:34:57:AB:CD:EF, aka 129.74.50.20 • Interesting concepts • Broadcast locally only – not beyond the router • Soft state • Old entries periodically expire • Nosy neighbor • Note ARP requests of others CSE 30264

  9. ARP Details • Request Format • HardwareType: type of physical network (e.g., Ethernet) • ProtocolType: type of higher layer protocol (e.g., IP) • HLEN: Length of physical (hardware) address • PLEN: Length of protocol addresses • Operation: request or response • Source/Target-Physical/Protocol addresses • Notes • Table entries timeout in about 15 minutes • Update table with source when you are the target • Update table if already have an entry • Do not refresh table entries upon reference CSE30264

  10. 0 8 16 31 Hardware type = 1 ProtocolType = 0x0800 HLen = 48 PLen = 32 Operation SourceHardwareAddr (bytes 0 - 3) SourceHardwareAddr (bytes 4 – 5) SourceProtocolAddr (bytes 0 – 1) SourceProtocolAddr (bytes 2 - 3) TargetHardwareAddr (bytes 0 – 1) TargetHardwareAddr (bytes 2 – 5) TargetProtocolAddr (bytes 0 – 3) ARP Packet Format CSE30264

  11. Observe the Packets Wireshark www.wireshark.org CSE 30264

  12. Addressing • How do I get my initial IP address? • Static IP • System Administrator • Privatenetwork space • Know IP, mask, subnet, gateway, DNS • Dynamic IP  BOOTP / DHCP • I don’t know my IP, please tell me • Two flavors • Anybody can come in • Authenticated / MAC filtered CSE 30264

  13. DHCP • Dynamic Host Configuration Protocol CSE30264

  14. DHCP CSE30264

  15. More on DHCP • Uses UDP • Why not TCP? • Nearly all sites use DHCP • Static  server only • Other notes • Lease time for IP address • Variety of option fields • Thin clients CSE 30264

  16. NAT – Network Address Translation • Limited public IP space • Share addresses Xfinity ??? The larger Internet I’ll give you one IP address via DHCP CSE 30264

  17. Enter the NAT • Translate private address to public • Private network space • 10.* • 192.168.* • Translate via table • Use connection tuple • Src IP, Dst IP, Src Port, Dst Port DHCP Server 192.168.1.100 67.56.43.2 192.168.1.1 192.168.1.101 CSE 30264

  18. NAT Table • Must originate from inside • Map internal tuple to external tuple S: 192.168.1.100 D: 25.78.200.3 TCP SP: 9876 DP: 80 S: 67.56.43.2 D: 25.78.200.3 TCP SP: 42778 DP: 80 Mapping Table Ext: 67.56.43.2:42778 25.78.200.3:80 Int: 192.168.1.100:9876 25.78.200.3.80 67.56.43.2 192.168.1.1 CSE 30264

  19. Mapping Table • Maintain a list of all active connections • Map across the boundary • New connection • Pick an unused external port • Issues • Reach internal host from external (SSH) • DMZ – One host becomes a catch all • Scalability • UDP • IPsec / VPN CSE 30264

  20. Internet Control Message Protocol (ICMP) • Echo (ping) • Redirect (from router to source host) • Destination unreachable (protocol, port, or host) • TTL exceeded (so datagrams don’t cycle forever) • Checksum failed • Reassembly failed • Cannot fragment CSE30264

  21. Routing Outline Distance Vector Link State CSE30264

  22. Overview • Forwarding vs Routing • forwarding: to select an output port based on destination address and routing table • routing: process by which routing table is built • Network as a Graph • Problem: Find lowest cost path between two nodes • Factors • static • dynamic CSE30264

  23. Distance Vector • Each node maintains a set of triples • (Destination, Cost, NextHop) • Directly connected neighbors exchange updates • periodically (on the order of several seconds) • whenever table changes (called triggered update) • Each update is a list of pairs: • (Destination, Cost) • Update local table if receive a “better” route • smaller cost • came from next-hop • Refresh existing routes; delete if they time out CSE30264

  24. Example Destination Cost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A CSE30264

  25. Routing Loops • Example 1 • F detects that link to G has failed • F sets distance to G to infinity and sends update t o A • A sets distance to G to infinity since it uses F to reach G • A receives periodic update from C with 2-hop path to G • A sets distance to G to 3 and sends update to F • F decides it can reach G in 4 hops via A • Example 2 • link from A to E fails • A advertises distance of infinity to E • B and C advertise a distance of 2 to E • B decides it can reach E in 3 hops; advertises this to A • A decides it can read E in 4 hops; advertises this to C • C decides that it can reach E in 5 hops… CSE30264

  26. Loop-Breaking Heuristics • Set infinity to 16 • Split horizon • Split horizon with poison reverse CSE30264

  27. Routing Information Protocol (RIP) • Distributed along with BSD Unix • Straightforward implementation of DV • Updates sent every 30 seconds • Link costs constant at 1 (16 = infinity) CSE30264

  28. Link State • Strategy • send to all nodes (not just neighbors) information about directly connected links (not entire routing table) • Link State Packet (LSP) • id of the node that created the LSP • cost of link to each directly connected neighbor • sequence number (SEQNO) • time-to-live (TTL) for this packet CSE30264

  29. Link State (cont) • Reliable flooding • store most recent LSP from each node • forward LSP to all nodes but one that sent it • generate new LSP periodically • increment SEQNO • start SEQNO at 0 when reboot • decrement TTL of each LSP • discard when TTL=0 CSE30264

  30. Link State (cont) CSE30264

  31. Route Calculation • Dijkstra’s shortest-path algorithm • Let • N denotes set of nodes in the graph • l (i, j) denotes non-negative cost (weight) for edge (i, j) • s denotes this node • M denotes the set of nodes incorporated so far • C(n) denotes cost of the path from s to node n M = {s} for each n in N - {s} C(n) = l(s, n) while (N != M) M = M union {w} such that C(w) is the minimum for all w in (N - M) for each n in (N - M) C(n) = MIN(C(n), C (w) + l(w, n )) CSE30264

  32. OSPF • Open Shortest Path First Protocol • Authentication • Additional hierarchy • Load balancing CSE30264

  33. Metrics • Original ARPANET metric • measures number of packets queued on each link • took neither latency or bandwidth into consideration • New ARPANET metric • stamp each incoming packet with its arrival time (AT) • record departure time (DT) • when link-level ACK arrives, compute Delay = (DT - AT) + Transmit + Latency • if timeout, reset DT to departure time for retransmission • link cost = average delay over some time period • Revised ARPANET metric • compressed dynamic range • replaced Delay with link utilization • Practice • static metrics (e.g., 1/bandwidth) CSE30264

  34. Routing for Mobile Hosts • Mobile IP: • home agent, home address, foreign agent • triangle routing problem CSE30264

More Related