Introduction to IP Addressing

IP Addresses

An IP Address is similar to what it sounds like: an address. It gives a location for your computer to be accessed at and is what other computers use to locate where your system is. You use your address whenever you request data from somewhere as a place to send that data. You also get that data from a server that has an IP address. Everything that has internet access has an IP address, making them crucial to the Internet’s success.

Function of an IP Address

IP Addresses perform the function of having a location that packets are sent to and from over the Internet. Sending an address from your computer to a server elsewhere is commonly done in the form or a request. The request is sent to ask the server for data and includes both your and the server’s IP address. The server then generally responds by beginning to send data at the client via their IP address. This is how web pages work, for example. Anytime you download something off the internet, you use your IP address. They also have other useful features, such as your location can be found from your IP address.

Parts of a Full IP Address

Note: Any text in this
fonts
or
fonts
means that this is what you’ll see in a terminal.
An IP Address has two main parts: the physical IP Address and the subnet mask. They each define different parts of the IP for different reasons. Actual full IP Addresses are written one of two ways:
192.168.1.1/24
In this example, 192.168.1.1 is the IP Address and /24 is the subnet mask.
OR
192.168.1.1 255.255.255.0
In this example, 192.168.1.1 is the IP Address and 255.255.255.0 is the subnet mask. Essentially, you always have an IP typed out while you don’t always have a subnet mask. Subnet masks can be abbreviated with “/” notation.

Public vs. Private IPs

The majority of IP Addresses are what are known as public IPs. These addresses form the majority of addresses that computers in different places use the access each other. Some of these addresses, though, are reserved for other uses inside of a network. For example, addresses between 172.16.0.0 and 172.31.255.255 are all considered local IPs. The other major groups are between 192.168.0.0 and 192.168.255.255 and 10.0.0.0 and 10.255.255.255. These are reserved for what is called private IPs.
A private IP is a address that is reserved for local use inside of a network. In all the labs for this class, you will use numbers in this range to define your IP addresses. They exist only inside of a private network. For instance, your network may have an IP address that reaches out to get your packets, but your computer may only have a private IP address that the server routes the packets two. That server acts as a gate with both a private and public IP where neither can exist on each other’s side.
Private IPs are useful because they allow the use of similar IP schemes across many different LANs. Two totally different business can use the same internal IP scheme but not run into a conflict. They don’t run into a conflict because of NAT (Network Address Translation). NAT takes a private IP and translates it to a public one, so when your request goes to Google, for instance, Google sends it back to your router’s public IP. Your router then translates that back to your private IP.

Subnet Masks

The second part of an ip address, a subnet mask, is used to define the number of subnetworks in a network. The most common address is 255.255.255.0, which stands for all the addresses between x.x.x.0 and x.x.x.255.
We use subnet masks to differentiate between multiple different networks. For instance, we might have one network for the sales department as 172.30.60.0/24 and one for engineering as 172.30.70.0/24. These difference in IPs allows the firewall to differentiate between the two networks.

Prefixes

Subnet masks aren’t normally, typed out. In the beginning of this document you saw an example of this when we said that /24 is the same thing as 255.255.255.0. Each subnet mask has a prefix that can be used to shorten typing the whole thing. A chart can be found below with the prefix (or CIDR NAME) on the left and the netmask on the right.