1 / 41

Lecture 12

Lecture 12. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012. CS3516: These slides are generated from those made available by the authors of our text. BONUS: Useful commands 4.4 IP: Internet Protocol datagram format

cana
Download Presentation

Lecture 12

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. Lecture 12 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith RossAddison-WesleyMarch 2012 CS3516: These slides are generated from those made available by the authors of our text. Introduction

  2. BONUS: Useful commands 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Lecture 12: outline Network Layer

  3. Get MAC Address (Getmac.exe) Discovers the Media Access Control (MAC) address and lists associated network protocols for all network cards in a computer, either locally or across a network. C:\Users\jb>getmac Physical Address Transport Name ============ ============================= 60-36-DD-AA-13-69 Media disconnected 60-36-DD-AA-13-65 \Device\Tcpip_{437F350E-DFD7-4A86-B063-0B9650BD4404} 60-36-DD-AA-13-66 Media disconnected 60-36-DD-AA-13-66 Media disconnected B8-CA-3A-DC-C6-2B Media disconnected 08-00-27-00-E4-38 \Device\Tcpip_{F551D578-DC71-4760-B91C-B349EAE4238F} Useful Commands Network Layer

  4. IP Configuration Utility (Ipconfig.exe) Displays all current (TCP/IP) network configurations. C:\Users\jb>ipconfig Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : WPI.EDU Link-local IPv6 Address . . . . . : fe80::e591:74d4:a495:7998%16 IPv4 Address. . . . . . . . . . . : 130.215.28.36 Subnet Mask . . . . . . . . . . . : 255.255.248.0 Default Gateway . . . . . . . . . : 130.215.24.1 C:\Users\jb>ipconfig /?  Prints command line options C:\Users\jb>ipconfig /displaydns gives dns info cached on node cs.wpi.edu ---------------------------------------- Record Name . . . . . : cs.wpi.edu Record Type . . . . . : 1 Time To Live . . . . : 73497 Data Length . . . . . : 4 Section . . . . . . . : Answer A (Host) Record . . . : 130.215.28.181 Useful Commands Network Layer

  5. Name Server Lookup (Nslookup.exe) Displays information about Domain Name System records for specific IP addresses and/or host names so that you can troubleshoot DNS problems. C:\Users\jb>nslookup www.google.com Server: a.resolvers.level3.net  this is the name of the default server Address: 4.2.2.1 Non-authoritative answer: Name: www.google.com Addresses: 2607:f8b0:4000:804::1011 74.125.227.179 74.125.227.180 74.125.227.176 74.125.227.177 74.125.227.178 Useful Commands Network Layer

  6. Net services commands (Net.exe) Performs a broad range of network tasks. Type net with no parameters to see a full list of available command-line options. C:\Users\jb>net help The syntax of this command is: Commands available are: NET ACCOUNTS NET HELPMSG NET STATISTICS NET COMPUTER NET LOCALGROUP NET STOP NET CONFIG NET PAUSE NET TIME NET CONTINUE NET SESSION NET USE NET FILE NET SHARE NET USER NET GROUP NET START NET VIEW NET HELP NET HELP NAMES explains different types of names in NET HELP syntax lines. NET HELP SERVICES lists some of the services you can start. NET HELP SYNTAX explains how to read NET HELP syntax lines. NET HELP command | MORE displays Help one screen at a time. Useful Commands Network Layer

  7. Netstat(Netstat.exe) Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, and IPv4/IPv6 statistics. C:\Users\jb>netstat Proto Local Address Foreign Address State TCP 127.0.0.1:1029 jb-laptop:5354 ESTABLISHED TCP 127.0.0.1:1036 jb-laptop:27015 ESTABLISHED TCP 127.0.0.1:1047 jb-laptop:19872 ESTABLISHED TCP 127.0.0.1:39055 jb-laptop:39054 ESTABLISHED TCP 172.17.168.138:2492 blugro5relay:2492 ESTABLISHED C:\Users\jb>netstat -s IPv4 Statistics Packets Received = 10158258 Received Header Errors = 2848 Received Address Errors = 2192434 Datagrams Forwarded = 0 Unknown Protocols Received = 170614 Received Packets Discarded = 4173788 Received Packets Delivered = 6692404 Useful Commands Network Layer

  8. Network Command Shell (Netsh.exe) Displays or modifies the network configuration of a local or remote computer that is currently running. This command-line scripting utility has a huge number of options, which are fully detailed in Help. TCP/IP Route (Route.exe) Displays and modifies entries in the local IP routing table. C:\Users\jb>route print Interface List 13...60 36 ddaa 13 65 ......Intel(R) Centrino(R) Wireless-N 2230 12...60 36 ddaa 13 69 ......Bluetooth Device (Personal Area Network) 31...08 00 27 00 e4 38 ......VirtualBox Host-Only Ethernet Adapter IPv4 Route Table Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 172.17.1.1 172.17.168.138 25 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 169.254.0.0 255.255.0.0 On-link 169.254.40.182 276 169.254.40.182 255.255.255.255 On-link 169.254.40.182 276 169.254.255.255 255.255.255.255 On-link 169.254.40.182 276 172.17.0.0 255.255.0.0 On-link 172.17.168.138 281 172.17.168.138 255.255.255.255 On-link 172.17.168.138 281 172.17.255.255 255.255.255.255 On-link 172.17.168.138 281 224.0.0.0 240.0.0.0 On-link 169.254.40.182 276 Useful Commands Network Layer

  9. (Arp.exe) Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed. C:\Users\jb>arp -a Interface: 130.215.28.36 --- 0x10 Internet Address Physical Address Type 130.215.24.1 00-00-5e-00-01-01 dynamic 130.215.24.2 00-23-9c-94-97-f0 dynamic 130.215.27.252 f0-1f-af-2f-e1-27 dynamic 130.215.28.63 00-16-3e-c5-01-25 dynamic 130.215.29.165 00-24-e8-32-32-1d dynamic 130.215.31.255 ff-ff-ff-ff-ff-ff static Useful Commands Network Layer

  10. BONUS: Useful commands 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Lecture 12: outline Network Layer

  11. IP addressing: CIDR CIDR:Classless InterDomain Routing • subnet portion of address of arbitrary length • address format: a.b.c.d/x, where x is # bits in subnet portion of address host part subnet part 11001000 00010111 00010000 00000000 200.23.16.0/23 Network Layer

  12. IP addresses: how to get one? Q: How does a host get IP address? • hard-coded by system admin in a file • Windows: control-panel->network->configuration->tcp/ip->properties • UNIX: /etc/rc.config • DHCP:Dynamic Host Configuration Protocol: dynamically get address from as server • “plug-and-play” Network Layer

  13. DHCP: Dynamic Host Configuration Protocol goal: allow host to dynamically obtain its IP address from network server when it joins network • can renew its lease on address in use • allows reuse of addresses (only hold address while connected/“on”) • support for mobile users who want to join network (more shortly) DHCP can return more than just allocated IP address on subnet: • address of first-hop router for client • name and IP address of DNS sever • network mask (indicating network versus host portion of address) You don’t get any old IP address – it has to be one that can be services by the port on the router you’re connected to. Network Layer

  14. NAT: network address translation local network (e.g., home network) 192.168/16 rest of Internet 192.168.0.1 192.168.0.4 192.168.0.2 138.76.29.7 192.168.0.3 datagrams with source or destination in this network have 192.168/16 address for source, destination (as usual) alldatagrams leaving local network have same single source NAT IP address: 138.76.29.7,different source port numbers Network Layer

  15. NAT: network address translation motivation: 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 devices • can change addresses of devices in local network without notifying outside world • can change ISP without changing addresses of devices in local network • devices inside local net not explicitly addressable, visible by outside world (a security plus) Network Layer

  16. NAT: network address translation implementation: 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 pair • 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 Network Layer

  17. NAT traversal problem • client wants to connect to server with address 192.168.0.1 • server address 192.168.0.1 local to LAN (client can’t use it as destination addr) • only one externally visible NATed address: 138.76.29.7 • solution1: statically configure NAT to forward incoming connection requests at given port to server • e.g., (123.76.29.7, port 2500) always forwarded to 192.168.0.1 port 25000 192.168.0.1 client ? 192.168.0.4 138.76.29.7 NAT router Network Layer

  18. 192.168.0.1 NAT router NAT traversal problem • solution 2:relaying (used in Skype) • NATed client establishes connection to relay • external client connects to relay • relay bridges packets between to connections 2. connection to relay initiated by client 1. connection to relay initiated by NATed host 3. relaying established client 138.76.29.7 Network Layer

  19. 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Lecture 12: outline Network Layer

  20. scale: with 600 million destinations: can’t store all dest’s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network Hierarchical routing our routing study thus far - idealization • all routers identical • network “flat” … not true in practice Network Layer

  21. forwarding table configured by both intra- and inter-AS routing algorithm intra-AS sets entries for internal dests inter-AS & intra-AS sets entries for external dests 3a 3b 2a AS3 AS2 1a 2c AS1 2b 1b 1d 3c 1c Inter-AS Routing algorithm Intra-AS Routing algorithm Forwarding table Interconnected ASes Network Layer

  22. suppose router in AS1 receives datagram destined outside of AS1: router should forward packet to gateway router, but which one? AS1 must: learn which dests are reachable through AS2, which through AS3 propagate this reachability info to all routers in AS1 job of inter-AS routing! 2c 2b 1b 1d 3c 1c 3a 3b 2a 1a AS1 Inter-AS tasks AS3 other networks other networks AS2 Network Layer

  23. 2c 2b 1b 1d 1c 3c 3a 3b 2a 1a AS1 Example: setting forwarding table in router 1d • suppose AS1 learns (via inter-AS protocol) that subnet x reachable via AS3 (gateway 1c), but not via AS2 • inter-AS protocol propagates reachability info to all internal routers • router 1d determines from intra-AS routing info that its interface I is on the least cost path to 1c • installs forwarding table entry (x,I) … x AS3 other networks other networks AS2 Network Layer

  24. 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Lecture 12: outline Network Layer

  25. Intra-AS Routing • also known as interior gateway protocols (IGP) • most common intra-AS routing protocols: • RIP: Routing Information Protocol • OSPF: Open Shortest Path First • IGRP: Interior Gateway Routing Protocol (Cisco proprietary) Network Layer

  26. u v w x z y C D B A RIP ( Routing Information Protocol) • included in BSD-UNIX distribution in 1982 • distance vector algorithm • distance metric: # hops (max = 15 hops), each link has cost 1 • DVs exchanged with neighbors every 30 sec in response message (aka advertisement) • each advertisement: list of up to 25 destination subnets(in IP addressing sense) from router A to destinationsubnets: subnethops u 1 v 2 w 2 x 3 y 3 z 2 Network Layer

  27. RIP: example z y w x B D A C routing table in router D destination subnet next router # hops to dest w A 2 y B 2 z B 7 x -- 1 …. …. .... Network Layer

  28. A-to-D advertisement dest next hops w - 1 x - 1 z C 4 …. … ... A 5 RIP: example z y w x B D A C routing table in router D destination subnet next router # hops to dest w A 2 y B 2 z B 7 x -- 1 …. …. .... Network Layer

  29. routed routed RIP table processing • RIP routing tables managed by application-level process called route-d (daemon) • advertisements sent in UDP packets, periodically repeated • if no advertisement heard after 180 sec --> neighbor/link declared dead • routes via neighbor invalidated • new advertisements sent to neighbors transport (UDP) transprt (UDP) network forwarding (IP) table network (IP) forwarding table link link physical physical Network Layer

  30. OSPF (Open Shortest Path First) • “open”: publicly available • uses link state algorithm • LS packet dissemination • topology map at each node • route computation using Dijkstra’s algorithm • OSPF advertisement carries one entry per neighbor • advertisements flooded to entire AS • carried in OSPF messages directly over IP (rather than TCP or UDP • AS-AS routing protocol: nearly identical to OSPF • security: all OSPF messages authenticated (to prevent malicious intrusion) • multiple same-cost paths allowed (only one path in RIP) Network Layer

  31. Hierarchical OSPF boundary router backbone router backbone area border routers area 3 internal routers area 1 area 2 Network Layer

  32. Hierarchical OSPF • two-level hierarchy: local area, backbone. • link-state advertisements only in area • each nodes has detailed area topology; only know direction (shortest path) to nets in other areas. • area border routers:“summarize” distances to nets in own area, advertise to other Area Border routers. • backbone routers: run OSPF routing limited to backbone. • boundary routers: connect to other AS’s. Network Layer

  33. Internet inter-AS routing: BGP • BGP (Border Gateway Protocol):the de facto inter-domain routing protocol • “glue that holds the Internet together” • BGP provides each AS a means to: • eBGP: obtain subnet reachability information from neighboring ASs. • iBGP: propagate reachability information to all AS-internal routers. • determine “good” routes to other networks based on reachability information and policy. • allows subnet to advertise its existence to rest of Internet: “I am here” Network Layer

  34. 2c 2b 1b 1d 1c 3c BGP message 3a 3b 2a 1a AS1 BGP basics • BGP session:two BGP routers (“peers”) exchange BGP messages: • advertising pathsto different destination network prefixes (“path vector” protocol) • exchanged over semi-permanent TCP connections • when AS3 advertises a prefix to AS1: • AS3 promises it will forward datagrams towards that prefix • AS3 can aggregate prefixes in its advertisement AS3 other networks other networks AS2 Network Layer

  35. 2c 2b 1b 1d 1c 3a 3b 2a 1a BGP basics: distributing path information • using eBGP session between 3a and 1c, AS3 sends prefix reachability info to AS1. • 1c can then use iBGP do distribute new prefix info to all routers in AS1 • 1b can then re-advertise new reachability info to AS2 over 1b-to-2a eBGP session • when router learns of new prefix, it creates entry for prefix in its forwarding table. eBGP session iBGP session AS3 other networks other networks AS2 AS1 Network Layer

  36. 4.4 IP: Internet Protocol datagram format IPv4 addressing ICMP IPv6 4.5 routing algorithms link state distance vector hierarchical routing 4.6 routing in the Internet RIP OSPF BGP 4.7 broadcast and multicast routing Lecture 12: outline Network Layer

  37. duplicate creation/transmission duplicate duplicate in-network duplication sourceduplication R4 R2 R1 R4 R3 R2 R1 R3 Broadcast routing • deliver packets from source to all other nodes • source duplication is inefficient: • source duplication: how does source determine recipient addresses? Network Layer

  38. In-network duplication • flooding: when node receives broadcast packet, sends copy to all neighbors • problems: cycles & broadcast storm • controlled flooding: node only broadcasts pkt if it hasn’t broadcast same packet before • node keeps track of packet ids already broadacsted • or reverse path forwarding (RPF): only forward packet if it arrived on shortest path between node and source • spanning tree: • no redundant packets received by any node Network Layer

  39. (b) broadcast initiated at D (a) broadcast initiated at A G G D D B A B A E E F F c c Spanning tree • first construct a spanning tree • nodes then forward/make copies only along spanning tree Network Layer

  40. G G D D A B E A B E F F c c Spanning tree: creation • center node • each node sends unicast join message to center node • message forwarded until it arrives at a node already belonging to spanning tree 3 4 2 5 1 • stepwise construction of spanning tree (center: E) (b) constructed spanning tree Network Layer

  41. The End is Near!

More Related