Week 10 — The Internet

This week's topic is the Internet: what it is and how it works.

Evaluation

Up to 10 points can be gained towards your final score by completing the in-class quiz on Friday.

What you will learn from this class

Preparation

This week's preparation is to watch some short videos about networks and the Internet.

Introduction

Begin by watching four short videos (averaging about 5.5 minutes each) on YouTube. These videos present an easy introduction to the topic. They also have very good captions in Japanese. To turn the captions on, click the “Subtitles/Captions” button at the bottom-right of the video window. Next to that button is a “settings” button (it looks like a cog wheel) where you can change the captions to your preferred language.

1. What is the Internet? (3.5 minutes)

https://www.youtube.com/watch?v=Dxcc6ycZ73M&list=PLzdnOPI1iJNfMRZm5DDxco3UdsFegvuB7&index=1

2. Wires, cables, and WiFi (6.5 minutes)

https://www.youtube.com/watch?v=ZhEf7e4kopM&list=PLzdnOPI1iJNfMRZm5DDxco3UdsFegvuB7&index=2

3. IP addresses and DNS (6.5 minutes)

https://www.youtube.com/watch?v=5o8CwafCxnU&list=PLzdnOPI1iJNfMRZm5DDxco3UdsFegvuB7&index=3

4. Packets, routing, and reliability (6 minutes)

https://www.youtube.com/watch?v=AYdF7b3nMto

If you do not understand some word or phrase then pause the video and use Google, Wikipedia, or even YouTube to find a brief explanation online. If the explanation does not help (has too much or too little information, or is badly written) move rapidly on to a different explanation. If you cannot find any explanation that makes sense, ask on Teams for recommendations.

Technical details

Deepen your knowledge ideas by watching the following videos. The total time is about 25 minutes. Use the summaries below to make sure you understood the important ideas presented in each video.

1. NICs (3.5 minutes)

https://www.youtube.com/watch?v=oo-tn17rUBo

Network Interface Cards (NICs) connect computers, printers, and other devices to a network. A single device can have multiple connections to one or more networks. NICs can have connectors for electrical “copper” Ethernet wires (RJ45) or light “optical fibre” (SFP, Small Form-factor Pluggable). Every NIC has a unique, hard-coded (cannot be changed) Media Access Control address. This address is used to identify pairs of NICs that are communicating directly with each other on a local area network (LAN).

2. Local area network devices (7 minutes)

https://www.youtube.com/watch?v=1z0ULvg_pW8

A hub connects all devices on a network together. A hub is not intelligent: it copies every packet received to all the other connected devices. This creates unnecessary traffic and wastes bandwidth.

A switch is intelligent: it learns the physical (MAC) addresses of all the devices connected to it. A switch sends received packets only to the intended destination device. Switches reduce unnecessary traffic on the network. Hubs and switches form a local area network (LAN) and communication is always direct between to devices based on MAC addresses.

A router communicates both with a LAN and with another external “wide area” network (WAN), usually the Internet. The Internet uses IP (Internet Protocol) addresses. When a router receives a packet the IP address determines if the packet is meant for the LAN or WAN. If the packet is meant for the LAN it is delivered directly to a local device. If the packet is meant for WAN it is forwarded directly to another router connected to another LAN. Routers are a kind of gateway for each LAN. The Internet is made of many routers connected together. Hubs and switches create networks, routers connect networks together (as an interconnected network = an internet).

3. Breaking data into packets (5 minutes)

https://www.youtube.com/watch?v=oj7A2YDgIWE

Networks are connected together to make the Internet. Billions of devices are connected to the Internet. To get data from one part of the world to another we need to package the data and then send it through many routers to its destination. Before it is transmitted over the network, large data is chopped into smaller pieces called PACKETS. Each is sent individually along with information about how to reconstruct the original data. The destination of a packet is indicated by an IP address. Each router understands how to forward a packet to the next router, one step or “hop” closer to the final destination. When the destination router is reached, the data is sent to the local device that should receive it. The device reassembles the original data which is then presented to the user.

4. Naming and DNS: the Domain Name Service (6 minutes)

https://www.youtube.com/watch?v=mpQZVYPuDGU

Computers are identified by numbers, but humans like to use names instead of numbers. To make communication easier, the domain name system (DNS) resolves (translates) domain names to numbers that are IP addresses. You can use the Internet with IP addresses if you like, but using names is much easier. DNS works like a telephone directory: before calling a remote telephone you look up the number based on the name of the person you want to reach. To turn a domain name into an IP address number, your local “resolver” (usually your router) first asks a root server. Your resolver is then sent to a series of other servers, each one closer to “yahoo.com”. Finally it asks the name server owned by Yahoo about “yahoo.com” which provides an authoritative answer.

E.g., to turn “yahoo.com” into an IP address:

5. Communication protocols: TCP vs UDP (4 minutes)

https://www.youtube.com/watch?v=uwoD5YsGACg

TCP (transmission control protocol) is one of the main protocols used on the Internet. TCP guarantees that all transmitted data is received, in the correct order. First a connection is established between two computers that want to communicate. This “synchronises” the communication (using “SYN” packets) so the computers know what packets have been sent and received. Data is then transferred between the computers. The receiver tells the sender about missing packets, which are re-transmitted. The receiver sorts received packets into their original order, reassembles the data inside them, and delivers it to the local application.

Typical uses of TCP:

UDP is a connectionless protocol. There is no initial connection, no synchronisation between sender and receiver, and therefore no guarantee of reliability. UDP does not care (or even know) if data is lost or if it arrives out of order at the destination. Because of lower overheads (no synchronisation, retransmission, reordering) UDP is faster than TCP.

Typical uses of UDP:

6. Networking tools (4.5 minutes)

https://www.youtube.com/watch?v=vJV-GBZ6PeM

The ping command sends packets from one computer to another requesting a simple “I am here” reply. Use it to detect router errors (“destination host unreachable”), DNS naming errors, etc.

The traceroute (tracert on Windows) shows the route a packet takes through the Internet to reach another machine. Use it to pinpoint where a problem lies if packets do not reach their destination.

Background information

Watch these videos if you would like additional information.

1. How does the Internet work? Networks and addresses explained (10 minutes)

An alternative explanation of how the Internet works: https://www.youtube.com/watch?v=82m2du-zgmY

2. The Internet vs. The Web (5 minutes)

A brief history of why and how the Internet was created: https://www.youtube.com/watch?v=CX_HyY3kbZw

3. Network troubleshooting using PING, TRACERT, IPCONFIG, and NSLOOKUP (14.5 minutes)

More networking tools (ifconfig, nslookup): https://www.youtube.com/watch?v=AimCNTzDlVo

Note: The “traceroute” and “ifconfig” commands are called “tracert” and “ipconfig” on Windows. If you have MacOS or Linux, “traceroute” and “ifconfig” work similarly to the commands described in this video.