Solved

subnet mask

Posted on 2016-10-20
9
56 Views
Last Modified: 2016-11-13
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
Comment
Question by:rgb192
9 Comments
 
LVL 10

Accepted Solution

by:
Muhammad Mulla earned 250 total points (awarded by participants)
ID: 41852278
- 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
 
LVL 77

Assisted Solution

by:arnold
arnold earned 125 total points (awarded by participants)
ID: 41852292
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
 
LVL 10

Expert Comment

by:Muhammad Mulla
ID: 41852299
That was my first reaction, arnold.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 26

Expert Comment

by:pony10us
ID: 41852315
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
 
LVL 24

Expert Comment

by:masnrock
ID: 41852316
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
 
LVL 20

Assisted Solution

by:CompProbSolv
CompProbSolv earned 125 total points (awarded by participants)
ID: 41852882
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
 
LVL 27

Expert Comment

by:tliotta
ID: 41857946
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
 
LVL 26

Expert Comment

by:pony10us
ID: 41858790
@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
 
LVL 10

Expert Comment

by:Muhammad Mulla
ID: 41885203
Question answered
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question