Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "CSE 30264 Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 11 – February 16, 2010."— Presentation transcript:

1 CSE 30264 Computer 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 Spring 2010CSE 302642 Physical Data Network Transport Application

3 Spring 2010CSE302643 Internetworking Outline Local Network Routing

4 Routing Table – netscale01 Spring 2010CSE 302644 Mask result Local or next hop? Interface to pass to

5 Spring 2009CSE302645 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

6 Spring 2009CSE302646 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

7 Example – ARP Table Spring 2010CSE 302647

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 Spring 2010CSE 302648

9 Spring 2009CSE302649 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

10 Spring 2009CSE3026410 ARP Packet Format TargetHardwareAddr (bytes 2 – 5) TargetProtocolAddr (bytes 0 – 3) SourceProtocolAddr (bytes 2 - 3) Hardware type = 1ProtocolType = 0x0800 SourceHardwareAddr (bytes 4 – 5) TargetHardwareAddr (bytes 0 – 1) SourceProtocolAddr (bytes 0 – 1) HLen = 48PLen = 32Operation SourceHardwareAddr (bytes 0 - 3) 081631

11 Observe the Packets Spring 2010CSE 3026411 Wireshark www.wireshark.org

12 Addressing Spring 2010CSE 3026412 How do I get my initial IP address? Static IP System Administrator Private network 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

13 Spring 2009CSE3026413 DHCP Dynamic Host Configuration Protocol

14 Spring 2009CSE3026414 DHCP

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 Spring 2010CSE 3026415

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

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 Spring 2010CSE 3026417 67.56.43.2 192.168.1.1 192.168.1.100 192.168.1.101 DHCP Server

18 NAT Table Must originate from inside –Map internal tuple to external tuple Spring 2010CSE 3026418 67.56.43.2 192.168.1.1 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

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 Spring 2010CSE 3026419

20 Spring 2009CSE3026420 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

21 Spring 2009CSE3026421 Routing Outline Distance Vector Link State

22 Spring 2009CSE3026422 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

23 Spring 2009CSE3026423 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

24 Spring 2009CSE3026424 Example Destination Cost NextHop A 1 A C 1 C D 2 C E 2 A F 2 A G 3 A

25 Spring 2009CSE3026425 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…

26 Spring 2009CSE3026426 Loop- Breaking Heuristics Set infinity to 16 Split horizon Split horizon with poison reverse

27 Spring 2009CSE3026427 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)

28 Spring 2009CSE3026428 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

29 Spring 2009CSE3026429 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

30 Spring 2009CSE3026430 Link State (cont)

31 Spring 2009CSE3026431 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 ))

32 Spring 2009CSE3026432 OSPF Open Shortest Path First Protocol Authentication Additional hierarchy Load balancing

33 Spring 2009CSE3026433 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)

34 Spring 2009CSE3026434 Routing for Mobile Hosts Mobile IP: –home agent, home address, foreign agent –triangle routing problem


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

Similar presentations


Ads by Google