1 / 57

CS 145A Implementation Issues

CS 145A Implementation Issues. Netlab.caltech.edu/course. Topics of this thread. How does the TCP/IP work? (roughly) (Very) Simple & basic tools on network engineering Design and implementation of protocols. Mail lists. CS145class.cs.caltech.edu CS145ta.cs.caltech.edu. Today.

judah-weber
Download Presentation

CS 145A Implementation Issues

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. CS 145AImplementation Issues Netlab.caltech.edu/course

  2. Topics of this thread • How does the TCP/IP work? (roughly) • (Very) Simple & basic tools on network engineering • Design and implementation of protocols

  3. Mail lists • CS145class.cs.caltech.edu • CS145ta.cs.caltech.edu

  4. Today • The topology of Internet • Naming • Packet transmission • Stream Connection

  5. What does the Internet look like? • Example: (/sbin/traceroute) C:\>tracert cwis.usc.edu Tracing route to cwis.usc.edu [128.125.253.146] 1 <1 ms Jorgensen-RSM-44.caltech.edu [131.215.44.253] 2 <1 ms Booth-border.ilan.caltech.edu [131.215.254.254] 3 <1 ms CalREN-Caltech.caltech.edu [192.41.208.49] 4 <1 ms JPL--CIT.POS.calren2.net [198.32.248.5] 5 1 ms UCLA--JPL.POS.calren2.net [198.32.248.1] 6 1 ms ISI--UCLA.POS.calren2.net [198.32.248.29] 7 2 ms USC--ISI.POS.calren2.net [198.32.248.25] 8 3 ms rtr43-c2-gw.usc.edu [128.125.251.66] 9 2 ms rtr-gw-1.usc.edu [128.125.254.1] 10 2 ms cwis.usc.edu [128.125.253.146]

  6. Topology of the Network

  7. Global Network (From Quest)

  8. Get your “IDs” on-line • Example: (/sbin/ifconfig) C:\>ipconfig –all Physical Address. . . . . . . . . : 00-10-A4-79-F0-32 IP Address. . . . . . . . . . . . : 131.215.44.214 Subnet Mask . . . . . . . . . . . : 255.255.255.0

  9. Use of the IDs

  10. The Journey of a packet (1)131.215.44.214

  11. The Journey of a packet (1)131.215.44.214

  12. The Journey of a packet (1)131.215.44.214

  13. The Journey of a packet (1)131.215.44.214

  14. The Journey of a packet (1)131.215.44.214

  15. The Journey of a packet (1)131.215.44.214->131.215.44.253

  16. The Journey of a packet (2)131.215.44.253

  17. The Journey of a packet (2)131.215.44.253

  18. The Journey of a packet (2)131.215.44.253

  19. The Journey of a packet (2) 131.215.44.253

  20. The Journey of a packet (2) 131.215.44.253

  21. The Journey of a packet (2) 131.215.44.253

  22. The Journey of a packet (2)131.215.44.253->131.215.254.254

  23. The Journey of a packet (n) 128.125.254.1->128.125.253.146

  24. The Journey of a packet (n) 128.125.253.146

  25. The Journey of a packet (n) 128.125.253.146

  26. The Journey of a packet (n) 128.125.253.146

  27. The Journey of a packet (n) 128.125.253.146

  28. The Journey of a packet (n) 128.125.253.146

  29. Overview

  30. Necessary Information (1) • Where shall I pass the packet, for a given destination IP address? – Routing Table • Exmaple: [weixl@orchestra:~]> route

  31. Necessary Information (2) • Where shall I pass the packet, for a given destination IP address? -- Arp • Exmaple: [weixl@orchestra:~]> arp -a 131.215.44.227 at 00:06:5B:DE:C5:72 on eth0 131.215.44.142 at 00:60:B0:7C:E8:02 on eth0 131.215.44.113 at 00:A0:C9:5A:26:6D on eth0 131.215.44.80 at 00:E0:81:02:7F:7B on eth0 131.215.44.254 at 00:00:0C:07:AC:01 on eth0 131.215.44.253 at 00:90:6D:E7:D4:00 on eth0 131.215.44.12 at 00:20:78:1B:13:2C on eth0 131.215.44.14 at 00:A0:C9:06:2F:2A on eth0

  32. More Information (Bonus) • Get your phone book (Domain Name Service). • Example: [weixl@orchestra:~]> ping login.cs.caltech.edu PING orchestra.cs.caltech.edu (131.215.44.20) from 131.215.44.20 : 56(84) bytes of data. [weixl@orchestra:~]> freebsd-login.cs.caltech.edu (131.215.44.14) • API: gethostbyname()

  33. How does DNS work? www.mit.edu? 18.181.0.31

  34. Connection

  35. Streamless Connection

  36. Stream Connection

  37. Stream Connection • An Example: At: 1-626-395-3555 Call: DMV • Prerequisite: • You know the number of DMV (1-800-777-0133) • The service is now open at DMV. • There is a link between the two phones.

  38. Steps at your site: Establish the phone Dial the number Select the service Talk Hang up Steps at DMV: Establish the phone Establish the service on phone Accept your request Talk Hang Up Stream Connection • An Example: At: 1-626-395-3555 Call: DMV

  39. Stream Connection Steps at your site: • Establish the phone • Dial the number • Select the service • Talk to the representative • Hang up Steps at DMV: • Establish the phone • Establish the service on phone • Accept your request • Talk to you • Hang Up

  40. Steps at client’s site: Establish the socket Dial the number Select the service Talk to the representative Hang up Steps at server’s site: Establish the socket Establish the service Accept your request Talk to you Hang Up Stream Connection Steps at your site: • Establish the phone • Dial the number • Select the service • Talk to the representative • Hang up Steps at DMV: • Establish the phone • Establish the service on phone • Accept your request • Talk to you • Hang Up

  41. Steps at client’s site: Establish the socket Dial the number Select the service Talk to the representative Hang up Steps at server’s site: Establish the socket Bind socket to port & Listen Accept your request Talk to you Hang Up Stream Connection Steps at client’s site: • Establish the socket • Dial the number • Select the service • Talk to the representative • Hang up Steps at server’s site: • Establish the socket • Establish the service on phone • Accept your request • Talk to you • Hang Up

  42. Steps at client’s site: Establish the socket connect the address ( IP + port ) Talk to the representative Hang up Steps at server’s site: Establish the socket Bind socket to a port & Listen Accept your request Talk to you Hang Up Stream Connection Steps at client’s site: • Establish the socket • Dial the number • Select the service • Talk to the representative • Hang up Steps at server’s site: • Establish the socket • Bind socket to a port & Listen • Accept your request • Talk to you • Hang Up

  43. Steps at client’s site: Establish the socket connect the address ( IP + port ) Talk Hang up Steps at server’s site: Establish the socket Bind socket to a port & Listen Accept the request from client Talk to you Hang Up Stream Connection Steps at client’s site: • Establish the socket • connect the address ( IP + port ) • Talk to the representative • Hang up Steps at server’s site: • Establish the socket • Bind socket to a port & Listen • Accept your request • Talk to you • Hang Up

  44. Steps at client’s site: Establish the socket connect the address ( IP + port ) Send/Receive Data Hang up Steps at server’s site: Establish the socket Bind socket to a port & Listen Accept the request from client Send/Receive Data Hang Up Stream Connection Steps at client’s site: • Establish the socket • connect the address ( IP + port ) • Talk • Hang up Steps at server’s site: • Establish the socket • Bind socket to a port & Listen • Accept the request from client • Talk to you • Hang Up

  45. Steps at client’s site: Establish the socket connect the address ( IP + port ) Send/Receive Data Hang up Steps at server’s site: Establish the socket Bind socket to a port & Listen Accept the request from client Send/Receive Data Hang Up Stream Connection Steps at client’s site: • Establish the socket • connect the address ( IP + port ) • Send/Receive Data • Hang up Steps at server’s site: • Establish the socket • Bind socket to a port & Listen • Accept the request from client • Send/Receive Data • Hang Up

  46. Insight (from LinuxForum)

  47. CS 145A Lab 1Connection Netlab.caltech.edu/course

  48. How to establish a connection? • UDP Steps at client’s site: • Establish the socket • Send Data to the address ( IP + port ) • Close the socket Steps at server’s site: • Establish the socket • Bind socket to a port • Receive Data • Close the socket

  49. How to establish a connection? • TCP Steps at client’s site: • Establish the socket • connect the address ( IP + port ) • Send/Receive Data • Close the socket Steps at server’s site: • Establish the socket • Bind socket to a port & Listen • Accept the request from client and create a new socket for communication • Send/Receive Data on the new socket • Close the socket

  50. Tasks for Lab 1 • Be familiar with the basic commands that we talked about in class (see those examples in the lecture). • Write a program (“server”) that can act as a Server • Write a program (“udp client”) that can send UDP packets • Write a program (“tcp client”) that can send TCP packets

More Related