Introduction to Networking

What Is The Internet?

In the broadest terms, people often view the Internet as a cloud. You put your data in one place, and it comes out the place you want it to on the other side, with what happens inbetween obscured in the fog.

In reality the internet is tens of thousands kilometers of fiber optic cable, hundreds of thousands to millions of kilometers of copper wire, and hardware and software connecting them all together in a redundant, fast, and self-sufficient network. But not to worry, it’s not that bad: you only have to worry about a very small portion of the network, you can let someone else worry about the rest.

A Metaphor For The Internet

Important

The information from this section is reused throughout the rest of the course.

Because the internet feels like smoke and mirrors to a lot of people, a concrete physical metaphor could be very helpful in explaining both the parts of the internet and how it all comes together.

The best metaphor to use is how good old fashion snail mail is transferred around and the network of roads crossing the country.

Let’s start with a building. Buildings can be described in two different ways. They have a physical description, “The Arlington Career Center is a two story cement building of the Brutalist architectural style with a circular driveway in front of its main entrance.” This is a description that is fixed and (fairly) hard to change. On the internet, this would be your computers MAC address. Buildings can also be described by the street address assigned to them by their City or County and the US Postal Service, as in 816 South Walter Reed Drive, Arlington, VA 22204.

Your Local US Postal Service is a set of buildings that route letters and packages between different post offices. Letters and packages go into one Post Office and get routed from that office to a distribution center. The distribution center then sends them to another major distribution center and so on until it reaches the distribution center that serves the remote Post Office nearest its destination. They are then sent to the remote Post Office serving the zip code of the destination address from where they are delivered to their destination.

The address of the building is very much like an IP address you’d have assigned to you by who you pay to get on the internet. The streets and surrounding neighborhood you’re in could be considered a local area network, where each house has it’s own address, and they’re all connected. The State and City or County is your ISP, most ISPs have a local branch that’s for your region, which could be related to your city/county, the full ISP is the State, and the Internet is a country.

A Working Metaphor for the Internet

  • House - (address vs. physical description)
  • Local Streets / Neighborhood - LAN
  • State, City/County - ISP, local division of ISP
  • Country - Internet
  • Major Roads (US routes / Bigger State Routes) - Internet Connectivity
  • Highways - Internet Backbones
  • Post Office - Router (GET Picture of 495/395/95)
  • Intersection - Hub
  • Highway Intersection (Mixing Bowl) - Switch

The TCP/IP Model

The TCP/IP Model is a specification for computer network protocls. TCP/IP defines a set of rules to enable computers to communicate over a network. It specifies how data should be formatted, addressed, shipped, routed and delivered to the right destination.

TCP/IP describes the top 4 layers of a 5 layer Internet protocol stack.

The first layer is called the Physical layer. This layer is responsible for encoding and transmitting data over network communications media. It operates with data in the form of bits which are sent from the Physical layer of the sending source and received at the Physical layer of a destination source. When you hook up a computer using an Ethernet cable you are connecting that computer on the Physical layer. This Physical layer is the lowest level of the TCP/IP Model.

The next layer is the Data link layer. This layer is used to move packets from the network layer on two different hosts. The process of transmitting packets on a link layer can be controlled in the software device driver for the network card and on firmware. Different protcols are used for different types of networks. Broadband Internet access uses PPPoE as the protocol. For a local wired network, Ethernet is used. For local wireless network, IEEE 802.11 is used.

The next layer is the Network or Internet layer. This layers gets data from a source network to the destination network. This generally involves routing the packets across a network of networks (also known as internetwork). This is where IP (Internet Protocol) comes in. IP performs the basic task of getting packets of data from source to destination.

The next layer is the Transport layer. The transport layer’s responsibility is end-to-end message transfer. There are 2 categories of end-to-end message transmission: connection-oriented (TCP) or connectionless (UDP). The transport layer provides this service of connecting applications together through the use of ports. This layer offers reliability and error control.

The fifth and final layer is the Application layer. This layer refers to higher-level protocols used by most applications for network communication. An example of application layer protocol is FTP (File Transfer Protocol). Data coded according to application layer protocols are then encapsulated into one or more transport layer protocols which in turn use lower layer protocols to effect actual data transfer.

Introduction To Network Addressing

Binary

For people who have never encountered binary, it can seem a little bit intimidating. It really isn’t that bad, trust me. Most people learn math in base 10 in elementary school and learn it through a system that looks something like this (where H is hundreds, T is tens, and O is ones):

H T O
1 8 5

Mathematically those columns look something like this:

102 101 100
1 8 5

So:

1 · 102 + 8 · 101 + 5 · 100 = 185

Right? If the number in the ones column is more than ten, you simply carry the number over to the number over to the next column like this: if you have 13 in the ones column you move the 10 into the tens column and leave the 3 in the ones column. The concept is very similar in base 2. The biggest difference is that instead of having 10^0, 10^1, and 10^2 you have 2^0, 2^1, and 2^2:

22 21 20

In binary only two numbers are used: 1 and 0, as opposed to the 0-9 in the base ten system. This is because 1 and 0 are the only numbers that will fit in the columns. In order to write the number 5 in binary you need to break the number down. 5 = 4 + 1, both 4 and 1 can be easily converted into base two. 4 = 2^2 and 1 = 2^0, so you put a 1 in the 2^2 and 2^0 columns, and a 0 in any columns between. This results in a chart that looks like this:

22 21 20
1 0 1

So the number 5 in binary is 101.

For your reference:

  • 2^0 = 1
  • 2^1 = 2
  • 2^2 = 4
  • 2^3 = 8
  • 2^4 = 16
  • 2^5 = 32
  • 2^6 = 64
  • 2^7 = 128

Hex

Hexadecimal (otherwise known as hex) is the code that is usually used in web design as each color is assigned a hex code. It usually looks something like this: #66CC99. What do the letters mean? The letters are numbers that are 10 and greater. here’s the chart:

Decimal: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hex: 0 1 2 3 4 5 6 7 8 9 A B C D E F

This next part will be very similar to the binary example above. This time instead of base 2, you’re going to use base 16. So if you do something like this:

162 161 160
2 F A

And then crunch the numbers - 2 \cdot 16^2 + 15 \cdot 16^1 + 10 \cdot
16^0 - we get 762. And no, the 10 and 15 did not show up out of nowhere. Remember that in hex letters equal numbers. 10 = A and 15 = F.

Sometimes there are hex numbers like 235. Without a symbol in front you can’t tell if it’s actually 235, or if it’s 565. Here’s how you can tell the difference: usually there will be either a $ sign, a # sign, or 0x in front of the number. So $235, #235 and 0x235 are the same hexadecimal number.

IP Addresses

An IP address is a number given to a computer (a server or a personal computer) by the ISP. The most commonly used IP address is a 32-bit (4 byte) address. It looks like this in the decimal system: 172.16.0.1 . This number is converted from binary because it tends to be easier for humans to process decimal numbers. In binary the IP address looks something like this: 10101100.00010000.00000000.00000001 - the reason this is a 32-bit address is because in binary there are 32 characters, and it’s 4 bytes because there are 4 groups of 8. These bytes are also called octets.

So what exactly does this number mean?

The first octet defines the class of the network. The class determines how big the address space is for the network… in other words, how many computers can be addressed on the network. A class networks are the largest, and are usually reserved for governments. B class networks are second largest, and are used by ISP’s, corporations, school systems and the like. C class networks are the smallest

A = 0-123 (last 3 octets available for host addressing and subnetting) B = 124- 191 (last 2 octets available for host addressing and subnetting) C = 192 - 223 (last 1 octet available for host addressing and subnetting) D/E = 224 -255 (experimental and testing networks)

EXAMPLE:

If your computer has an address of 158.59.224.135, the address is interpreted as follows: The computer belongs to a class B network, so the first two octets define the network. The last two octets define the specific host on the network, as well as any subnetting.

The first two octets are the IP address assigned by the ISP for all of the computers in that network. The administrator or the user assigns the last two octets to the computer. This means you. If you have a network of, lets say, three computers and your network IP address is 172.16.0.0 you can assign the first computers IP address to be 172.16.0.1 then the second computer’s IP address can be 172.16.0.2, and the third can be 172.16.0.3 . This allows you to keep your network a little more organized.

Give them the IP address of a well-known site as an example.

Important IP addresses

127.0.0.1

  • Private Addresses
    • 10.0.0.1-10.255.255.254 (10.0.0.0/8)
    • 172.16.0.1-172.31.255.254 (172.16.0.0/12)
    • 192.168.0.1-192.168.255.254 (192.168.0.0/16)

Dynamic IP Addresses

Dynamic IP addresses are IP addresses that are not necessarily tied down to one machine. They are usually applied to personal computers and other devices that can be taken on an off a network without worrying about disrupting anything other than being suddenly disconnected while trying to send an e-mail. You will usually find a dynamic IP address on your personal computer.

Static IP Addresses

You are more likely to find a static IP address on a server than on a personal machine. This is because if the IP address to a server changes it will disrupt the ability of users to access the site (or sites) hosted on that server.

Domain Name System

The Domain Name System (DNS) associates various information with domain names. It serves as the phone book for the Internet by translating human-readable computer hostnames (ex: www.openbookproject.net) into IP addresses (ex: 152.19.134.41) which networking equipment needs to deliver information. DNS also stores other information such as the list of mail servers. DNS is an essential component of the Internet we use.

DNS makes it possible to assign Internet names to organizations independent of the physical routing hierarchy represented by the numerical IP address. DNS distributes the responsibility for assigning domain names and mapping them to IP networks by allowing an authoritative name server for each domain to keep track of its own changes, avoiding the need for a central register to be continually consulted and updated.

Exercises

Worksheets