What is a Subnet Mask?
A subnet mask allows you to identify which part of an IP address is reserved for the network, and which part is available for host use. If you look at the IP address alone, especially now with classless inter-domain routing, you can't tell which part of the address is which. Adding the subnet mask, or netmask, gives you all the information you need to calculate network and host portions of the address with ease. In summary, knowing the subnet mask can allow you to easily calculate whether IP
Determining network and host portions of an IP address using a subnet mask
To determine what the network
| IP Address: | 10011100.10011010.01010001.00111000 |
| Subnet mask: | 11111111.11111111.11111111.11110000 |
| Bitwise AND | ----------------------------------------------- |
| Result: | 10011100.10011010.01010001.00110000 |
As you can see, the network address for the IP address and subnet mask in question is 156.154.81.48. To determine the how many hosts are possible to be on this same subnet, it is a simple operation. Count the number of bits from the right until you get to the first "1" in the binary network address display. That number will be the power you raise 2 to for the calculation of possible number of hosts. You must also subtract two from the result because one address is reserved for broadcast and network addresses. This leaves you with the final algorithm of 2^n-2. In this case there are 4 bits of 0 in the network address, leaving you with 2^4-2 hosts possible, or 14 hosts. This means that your network address is 156.54.81.48, that you have a range of addresses available to hosts from 156.154.81.49 - 156.154.81.62, and that the broadcast address for this network is 156.154.81.63.
Are subnet masks necessary?
Subnet masks are critical to communications on an IP network. Network devices use the IP address targets and defined netmask to determine if the network the host is on is a local subnet, or a remote network. This is important because devices act differently depending on the result. If the subnet is local, the device will send an ARP request to retrieve the MAC or hardware address of the system in question to communicate over the data-link layer. If the address is found to be on a remote network, then the network device routes packets to the gateway in it's routing table that is set to handle that network. If no routing table entry is found matching that network, the packets are routed to the default route. If no default route is defined, the packets are dropped with nowhere left to go.
Related posts:
If you enjoyed this article, subscribe to receive more great content just like it.
0 comments for this post
Leave a reply
Write your message here.
Please leave your Email Id so that I can contact you.
Thanks for your Valuable Suggestion,
- Making a blog at blogspot
- Blog Setting
- How to backing up template
- How to backing up widgets
- How to changing template
- Make a Post Summary (Read more)
- Blog Comment send to @mail
- Adding search engine to blog
- Making a drop down menu
- Add google talk to blog (1)
- Making a News Paper Style Drop Caps
- Adding Recent Post & Recent Comments
- Adding Yahoo!Massenger icon
- Adding Google talk (2)
- Adding yahoo! Massenger Emoticons (1)
- Fix error "Widget IDs should be unique"
- Making a Table of Content
- Adding shoutbox
- Adding user online tracker
- Adding Statistic & tracker
- Adding digg button to post page
- Upload image to image hosting
- Making a Logo and image button
- Adding Favicon to URL address
- Adding a Clock to blog
- Removing the number of label