Networks and the Internet It’s dangerous to go alone! The internet is between you and a server. 137.112.146.189 (Charles) Rose’s server The Internet Wikipedia server DNS 208.80.152.201 Wikipedia The DNS server • I want to say hi to wikipedia.org. • I ask my dns server: • What is the address of wikipedia.org? • Tell 137.112.146.189 • The DNS server gets my packet, and looks up “wikipedia.org” – It finds an entry in its log: • Wikipedia.org ->208.80.152.201 • The DNS server tells me • Wikipedia.org is 208.80.152.201 Crafting a packet. • I want to ask wikipedia for its main page. That is, tell wikipedia’s server to – Get /main_page.html, send it to me. • I craft a packet: – Tell 208.80.152.201 • Get /main_page.html • Send it to 137.112.146.189 • I release that packet to the internet. Rose Wikipedia traceroute wikipedia.org traceroute to wikipedia.org (208.80.152.201), 30 hops max, 60 byte packets 1 137.112.146.1 (137.112.146.1) 3.968 ms // Skinner switch 2 137.112.9.35 (137.112.9.35) 0.566 ms //Rose’s router. 3 ip-64-184-0-181.indianafiber.net (64.184.0.181) 3.297 ms //Rose-internet 4 xe-10-3-0.bar2.Cincinnati1.Level3.net (4.59.42.17) 5.361 ms 5 ae-7-7.ebr2.Atlanta2.Level3.net (4.69.136.218) 18.507 ms 6 ae-2-2.ebr2.Miami1.Level3.net (4.69.140.141) 31.373 ms 7 ae-1-100.ebr1.Miami1.Level3.net (4.69.151.253) 30.734 ms The 8 ae-3-5.bar1.Tampa1.Level3.net (4.69.148.214) 36.790 ms internet 9 ae-5-5.car1.Tampa1.Level3.net (4.69.133.13) 36.164 ms 10 ae-13-13.car3.Tampa1.Level3.net (4.69.133.18) 36.536 ms 11 level3.co1.as30217.net (4.71.0.14) 36.482 ms 12 te3-4.co2.as30217.net (84.40.24.50) 40.225 ms //Wikipedia-internet 13 10ge5-1.csw5-pmtpa.wikimedia.org (84.40.25.102) 42.481 ms //Wikipedia router. 14 wikipedia-lb.pmtpa.wikimedia.org (208.80.152.201) 36.569 ms //Wikipedia server Date: Nov 22 2003 Asia Pacific - Red Unknown - White North America - Blue RFC1918 IP Addresses - Cyan Latin American and Caribbean - Yellow Europe/Middle East/Central Asia/Africa - Green http://www.opte.org/maps/ Wikipedia gets my packet. • Wikipedia’s server gets my packet. • It reads my request, and crafts a return packet: – Tell 137.112.146.189 • The content of /main_page.html is: • It sends that packet to the internet. • The internet gives me that packet. The internet doesn’t always work. • The internet is like the postal service. – It tries to get your packets to their destination as fast as possible. – If one server is down, it can use another. • It also has some bad things. – Someone can sniff your packets. Securing their contents is your job. – Packets are guaranteed to arrive at least zero times. A discussion with Wikipedia • Loading Wikipedia’s welcome page is a conversation of nearly 200 packets. • DNS resolution: 6 packets. • Saying “Hi” to Wikipedia: 9 packets. • Wikipedia saying “Hi” back: 1 packet. • Me telling Wikipedia I heard it say hi: 1 packet. • Me requesting the front page: 1 packet • Both sides agreeing on sending content: 20 packets • Data transmission (and acknowledgement): 150 packets. Server-side view 192.168.1.100 - - [01/Jan/2012:18:51:47 -0500] "GET / HTTP/1.0" 200 44 127.0.0.1 - - [01/Jan/2012:19:04:40 -0500] "GET / HTTP/1.0" 200 44 127.0.0.1 - - [01/Jan/2012:19:05:37 -0500] "GET / HTTP/1.0" 200 44 192.168.1.100 - - [01/Jan/2012:19:06:24 -0500] "GET / HTTP/1.0" 200 44 192.168.1.100 - - [01/Jan/2012:19:08:54 -0500] "GET /.htaccess HTTP/1.0" 403 211 192.168.1.100 - - [01/Jan/2012:19:09:13 -0500] "GET /hmm HTTP/1.0" 404 201 192.168.1.100 - - [01/Jan/2012:19:10:15 -0500] "GET / HTTP/1.0" 200 52 137.112.120.201 - - [02/Jan/2012:22:20:11 -0500] "GET / HTTP/1.1" 200 52 137.112.120.201 - - [02/Jan/2012:22:20:11 -0500] "GET /favicon.ico HTTP/1.1" 404 209 137.112.146.135 - - [02/Jan/2012:23:07:30 -0500] "GET / HTTP/1.1" 200 52 137.112.146.135 - - [02/Jan/2012:23:07:30 -0500] "GET /favicon.ico HTTP/1.1" 404 209 114.205.1.94 - - [02/Jan/2012:23:22:59 -0500] "GET /vhosts/ehcp/?op=applyfordomainaccount HTTP/1.1" 404 210 114.205.1.94 - - [02/Jan/2012:23:23:00 -0500] "GET /ehcp/?op=applyfordomainaccount HTTP/1.1" 404 203 137.112.146.135 - - [03/Jan/2012:01:52:38 -0500] "GET /favicon.ico HTTP/1.1" 404 209 //Here, I blocked access to the server to everyone. 137.112.146.135 - - [03/Jan/2012:01:53:19 -0500] "GET / HTTP/1.1" 403 202 137.112.146.135 - - [03/Jan/2012:01:53:19 -0500] "GET /favicon.ico HTTP/1.1" 403 213 137.112.146.135 - - [03/Jan/2012:01:53:20 -0500] "GET / HTTP/1.1" 403 202 137.112.146.135 - - [03/Jan/2012:01:53:20 -0500] "GET /favicon.ico HTTP/1.1" 403 213 208.25.216.194 - - [03/Jan/2012:12:15:13 -0500] "HEAD / HTTP/1.0" 403 107.22.72.52 - - [03/Jan/2012:13:25:27 -0500] "HEAD / HTTP/1.0" 403 81.201.60.168 - - [03/Jan/2012:22:57:00 -0500] "GET / HTTP/1.0" 403 202 1xx codes: Informational Uncommon. 2x codes: Success 200: OK 3xx codes: Redirect 301: permanent 304: not modified 4xx Client error 403: forbidden 404: not found 5xx: Server error 500: server broken 501: not implemented 503: server down Credits • Map of IPv4 address space: http://xkcd.com/195/ • Level3 network: http://www.hcwt.com/level3.php?search_wh at=level3 • Internet map http://opte.org/maps/