• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 80
  • Last Modified:

subnet mask

I am learning network +
I saw many tutorials about subnet mask

I am not looking for another tutorial

Please answer 3 questions:
what is subnet mask hiding
whom are they hiding from

how does subnet unmask (un hide)
0
rgb192
Asked:
rgb192
3 Solutions
 
Muhammad MullaCommented:
- The subnet mask isn't hiding anything.

It is called a mask because it is used to identify the network address of the IP. i.e. it doesn't need to know the bits that represent the host. A bitwise AND operation is used to carry out this function.
0
 
arnoldCommented:
Is this a school assignment question?

A mask identifies a subnet, depending on the setup, communication within the subnet, systems with IPs on the same subnet communicate directly, communications with IPs outside the subnet are done through an external processor, router.
0
 
Muhammad MullaCommented:
That was my first reaction, arnold.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
pony10usCommented:
To word what Arnold has said a little differently:

A subnet mask basically tells an IP what other IP's it can talk to without interference. It "hides" other IP's that are not within the range of the mask from IP's that are in within that range.  This "hiding" can be altered externally with "route" rules on an external device like a router.
0
 
masnrockCommented:
The subnet mask isn't hiding anything. What it does is that is helps you identify a subnet that an IP address falls in.

For the example I'm going to show, I'm going to use the following:
IP address: 192.168.16.230
Subnet mask: 255.255.255.0

In order to identify a network ID, you have to convert both the IP address and the subnet mask to binary.
IP address: 11000000.10101000.00010000.11100110
Subnet mask: 11111111.11111111.11111111.00000000

Next step is to do a XOR (exclusive OR) operation. To do XOR, you have to go one bit (binary digit at a time). Think of it like an addition problem, except that you never have to carry digits.

When you do XOR, the following applies:
1 XOR 1 = 1
1 XOR 0 = 0
0 XOR 1 = 0
0 XOR 0 = 0

When you have done that. you will get the following result:
11000000.10101000.00010000.00000000

Final step is to convert the binary solution back to decimal numbers:
192.168.16.0

What this tells us is that the IP 192.168.16.230 falls in subnet 192.168.16.0

A subnet mask also tells how many hosts are in a subnet. So remember when I showed the subnet mask in binary earlier:
11111111.11111111.11111111.00000000

Notice that it is has 24 ones. A better way to look at it is the fact it has 8 zeros. You would take 2 to the 8th power (2^8), and your answer would be 256. But remember that in any subnet, 2 IP addresses aren't usable, so subtract those out. You're left with 254, which is the number of hosts in the subnet. You can do host calculations WITHOUT having to pay attention to the IP address at all, only the subnet mask.
0
 
CompProbSolvCommented:
No general disagreement with what has been posted except for the last one about XOR.  Replace "XOR" with "And" and it will generally be correct.  The truth table for XOR is:
1 XOR 1 = 0
1 XOR 0 = 1
0 XOR 1 = 1
0 XOR 0 = 0
2
 
tliottaCommented:
It "hides" bits that don't identify the network. It's "hiding" the bits from some networking APIs running in the system.

But "hide" isn't the right word. Why do you think it "hides" anything?

What it does is simply remove bits that aren't needed for some functions. An address value is made up of a couple parts -- the network address and the device address within the network. In order for the system to talk to the network, it needs to know what the address of the network is. But the IP address has bits that are added to it to identify a unique point within the network.

It's like a city name, e.g., 'Seattle, Washington'. You might apply a "state mask" to the city name to extract only the name of the state -- 'Washington'. The mask contains rules that say how to extract just the part that's needed. It's not "hiding"; it's simply separating parts.
0
 
pony10usCommented:
@tliotta,

That description is good and you are correct that it doesn't "hide" anything.  It is more like limiting the scope.

For instance:

John Doe lives @ 123 whatever lane, Seattle Washington US

So lets break this down to a subnet mask

US would be the first octet
Washington would be the second octet
Seattle would be the third octet
123 whatever lane would be the fourth octet
John Doe is the search string.

So if I use the mask 255.0.0.0 - this will search all of the US for John Doe

mask 255.255.0.0 - this will search all of Washington for John Doe - ignoring or "hide" all other US locations

mask 255.255.255.0 this will search all of Seattle for John Doe - ignoring or "hide" the rest of Washington and anywhere else in the US

mask 255.255.255.255 will find John Doe at 123 Whatever Lane in Seattle Washington US - ignoring or "hide" any other John Doe.
1
 
Muhammad MullaCommented:
Question answered
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now