What Do Different Types of LAN IP Addresses Represent?

What Do Different Types of LAN IP Addresses Represent?

When you start learning about IP addresses, it may be a bit confusing at first when it comes to knowing what specific addresses represent and why they do so. With that in mind, today’s SuperUser Q&A post helps a curious reader learn more about IP addresses.

Today’s Question & Answer session comes to us courtesy of SuperUser a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

Image courtesy of CLUC (Flickr).

The Question

SuperUser reader Flare Cat wants to know what different types of LAN IP addresses represent?:

I have seen LAN IP addresses in the following ways/forms:
10.0.0.*
192.168.0.*
192.168.1.*
192.168.2.*
127.0.0.* (this one usually ends with a 1 and I am not sure if it is a LAN address or not, since I normally see it with proxy stuff)

Why are there different forms of LAN IP addresses and what do they represent (mean)?

What do different types of LAN IP addresses represent??
The Answer

SuperUser contributor Abraxas has the answer for us:

There are many questions that deal with this, but here is a crash course on what are called Private IP Addresses, as defined in RFC 1918.

IP addresses were broken up into what are called classes as seen here. This is no longer used (replaced with Classless Inter-Domain Routing, or CIDR for short), but may help in understanding different sizes of networks:

There are a couple of basic distinctions regarding addresses. You have what are called networks, network addresses, public addresses, private addresses, and subnets.

In short, your computer gets an IP address which resides in a particular IP network. Your computer’s IP address and your network’s address (usually defined in your local router) are private addresses. Private addresses differ from public addresses in that private addresses are not assigned to public networks. For instance, if you ping google.com, you will receive a response from the public address which google.com resolves to. That is a public address. There are some networks which are “special” and do not get assigned publicly; they are called private IP addresses. For more information, read here: What is a Private IP Address?

Here is a list of the private network ranges:

The easiest way, I think, to visualize this is to imagine the following. Your Internet service provider gives you a single IP address, “50.100.101.154”, for example. This is plugged into the modem/router for your home and is the public interface’s IP address. However, you have more than one device you want on your network, so what your modem/router does is it creates an “internal” network. Say it picks the number “192.168.1.0” for the network and it is a standard netmask (read related links to find out more).

This means that you can plug in devices inside of your router and give them any IP address which fits this pattern: “192.168.1.1-254”. The last octet (space after the last period) is your “available range” of host IP addresses. There are some special IP addresses (network addresses, broadcast addresses, etc.), but if you do not use a “0” or a “255”, you will be fine in most cases.

So, the short answer is, “10.x.x.x, 192.168.x.x, and 172.16-31.x.x” are all IP addresses that you can use in your own home network which will never conflict with public IP addresses. This is important for the following reason:

When you try to go to a website, say google.com, and your browser contacts a DNS server on the Internet and says ‘Where is google.com?’, it gets a response back in the form of an IP address. The response is basically, “If you want to get to google.com, then go to 8.8.8.8.” Your browser then sends a request to “8.8.8.8” and loads whatever page is there.

What if you used “8.8.8.8” for an IP address in your home network? Well, you might have an issue because your router may say, “I know where 8.8.8.8 is, it is right over there!” and then you end up losing access to google.com because you cannot get out of your network and resolve the correct “8.8.8.8” address. Since private IP address ranges are designated for private use only, public websites should never use them and therefore you should never look up a website address (outside of your LAN) which points to one of them.

“127.0.0.1” is a special type of address called your “localhost” address (I will not go in to it here). It does cover the whole 127 range: “127.0.0.0 – 127.255.255.255”. Think of it as a way to give a device its own IP address without anyone or anything else being able to do things with that address.

Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.
Previous Post Next Post