Splash: How the Internet Works
In this class we talked about how the Internet works. Specifically, we discussed Internet Protocol (IP) and Tranmission Control Protocol (TCP) and I demonstrated some tools that let you explore these networks.
Below you'll find a listing of some of the tools and resources we used.
Internet Protocol (IP)
IP addresses allow any computer on the Internet to refer to any other computer on the internet.
You can explore the IP network using these tools:
The ping command tells you how long it takes packets to get to a remote host and back. Use ping like this:
$ ping www.google.com
Above, the $ refers to your shell prompt. To get to a "shell", open the "Terminal" application on a Mac, or open the "Command Prompt" on Windows.
The traceroute command (tracert on Windows) tells you the IP addresses (and sometimes hostnames) of all routers between you and a remote host. Use traceroute like this:
$ traceroute bbc.co.uk
In addition to ping and traceroute, these websites are useful for IP exploration:
Transmission Control Protocol (TCP)
TCP allows computers to communicate data streams across the Internet. Almost all Internet services you use, including the web, email, and IM, use TCP.
You can use these tools and resources to explore TCP:
The telnet command opens a TCP connection to a specified server and port. Common ports include port 80 for web traffic, port 25 for SMTP (outgoing email) traffic, and port 110 for POP3 (incoming email) traffic. Use telnet like this:
$ telnet www.google.com 80
Now you can send an HTTP request to www.google.com. The most basic HTTP request looks something like this:
GET / HTTP/1.1
A fun host to connect to via telnet is:
$ telnet towel.blinkenlights.nl
The Wireshark program lets you get a listing of all internet traffic traversing your local network. Use this with caution.
The nmap program lets you scan a remote host to see which ports are open. That gives you a good indication of what servers are running on that host.
If you have any other questions, drop me a line at firstname.lastname@example.org.