- Last Updated: 08/10/2018
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¶
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:
In this example, 192.168.1.1 is the IP Address and /24 is the subnet mask.
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 abreviated 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.
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.
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 leftand the netmask on the right.