Showing posts with label internet. Show all posts
Showing posts with label internet. Show all posts

Thursday, March 10, 2011

IP Addresses are Endpoints of Net Links, NOT Number Names of Machines!

Today's 6.033 routing lecture was awesome!

There are forwarding tables and routing tables. Routing tables map destination to all possible paths. Then forwarding tables can be constructed by picking the best path to each destination.
$ route

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.16.197.0    *               255.255.255.0   U     0      0        0 vmnet8
172.16.76.0     *               255.255.255.0   U     0      0        0 vmnet1
128.31.32.0     *               255.255.252.0   U     2      0        0 wlan0
link-local      *               255.255.0.0     U     1000   0        0 wlan0
default         guest-wireless. 0.0.0.0         UG    0      0        0 wlan0


I also learned about AS's -- Autonomous Systems for BGP routing. Every ISP has an AS. Multiple IP address prefixes can be mapped to an AS. For example, MIT's AS is 3, and 18.0.0.0/8 and 128.30.0.0/15 map to it (the 0's mean it could be anything).

Then we learned about Tier 1 and Tier 2 networks. There are only 10ish tier 1 networks and they make a complete graph. The tier 2 networks have to pay tier 1 for transit links (tier 2 using a tier 1 as a router). There are free peering links that tier 2 networks can set up among themselves for free.  There are also customer links connected to tier 2 for people buying that tier 2's service.

Every router may have many IP addresses, because it has different links/edges, and each IP address represent that router's end of the link/edge.  So an IP address does not represent a machine, but represent endpoints of net links.

Ping and Traceroute for internet

From the 6.033 assignment on "Internet Routes and Measuring Round Trip Times," I learned to use ping, which sends ICMP (similar to IP) request packets, for example: ping -c 10 -s 56 www.csail.mit.edu


But ping doesn't work for www.microsoft.com and some other sites, because they block ICMP due to security reasons. But most sites don't block ICMP because, ICMP is way, way more than "traceroute" and "ping." It is used for feedback when you run a DNS server (port unreachable) which, in a modern DNS server, may actually help select a different machine to query faster. (source)

Then we used traceroute, which prints the route packets trace to network host. According to its man page, It utilizes the IP protocol's time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.