computer networking tdde25 part 2
play

Computer networking (TDDE25): Part 2 Niklas Carlsson, Associate - PowerPoint PPT Presentation

Computer networking (TDDE25): Part 2 Niklas Carlsson, Associate Professor http://www.ida.liu.se/~nikca/ Roadmap: Application layer Principles of Network Applications Application Architectures Application Requirements Web and


  1. root DNS server DNS Infrastructure 2 • Host at liu.se wants IP 3 TLD DNS server address for 4 gaia.cs.umass.edu 5 • Infrastructure: local DNS server – Client resolver dns.liu.se – Local DNS server 6 7 1 8 – Authoritative DNS Server – Root DNS Server authoritative DNS server – Top-Level Domain DNS Server dns.cs.umass.edu requesting host • Transport protocol? example.liu.se – UDP (port: 53) gaia.cs.umass.edu 49

  2. DNS Records

  3. Inserting Records into DNS Authoritative name server , mail server

  4. Roadmap • Principles of Network Applications – App Architectures – App Requirements • Web and HTTP • FTP • Electronic Mail – SMTP, POP3, IMAP • DNS • P2P Applications • Socket Programming with UDP and TCP

  5. Socket Programming

  6. Socket Programming

  7. Socket Programming with UDP • UDP: no “connection” between client & server – no handshaking before sending data – sender explicitly attaches IP destination address and port # to each packet – rcvr extracts sender IP address and port# from received packet • UDP: transmitted data may be lost or received out-of-order • Application viewpoint: – UDP provides unreliable transfer of groups of bytes (“datagrams”) between client and server

  8. Client/Server Socket Interaction: UDP Address family: IPv4, Socket type: datagrams UDP

  9. Socket Programming with TCP

  10. Client/Server Socket Interaction: TCP Wait for new connections on serversocket

  11. Transport Layer

  12. Transport Services and Protocols

  13. Transport vs. Network Layer

  14. Two Basic Transport Features • Demultiplexing: port numbers Server host 128.2.194.242 Service request for Client host Web server 128.2.194.242:80 (port 80) (i.e., the Web server) OS Client Echo server (port 7) • Error detection: checksums IP payload 62 detect corruption

  15. Demultiplexing Traffic Server applications communicate with Host 1 Host 2 Host 3 multiple clients Unique port for Application each application Applications share the same network Transport P1 P2 P3 P4 P5 P6 P7 Network Endpoints identified by <src_ip, src_port, dest_ip, dest_port> 63

  16. Two Main Transport Layers • User Datagram Protocol (UDP) – Just provides demultiplexing and error detection – Header fields: port numbers, checksum, and length – Low overhead, good for query/response and multimedia • Transmission Control Protocol (TCP) – Adds support for a “ stream of bytes ” abstraction – Retransmitting lost or corrupted data – Putting out-of-order data back in order – Preventing overflow of the receiver buffer – Adapting the sending rate to alleviate congestion – Higher overhead, good for most statefull applications 64

  17. Network Layer

  18. Network Layer

  19. Two Key Network Layer Functions

  20. Interplay between Routing and Forwarding

  21. Network Layer Service Model

  22. How do we find a path?

  23. Routing on a Graph • Goal: determine a “good” path through the network from source to destination • What is a good path? 5 – Usually means the shortest path 3 B C – Load balanced 5 2 – Lowest $$$ cost 2 1 A F 3 • Network modeled as a graph 2 1 D E – Routers  nodes 1 – Link  edges • Edge cost: delay, congestion level, etc.

  24. Hierarchical addressing: route aggregation ISP has an address block; it can further divide this block into sub blocks and assign them to subscriber organizations. Organization 0 200.23.16.0/23 Organization 1 “Send me anything 200.23.18.0/23 with addresses beginning Organization 2 . 200.23.16.0/20” 200.23.20.0/23 Fly-By-Night-ISP . . . . Internet . Organization 7 200.23.30.0/23 “Send me anything ISPs-R-Us with addresses beginning 199.31.0.0/16” 72

  25. Link Layer

  26. Link Layer

  27. Link Layer

  28. Where is the link layer implemented?

  29. Adaptors Communicating

  30. MAC Addresses(2/3) Each adapter on LAN has unique LAN address Broadcast address = 1A-2F-BB-76-09-AD FF-FF-FF-FF-FF-FF LAN (wired or = adapter wireless) 71-65-F7-2B-08-53 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 78

  31. LAN Address (3/3) • MAC address allocation administered by IEEE • manufacturer buys portion of MAC address space • MAC flat address provides portability – can move LAN card from one LAN to another – different than with IP addresses! 79

  32. Address Resolution Protocol (ARP) • Every host maintains an ARP table – (IP address, MAC address) pair • Consult the table when sending a packet – Map destination IP address to destination MAC address – Encapsulate and transmit the data packet • But, what if the IP address is not in the table? – Sender broadcasts: “ Who has IP address 1.2.3.156? ” – Receiver responds: “ MAC address 58-23-D7-FA-20-B0 ” – Sender caches the result in its ARP table 80

  33. ARP: Address Resolution Protocol Question: how to determine • Each IP node (Host, Router) MAC address of B on LAN has ARP table knowing B’s IP address? • ARP Table: IP/MAC address mappings for some LAN 237.196.7.78 nodes 1A-2F-BB-76-09-AD < IP address; MAC address; TTL> 237.196.7.23 TTL (Time To Live): time after – 237.196.7.14 which address mapping will LAN be forgotten (typically 20 min) 71-65-F7-2B-08-53 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 237.196.7.88 81

  34. Link Layer Services

  35. Link Layer Services

  36. Connecting the pieces

  37. Three Kinds of Identifiers (+ports) Host Name IP Address MAC Address Example www.cs.princeton.edu 128.112.7.156 00-15-C5-49-04-A9 Size Hierarchical, human Hierarchical, Flat, machine readable, variable machine readable, readable, 48 bits length 32 bits (in IPv4) Read by Humans, hosts IP routers Switches in LAN Allocation, Domain, assigned Variable-length Fixed-sized blocks, top-level by registrar (e.g., for prefixes, assigned by assigned by IEEE to .edu) ICANN, RIR, or ISP vendors (e.g., Dell) Allocation, Host name, local Interface, by DHCP Interface, by vendor low-level administrator or an administrator 86

  38. Learning a Host ’ s Address me you adapter adapter • Who am I? – Hard-wired: MAC address – Static configuration: IP interface configuration – Dynamically learned: IP address configured by DHCP • Who are you? – Hard-wired: IP address in a URL, or in the code – Dynamically looked up: ARP or DNS 87

  39. Mapping Between Identifiers • Dynamic Host Configuration Protocol (DHCP) – Given a MAC address, assign a unique IP address – … and tell host other stuff about the Local Area Network – To automate the boot-strapping process • Address Resolution Protocol (ARP) – Given an IP address, provide the MAC address – To enable communication within the Local Area Network • Domain Name System (DNS) – Given a host name, provide the IP address – Given an IP address, provide the host name 88

  40. Dynamic Host Configuration Protocol arriving client DHCP server Host learns IP address, Subnet mask, Gateway address, DNS server(s), and a lease time. 89

  41. Courses about Computer Networks • TDTS06 Computer Networks (6hp) – D program: Recommended elective … • TDDE35 Large-scale Systems (11hp) – U program: Second year course covering computer networking, distributed systems, multicore, embedded systems, and a project • TDTS21 Advance Networking (6p) – Pre-requirement: Introductory networking course; e.g., TDDE35 (U), TDTS04 (IP, C, …), TDTS06 (D, Y, …), TDTS11 (IT) • Thesis opportunities – Companies often have projects – I have research projects (on these and related topics, including novel multimedia streaming solutions, cloud, IoT, data analytics/mining, network security, social networking, …)

  42. Extra slides …

  43. FTP: Commands and Responses

  44. Socket Programming

  45. Socket Programming

  46. Socket Programming with UDP • UDP: no “connection” between client & server – no handshaking before sending data – sender explicitly attaches IP destination address and port # to each packet – rcvr extracts sender IP address and port# from received packet • UDP: transmitted data may be lost or received out-of-order • Application viewpoint: – UDP provides unreliable transfer of groups of bytes (“datagrams”) between client and server

  47. Client/Server Socket Interaction: UDP Address family: IPv4, Socket type: datagrams UDP

  48. Example App: UDP Client

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend