Solved

subnet mask

Posted on 2016-10-20
9
43 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 9

Accepted Solution

by:
Muhammad Mulla earned 250 total points (awarded by participants)
Comment Utility
- 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 76

Assisted Solution

by:arnold
arnold earned 125 total points (awarded by participants)
Comment Utility
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 9

Expert Comment

by:Muhammad Mulla
Comment Utility
That was my first reaction, arnold.
0
 
LVL 26

Expert Comment

by:pony10us
Comment Utility
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 20

Expert Comment

by:masnrock
Comment Utility
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)
Comment Utility
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
Comment Utility
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
Comment Utility
@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 9

Expert Comment

by:Muhammad Mulla
Comment Utility
Question answered
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

#Citrix #Citrix Netscaler #HTTP Compression #Load Balance
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now