Lecture 14 CS 3516 These slides are generated

  • Slides: 41
Download presentation
Lecture 14 CS 3516: These slides are generated from those made available by the

Lecture 14 CS 3516: These slides are generated from those made available by the authors of our text. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Introduction 1 -1

Useful Commands Get MAC Address (Getmac. exe) Discovers the Media Access Control (MAC) address

Useful Commands 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: Usersjb>getmac Physical Address Transport Name ===================== 60 -36 -DD-AA-13 -69 Media disconnected 60 -36 -DD-AA-13 -65 DeviceTcpip_{437 F 350 E-DFD 7 -4 A 86 -B 063 -0 B 9650 BD 4404} 60 -36 -DD-AA-13 -66 Media disconnected B 8 -CA-3 A-DC-C 6 -2 B Media disconnected 08 -00 -27 -00 -E 4 -38 DeviceTcpip_{F 551 D 578 -DC 71 -4760 -B 91 C-B 349 EAE 4238 F} Network Layer 4 -2

Useful Commands IP Configuration Utility (Ipconfig. exe) Displays all current (TCP/IP) network configurations. C:

Useful Commands IP Configuration Utility (Ipconfig. exe) Displays all current (TCP/IP) network configurations. C: Usersjb>ipconfig Windows IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Link-local IPv 6 Address IPv 4 Address. . . Subnet Mask. . . Default Gateway. . C: Usersjb>ipconfig /? Suffix. . . . . : : : WPI. EDU fe 80: : e 591: 74 d 4: a 495: 7998%16 130. 215. 28. 36 255. 248. 0 130. 215. 24. 1 Prints command line options C: Usersjb>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 Network Layer 4 -3

Useful Commands Name Server Lookup (Nslookup. exe) Displays information about Domain Name System records

Useful Commands 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: Usersjb>nslookup www. google. com Server: a. resolvers. level 3. net this is the name of the default server Address: 4. 2. 2. 1 Non-authoritative answer: Name: www. google. com Addresses: 2607: f 8 b 0: 4000: 804: : 1011 74. 125. 227. 179 74. 125. 227. 180 74. 125. 227. 176 74. 125. 227. 177 74. 125. 227. 178 Network Layer 4 -4

Useful Commands Net services commands (Net. exe) Performs a broad range of network tasks.

Useful Commands 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: Usersjb>net help The syntax of this command is: Commands available are: NET NET ACCOUNTS COMPUTER CONFIG CONTINUE FILE GROUP HELP NET NET HELP NET NET NET HELPMSG LOCALGROUP PAUSE SESSION SHARE START NET NET NET STATISTICS STOP TIME USER VIEW NAMES explains different types of names in NET HELP syntax lines. SERVICES lists some of the services you can start. SYNTAX explains how to read NET HELP syntax lines. command | MORE displays Help one screen at a time. Network Layer 4 -5

Useful Commands Netstat (Netstat. exe) Displays active TCP connections, ports on which the computer

Useful Commands Netstat (Netstat. exe) Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, and IPv 4/IPv 6 statistics. C: Usersjb>netstat Proto TCP TCP TCP Local Address 127. 0. 0. 1: 1029 127. 0. 0. 1: 1036 127. 0. 0. 1: 1047 127. 0. 0. 1: 39055 172. 17. 168. 138: 2492 C: Usersjb>netstat -s IPv 4 Statistics Packets Received Header Errors Received Address Errors Datagrams Forwarded Unknown Protocols Received Packets Discarded Received Packets Delivered Foreign Address jb-laptop: 5354 jb-laptop: 27015 jb-laptop: 19872 jb-laptop: 39054 blugro 5 relay: 2492 = = = = State ESTABLISHED ESTABLISHED 10158258 2848 2192434 0 170614 4173788 6692404 Network Layer 4 -6

Useful Commands Network Command Shell (Netsh. exe) Displays or modifies the network configuration of

Useful Commands 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: Usersjb>route print Interface List 13. . . 60 36 dd aa 13 65. . . Intel(R) Centrino(R) Wireless-N 2230 12. . . 60 36 dd aa 13 69. . . Bluetooth Device (Personal Area Network) 31. . . 08 00 27 00 e 4 38. . . Virtual. Box Host-Only Ethernet Adapter IPv 4 Route Table Network Destination Netmask 0. 0 127. 0. 0. 0 255. 0. 0. 0 127. 0. 0. 1 255 127. 255 169. 254. 0. 0 255. 0. 0 169. 254. 40. 182 255 169. 254. 255 255 172. 17. 0. 0 255. 0. 0 172. 17. 168. 138 255 172. 17. 255 255 224. 0. 0. 0 240. 0 Gateway 172. 17. 1. 1 On-link On-link On-link Interface Metric 172. 17. 168. 138 25 127. 0. 0. 1 306 169. 254. 40. 182 276 172. 17. 168. 138 281 169. 254. 40. 182 276 Network Layer 4 -7

Useful Commands (Arp. exe) Displays current ARP entries by interrogating the current protocol data.

Useful Commands (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: Usersjb>arp -a Interface: 130. 215. 28. 36 --- 0 x 10 Internet Address Physical Address 130. 215. 24. 1 00 -00 -5 e-00 -01 -01 130. 215. 24. 2 00 -23 -9 c-94 -97 -f 0 130. 215. 27. 252 f 0 -1 f-af-2 f-e 1 -27 130. 215. 28. 63 00 -16 -3 e-c 5 -01 -25 130. 215. 29. 165 00 -24 -e 8 -32 -32 -1 d 130. 215. 31. 255 ff-ff-ff-ff Type dynamic dynamic static Network Layer 4 -8

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet switches VLANS 5.

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet switches VLANS 5. 5 link virtualization: MPLS 5. 6 data center networking 5. 7 a day in the life of a web request Link Layer 5 -9

Ethernet “dominant” wired LAN technology: v cheap $20 for NIC v first widely used

Ethernet “dominant” wired LAN technology: v cheap $20 for NIC v first widely used LAN technology v simpler, cheaper than token LANs and ATM v kept up with speed race: 10 Mbps – 10 Gbps Metcalfe’s Ethernet sketch Link Layer 5 -10

Ethernet: physical topology v bus: popular through mid 90 s § all nodes in

Ethernet: physical topology v bus: popular through mid 90 s § all nodes in same collision domain (can collide with each other) v star: prevails today § active switch in center § each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) switch bus: coaxial cable star Link Layer 5 -11

Ethernet frame structure sending adapter encapsulates IP datagram (or other network layer protocol packet)

Ethernet frame structure sending adapter encapsulates IP datagram (or other network layer protocol packet) in type Ethernet frame dest. source preamble address data (payload) CRC preamble: v 7 bytes with pattern 1010 followed by one byte with pattern 10101011 v used to synchronize receiver, sender clock rates Link Layer 5 -12

Ethernet frame structure (more) v addresses: 6 byte source, destination MAC addresses § if

Ethernet frame structure (more) v addresses: 6 byte source, destination MAC addresses § if adapter receives frame with matching destination address, or with broadcast address (e. g. ARP packet), it passes data in frame to network layer protocol § otherwise, adapter discards frame v v type: indicates higher layer protocol (mostly IP but others possible, e. g. , Novell IPX, Apple. Talk) CRC: cyclic redundancy check at receiver § error detected: frame is dropped type dest. source preamble address data (payload) CRC Link Layer 5 -13

Ethernet: unreliable, connectionless v v v connectionless: no handshaking between sending and receiving NICs

Ethernet: unreliable, connectionless v v v connectionless: no handshaking between sending and receiving NICs unreliable: receiving NIC doesn’t send acks or nacks to sending NIC § data in dropped frames recovered only if initial sender uses higher layer rdt (e. g. , TCP), otherwise dropped data lost Ethernet’s MAC protocol: unslotted CSMA/CD wth binary backoff Link Layer 5 -14

802. X v v v v 802. 1 LAN Management 802. 2 Defines Logical

802. X v v v v 802. 1 LAN Management 802. 2 Defines Logical Link Control – the upper part of the Data Link Layer 802. 3 Ethernet (wired) 802. 4 Token Bus 802. 5 Token Ring 802. 6 MAN Definition 802. 11 Ethernet (Wireless) Link Layer 5 -15

802. 3 Ethernet standards: link & physical layers v many different Ethernet standards §

802. 3 Ethernet standards: link & physical layers v many different Ethernet standards § common MAC protocol and frame format § different speeds: 2 Mbps, 100 Mbps, 1 Gbps, 10 G bps § different physical layer media: fiber, cable application transport network link physical MAC protocol and frame format 100 BASE-TX 100 BASE-T 2 100 BASE-FX 100 BASE-T 4 100 BASE-SX 100 BASE-BX fiber physical layer copper (twister Link Layer 5 -16 pair) physical layer

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet switches VLANS 5.

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet switches VLANS 5. 5 link virtualization: MPLS 5. 6 data center networking 5. 7 a day in the life of a web request Link Layer 5 -17

Ethernet switch v v v link-layer device: takes an active role § store, forward

Ethernet switch v v v link-layer device: takes an active role § store, forward Ethernet frames § examine incoming frame’s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment transparent § hosts are unaware of presence of switches plug-and-play, self-learning § switches do not need to be configured Link Layer 5 -18

Switch: multiple simultaneous transmissions v v hosts have dedicated, direct connection to switches buffer

Switch: multiple simultaneous transmissions v v hosts have dedicated, direct connection to switches buffer packets Ethernet protocol used on each incoming link, but no collisions; full duplex § each link is its own collision domain switching: A-to-A’ and B-to-B’ can transmit simultaneously, without collisions A B C’ 6 1 2 4 5 B’ 3 C A’ switch with six interfaces (1, 2, 3, 4, 5, 6) Link Layer 5 -19

Switch forwarding table Q: how does switch know A’ reachable via interface 4, and

Switch forwarding table Q: how does switch know A’ reachable via interface 4, and B’ reachable via interface 5? v A: each switch has a switch table, each entry: § (MAC address of host, interface to reach host, time stamp) § looks like a routing table! Q: how are entries created, maintained in switch table? A B C’ 6 1 2 4 5 B’ 3 C A’ switch with six interfaces (1, 2, 3, 4, 5, 6) § something like a routing protocol? Link Layer 5 -20

Switch: self-learning v switch learns which hosts can be reached through which interfaces §

Switch: self-learning v switch learns which hosts can be reached through which interfaces § when frame received, switch “learns” location of sender: incoming LAN segment § records sender/location pair in switch table A A A’ B C’ 6 1 2 4 5 B’ 3 C A’ MAC addr interface A Source: A Dest: A’ 1 TTL 60 Switch table (initially empty) Link Layer 5 -21

Switch: frame filtering/forwarding when frame received at switch: 1. record incoming link, MAC address

Switch: frame filtering/forwarding when frame received at switch: 1. record incoming link, MAC address of sending host 2. index switch table using MAC destination address 3. if entry found for destination then { if destination on segment from which frame arrived then drop frame else forward frame on interface indicated by entry } else flood /* forward on all interfaces except arriving interface */ Link Layer 5 -22

Self-learning, forwarding: example A v v frame destination, A’, location unknown: flood destination A

Self-learning, forwarding: example A v v frame destination, A’, location unknown: flood destination A location known: selectively send on just one link Source: A Dest: A’ A A’ B C’ 6 1 2 A A’ 4 5 B’ 3 C A’ A A’ MAC addr interface A A’ 1 4 TTL 60 60 switch table (initially empty) Link Layer 5 -23

Interconnecting switches v switches can be connected together S 4 S 1 A B

Interconnecting switches v switches can be connected together S 4 S 1 A B C S 3 S 2 D F E I G H Q: sending from A to G - how does S 1 know to forward frame destined to F via S 4 and S 3? v A: self learning! (works exactly the same as in single-switch case!) Link Layer 5 -24

Self-learning multi-switch example Suppose C sends frame to I, I responds to C S

Self-learning multi-switch example Suppose C sends frame to I, I responds to C S 4 S 1 A B C S 3 S 2 D F E v I G H Q: show switch tables and packet forwarding in S 1, S 2, S 3, S 4 Link Layer 5 -25

Institutional network to external network mail server router web server IP subnet Link Layer

Institutional network to external network mail server router web server IP subnet Link Layer 5 -26

Switches vs. routers both are store-and-forward: § routers: network-layer devices (examine network-layer headers) §

Switches vs. routers both are store-and-forward: § routers: network-layer devices (examine network-layer headers) § switches: link-layer devices (examine linklayer headers) both have forwarding tables: § routers: compute tables using routing algorithms, IP addresses § switches: learn forwarding table using flooding, learning, MAC addresses datagram frame application transport network link physical frame link physical switch network datagram link frame physical application transport network link physical Link Layer 5 -27

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet Switches VLANS 5.

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet Switches VLANS 5. 6 data center networking 5. 7 a day in the life of a web request Link Layer 5 -28

Data center networks v v 10’s to 100’s of thousands of hosts, often closely

Data center networks v v 10’s to 100’s of thousands of hosts, often closely coupled, in close proximity: § e-business (e. g. Amazon) § content-servers (e. g. , You. Tube, Akamai, Apple, Microsoft) § search engines, data mining (e. g. , Google) challenges: § multiple applications, each serving massive numbers of clients § managing/balancing load, avoiding processing, networking, data bottlenecks Inside a 40 -ft Microsoft container, Chicago data center Link Layer 5 -29

Data center networks load balancer: application-layer routing § receives external client requests § directs

Data center networks load balancer: application-layer routing § receives external client requests § directs workload within data center § returns results to external client (hiding data center internals from client) Internet Border router Load balancer Access router Tier-1 switches B A Load balancer C Tier-2 switches TOR switches Server racks 1 2 3 4 5 6 7 8 Link Layer 5 -30

Data center networks v rich interconnection among switches, racks: § increased throughput between racks

Data center networks v rich interconnection among switches, racks: § increased throughput between racks (multiple routing paths possible) § increased reliability via redundancy Tier-1 switches Tier-2 switches TOR switches Server racks 1 2 3 4 5 6 7 8

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet switches VLANS 5.

Lecture 14: outline 5. 4 LANs § § addressing, ARP Ethernet switches VLANS 5. 5 link virtualization: MPLS 5. 6 data center networking 5. 7 a day in the life of a web request Link Layer 5 -32

Synthesis: a day in the life of a web request v journey down protocol

Synthesis: a day in the life of a web request v journey down protocol stack complete! § application, transport, network, link v putting-it-all-together: synthesis! § goal: identify, review, understand protocols (at all layers) involved in seemingly simple scenario: requesting www page § scenario: student attaches laptop to campus network, requests/receives www. google. com Link Layer 5 -33

A day in the life: scenario DNS server browser Comcast network 68. 80. 0.

A day in the life: scenario DNS server browser Comcast network 68. 80. 0. 0/13 school network 68. 80. 2. 0/24 web page web server 64. 233. 169. 105 Google’s network 64. 233. 160. 0/19 Link Layer 5 -34

A day in the life… connecting to the Internet DHCP UDP IP Eth Phy

A day in the life… connecting to the Internet DHCP UDP IP Eth Phy DHCP v DHCP DHCP UDP IP Eth Phy router (runs DHCP) v v connecting laptop needs to get its own IP address, addr of first-hop router, addr of DNS server: use DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802. 3 Ethernet frame broadcast (dest: FFFFFF) on LAN, received at router running DHCP server Ethernet demuxed to IP demuxed, UDP demuxed to DHCP Link Layer 5 -35

A day in the life… connecting to the Internet DHCP UDP IP Eth Phy

A day in the life… connecting to the Internet DHCP UDP IP Eth Phy DHCP v v DHCP DHCP UDP IP Eth Phy router (runs DHCP) v DHCP server formulates DHCP ACK containing client’s IP address, IP address of first-hop router for client, name & IP address of DNS server encapsulation at DHCP server, frame forwarded (switch learning) through LAN, demultiplexing at client DHCP client receives DHCP ACK reply Client now has IP address, knows name & addr of DNS server, IP address of its first-hop router Link Layer 5 -36

A day in the life… ARP (before DNS, before HTTP) DNS DNS ARP query

A day in the life… ARP (before DNS, before HTTP) DNS DNS ARP query DNS UDP IP ARP Eth Phy v before sending HTTP request, need IP address of www. google. com: DNS v DNS query created, encapsulated in UDP, encapsulated in IP, encapsulated in Eth. To send frame to router, need MAC address of router interface: ARP query broadcast, received ARP reply Eth Phy router (runs DHCP) v v by router, which replies with ARP reply giving MAC address of router interface client now knows MAC address of first hop router, so can now send frame containing DNS query Link Layer 5 -37

A day in the life… using DNS DNS UDP IP Eth Phy DNS DNS

A day in the life… using DNS DNS UDP IP Eth Phy DNS DNS server Comcast network 68. 80. 0. 0/13 router (runs DHCP) v DNS UDP IP Eth Phy IP datagram containing DNS query forwarded via LAN switch from client to 1 st hop router v v v IP datagram forwarded from campus network into comcast network, routed (tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to DNS server demux’ed to DNS server replies to client with IP address of www. google. com Link Layer 5 -38

A day in the life…TCP connection carrying HTTP TCP IP Eth Phy SYNACK SYN

A day in the life…TCP connection carrying HTTP TCP IP Eth Phy SYNACK SYN v SYNACK SYN TCP IP Eth Phy web server 64. 233. 169. 105 router (runs DHCP) v to send HTTP request, client first opens TCP socket to web server TCP SYN segment (step 1 in 3 -way handshake) interdomain routed to web server v web server responds with TCP SYNACK (step 2 in 3 way handshake) v TCP connection established! Link Layer 5 -39

A day in the life… HTTP request/reply HTTP TCP IP Eth Phy HTTP HTTP

A day in the life… HTTP request/reply HTTP TCP IP Eth Phy HTTP HTTP HTTP TCP IP Eth Phy web server 64. 233. 169. 105 v router (runs DHCP) web page finally (!!!) displayed v HTTP request sent into TCP socket v IP datagram containing HTTP request routed to www. google. com v web server responds with HTTP reply (containing web page) v IP datagram containing HTTP reply routed back to client Link Layer 5 -40

The End is Near!

The End is Near!