What is an IP address, subnet, and gateway?

636 views

Please ELI5.

In: Technology

8 Answers

Anonymous 0 Comments

IP address is the unique number associated with one connection to the Internet – like the address on your house is the unique number associated with your home’s place on earth.

The gateway is the address you have to send things to get them out of your subnet and into the broader Internet.

The subnet is a mask, which is used to calculate which addresses on the network are on your subnet, to which you can communicate directly, and which are not on your subnet, with which you must communicate through your gateway.

Your subnet mask is a binary number starting with ones, and ending with zeros. It is applied over a binary representation of an ip address, and your ip address. The ones allow the number through the mask, zeros do not. Any address that matches yours when this is done is on your subnet. For example:

192.168.1.12 subnet mask 255.255.255.0
Is

11000000 10101000 00000001 00001100

11111111 11111111 11111111 00000000

So the result is

11000000 10101000 00000001 00000000

Which is

192.168.1.0

Therefore any address that starts 192.168.1.x is on your subnet

Short version of subnet – a subnet is like the neighbourhood your house is in, and the subnet mask is a key to calculate who else is in your neighborhood based on your address.

Anonymous 0 Comments

This isn’t a complete answers but it might help, [comic of how a browser uses the internet](https://iili.io/JwJAdl.jpg)

Anonymous 0 Comments

I’d like to hear someone’s more elaborate explanation but the way I was once explained them is as follows:

An IP address is much like your own home address. A unique place on the internet that isn’t shared with anyone else. You can share your IP with people or servers so they know where to send information too and from.

A gateway is like if you lived in an apartment complex. You may share an address with someone but you don’t want the information going to your mom’s computer down the hall instead of your own. Your unique subnet (like a subdivision) would be your apartment number, so your neighbors don’t get the information indetended for you.

Anonymous 0 Comments

An IP address is an address we give a computer device. It allows computers on separate subnets to communicate with each other.

A subnet is a network which is divided up.

A gateway is the computer you must talk with to reach the next subnet.

Anonymous 0 Comments

An IP address is a way that a computer, or anything that has network capabilities identifies where it is. The address, like your home address analogy is a good one.. But it’s not 100% accurate. More so: inside your actual house you can have all the IP addresses you want in the world. Inside your actual house are all of your private IPs… But you can’t access the internet with them. Instead something called Network Address Translation (NAT) literally translates ALL of you private IP addresses into a single public IP which is provided by your Internet Service Provider. This public IP is truly unique and nobody else in the world has them.. And about once a month or so your ISP will assign you a new one.. Usually without you even knowing it happened.

You have some other addresses that help make your network function.. For example.. Another special address that all networked appliances have is a Media Access Control Address, or more commonly known as a MAC Address. The MAC address is the physical address (so more accurate to your home address analogy because the MAC tells the network where the device lives…. Basically) the MAC is often referred to as the physical address and it can never be changed on a device. It’s most frequently used for determining which device is asking the Default Gateway for an automatically signed private IP address.

The default Gateway is usually called a router. The router is responsible for literally routing packets of data in and out of the network. At that point it basically functions as a literal gateway in and out of the house. When you are configuring your computer, the default gateway’s IP address is the same as the routers address. In most residential applications, the router has a bunch of other functionalities though, such as handling DHCP, DNS NAT, interior packet switching, and usually they have a firewall built into them. Since you didn’t ask about those, I won’t go into it

Finally, subnets. These are the trickiest thing to understand and to be honest I USED to be good at them but I’ve never used them in my work because we just VLAN segregate so why go through the trouble to do the math to actually subnet.. But that’s neither here nor there.

Subnets at the surface level are how you tell a computer or network device how many private IP addresses can exist on the same IP block segment. For example 255.255.255.0 subnet is considered a class C internal IP schema and can handle 254 private addresses on the same IP block (it would be 256 but the .0 and .255 addresses are reserved). 255.255.0.0 is considered a class B and can handle about 65,000 devices. Whereas a class A (255.0.0.0) can handle approximately 16.7 million devices.

On a deeper level each IPv4 address is made up of for groups of 8 bits which coincide to produce a number.. For a total of 32 bits in the IP. If you’re utilizing a class C. The default subnet is 255.255.255.0. Then let’s say that your private IP is 192.168.0.2. 192.168 is the network that you are on..0 is the block segment, and .2 is your actual address in this case. If you know that you only want to have.. Let’s say 16 devices on your IP block segment. Then you can do the math to figure out, based on the number of bits that are off in your IP.. To determine a new subnet to be on. (I say do the math because I can’t remember the math.. Sorry) after that. Your subnet would become something like 255.255.255.12 and your new valid IP block would be 192.168.0.1-.17 because at that point .17 would be your broadcast IP and. 0 would still be your loopback (that’s not really important for this scope) at that point the next valid range would be 192.168.0.18-254. and you have successfully subnetted your network.

I hope that helps.. Feel free to ask me to elaborate more or to clarify something

Anonymous 0 Comments

* An IP address is like the address of the building you live in
* The subnet mask tells you how many other buildings can be in the same block, suburb, or city (easier to understand with CIDR notation, but that would be ELI15) and also tell you if you need to go through a gateway to visit them
* A gateway is a building through which you can reach other blocks, suburbs, or and cities

Bonus:

* Ports are like apartments in the building
* AS numbers are like ZIP codes
* The Internet is like the postal system

Anonymous 0 Comments

Let’s go with the standard metaphor of an IP address being like your home address.

There’s four numbers in an IP address; imagine it’s formatted as country.city.building.apartment

If you want to send a note to someone in the same building, you can just go stick it under their door. If you want to send a note somewhere else, you go put it in the mailroom in the basement, and let them deal with it – they’ll send it to the right building, or to the postoffice to get it to the right city, who might in turn send it to the airport to get it to the right country – and so on back down the chain until it’s delivered to the right apartment.

Well, that works fine if everywhere’s the same, if there’s 256 different countries, each with 256 cities, each of which has 256 apartment buildings, each of which has 256 apartments. Whether you’re a resident, mailroom worker, postoffice worker or cargo pilot, you just compare each number of the address with your own, and you know who to send it on to.

But the world isn’t neat and tidy. There’s tiny single homes and vast sprawling apartment complexes. Tiny hamlets and vast megacities, flyspeck countries and ones spanning entire continents.

So one number per level isn’t a good fit. If there’s thousands of apartments in your building (or thousands of buildings your mailroom covers, or thousands of cities in your country, etc) you can’t just look at one number of the address to tell if it’s local.

Exactly how much do you have to look at? That’s the *subnet mask* – it tells you exactly how many (binary) digits of the address it needs to compare, to tell if an address is local to you.

And of course, once you start dealing with arbitrary-sized buidings/cities/countries, you can’t make assumptions about where your mailroom / postoffice / airport is, either. You have to know exactly *where* to send stuff that’s not local to you, in order to have someone else deal with it. And the address of that place is the *default gateway*.

Anonymous 0 Comments

IP address is like your mailing address.

Gateway is like your local post office who passes things in and out of the system.

Subnet mask is a rule specifying which addresses are and are not in your town.

The internet is basically an interconnected series of tubes.