What is Subnet Mask?
By Scott Seong
An IP address has two components, the network address and the host address. A subnet mask separates the IP address into the network and host addresses (
A Subnet mask is a 32-bit number that masks an IP address, and divides the IP address into network address and host address. Subnet Mask is made by setting network bits to all "1"s and setting host bits to all "0"s. Within a given network, two host addresses are reserved for special purpose. The "0" address is assigned a network address and "255" is assigned to a broadcast address, and they cannot be assigned to a host.
Examples of commonly used netmasks for classed networks are 8-bits (Class A), 16-bits (Class B) and 24-bits (Class C), and classless networks are as follows:
Class Address # of Hosts Netmask (Binary) Netmask (Decimal)
CIDR /4 240,435,456 11110000 00000000 00000000 00000000 240.0.0.0
CIDR /5 134,217,728 11111000 00000000 00000000 00000000 248.0.0.0
CIDR /6 67,108,864 11111100 00000000 00000000 00000000 252.0.0.0
CIDR /7 33,554,432 11111110 00000000 00000000 00000000 254.0.0.0
A /8 16,777,216 11111111 00000000 00000000 00000000 255.0.0.0
CIDR /9 8,388,608 11111111 10000000 00000000 00000000 255.128.0.0
CIDR /10 4,194,304 11111111 11000000 00000000 00000000 255.192.0.0
CIDR /11 2,097,152 11111111 11100000 00000000 00000000 255.224.0.0
CIDR /12 1,048,576 11111111 11110000 00000000 00000000 255.240.0.0
CIDR /13 524,288 11111111 11111000 00000000 00000000 255.248.0.0
CIDR /14 262,144 11111111 11111100 00000000 00000000 255.252.0.0
CIDR /15 131,072 11111111 11111110 00000000 00000000 255.254.0.0
B /16 65,534 11111111 11111111 00000000 00000000 255.255.0.0
CIDR /17 32,768 11111111 11111111 10000000 00000000 255.255.128.0
CIDR /18 16,384 11111111 11111111 11000000 00000000 255.255.192.0
CIDR /19 8,192 11111111 11111111 11100000 00000000 255.255.224.0
CIDR /20 4,096 11111111 11111111 11110000 00000000 255.255.240.0
CIDR /21 2,048 11111111 11111111 11111000 00000000 255.255.248.0
CIDR /22 1,024 11111111 11111111 11111100 00000000 255.255.252.0
CIDR /23 512 11111111 11111111 11111110 00000000 255.255.254.0
C /24 256 11111111 11111111 11111111 00000000 255.255.255.0
CIDR /25 128 11111111 11111111 11111111 10000000 255.255.255.128
CIDR /26 64 11111111 11111111 11111111 11000000 255.255.255.192
CIDR /27 32 11111111 11111111 11111111 11100000 255.255.255.224
CIDR /28 16 11111111 11111111 11111111 11110000 255.255.255.240
CIDR /29 8 11111111 11111111 11111111 11111000 255.255.255.248
CIDR /30 4 11111111 11111111 11111111 11111100 255.255.255.252
Subnetting an IP network is to separate a big network into smaller multiple networks for reorganization and security purposes. All nodes (hosts) in a subnetwork see all packets transmitted by any node in a network. Performance of a network is adversely affected under heavy traffic load due to collisions and retransmissions.
Applying a subnet mask to an IP address separates network address from host address. The network bits are represented by the 1's in the mask, and the host bits are represented by 0's. Performing a bitwise logical AND operation on the IP address with the subnet mask produces the network address. For example, applying the Class C subnet mask to our IP address 216.3.128.12 produces the following network address:
IP: 1101 1000 . 0000 0011 . 1000 0000 . 0000 1100 (216.003.128.012)
Mask: 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000 (255.255.255.000)
---------------------------------------------
1101 1000 . 0000 0011 . 1000 0000 . 0000 0000 (216.003.128.000)
Subnetting Network
Here is another scenario where subnetting is needed. Pretend that a web host with a Class C network needs to divide the network so that parts of the network can be leased to its customers. Let's assume that a host has a network address of 216.3.128.0 (as shown in the example above). Let's say that we're going to divide the network into 2 and dedicate the first half to itself, and the other half to its customers.
216 . 3 . 128 . (0000 0000) (1st half assigned to the web host)
216 . 3 . 128 . (1000 0000) (2nd half assigned to the customers)
The web host will have the subnet mask of 216.3.128.128 (/25). Now, we'll further divide the 2nd half into eight block of 16 IP addresses.
216 . 3 . 128 . (1000 0000) Customer 1 -- Gets 16 IPs (14 usable)
216 . 3 . 128 . (1001 0000) Customer 2 -- Gets 16 IPs (14 usable)
216 . 3 . 128 . (1010 0000) Customer 3 -- Gets 16 IPs (14 usable)
216 . 3 . 128 . (1011 0000) Customer 4 -- Gets 16 IPs (14 usable)
216 . 3 . 128 . (1100 0000) Customer 5 -- Gets 16 IPs (14 usable)
216 . 3 . 128 . (1101 0000) Customer 6 -- Gets 16 IPs (14 usable)
216 . 3 . 128 . (1110 0000) Customer 7 -- Gets 16 IPs (14 usable)
216 . 3 . 128 . (1111 0000) Customer 8 -- Gets 16 IPs (14 usable)
-----------------------------
255 . 255 . 255 . (1111 0000) (Subnet mask of 255.255.255.240)
CIDR - Classless Inter Domain Routing
Classless InterDomain Routing (CIDR) was invented to keep the Internet from running out of IP Addresses. The IPv4, a 32-bit, addresses have a limit of 4,294,967,296 (232) unique IP addresses. The classful address scheme (Class A, B and C) of allocating IP addresses in 8-bit increments can be very wasteful. With classful addressing scheme, a minimum number of IP addresses allocated to an organization is 256 (Class C). Giving 256 IP addresses to an organization only requiring 15 IP addresses is wasteful. Also, an organization requiring more than 256 IP addresses (let's say 1,000 IP addresses) is assigned a Class B, which allocates 65,536 IP addresses. Similarly, an organization requiring more than 65,636 (65,634 usable IPs) is assigned a Class A network, which allocates 16,777,216 (16.7 Million) IP addresses. This type of address allocation is very wasteful.
With CIDR, a network of IP addresses is allocated in 1-bit increments as opposed to 8-bits in classful network. The use of a CIDR notated address can easily represent classful addresses (Class A = /8, Class B = /16, and Class C = /24). The number next to the slash (i.e. /8) represents the number of bits assigned to the network address. The example shown above can be illustrated with CIDR as follows:
216.3.128.12, with subnet mask of 255.255.255.128 is written as
216.3.128.12/25
Similarly, the 8 customers with the block of 16 IP addresses can be
written as:
216.3.128.129/28, 216.3.128.130/28, and etc.
With an introduction of CIDR addressing scheme, IP addresses are more efficiently allocated to ISPs and customers; and hence there is less risk of IP addresses running out anytime soon. For detailed specification on CIDR, please review RFC 1519. With introduction of additional gaming, medical, applicance and telecom devices requiring static IP addresses in addition to more than 6.5 billion (July 2006 est.) world population, the IPv4 addresses with CIDR addressing scheme will eventually run out. To solve shortage of IPv4 addresses, the IPv6 (128-bit) address scheme was introduced in 1993.
Blog Archive
-
►
2013
(5)
- ► 11/24 - 12/01 (2)
- ► 09/15 - 09/22 (1)
- ► 05/26 - 06/02 (2)
-
►
2012
(6)
- ► 03/04 - 03/11 (1)
- ► 02/12 - 02/19 (3)
- ► 02/05 - 02/12 (1)
- ► 01/29 - 02/05 (1)
-
►
2011
(76)
- ► 12/04 - 12/11 (1)
- ► 11/20 - 11/27 (2)
- ► 11/13 - 11/20 (1)
- ► 11/06 - 11/13 (4)
- ► 10/30 - 11/06 (5)
- ► 10/23 - 10/30 (2)
- ► 10/16 - 10/23 (4)
- ► 10/09 - 10/16 (3)
- ► 05/22 - 05/29 (2)
- ► 05/01 - 05/08 (1)
- ► 03/20 - 03/27 (5)
- ► 03/06 - 03/13 (7)
- ► 02/20 - 02/27 (2)
- ► 02/13 - 02/20 (3)
- ► 02/06 - 02/13 (2)
- ► 01/30 - 02/06 (1)
- ► 01/23 - 01/30 (15)
- ► 01/16 - 01/23 (5)
- ► 01/09 - 01/16 (10)
- ► 01/02 - 01/09 (1)
-
▼
2010
(111)
- ► 12/26 - 01/02 (4)
- ► 12/19 - 12/26 (4)
- ► 12/12 - 12/19 (23)
- ► 11/28 - 12/05 (3)
- ► 11/21 - 11/28 (15)
- ► 11/07 - 11/14 (3)
- ► 10/31 - 11/07 (7)
- ► 10/24 - 10/31 (4)
- ► 10/10 - 10/17 (3)
- ► 10/03 - 10/10 (2)
- ► 09/26 - 10/03 (2)
- ► 09/05 - 09/12 (1)
- ► 08/29 - 09/05 (1)
- ► 08/22 - 08/29 (1)
- ► 08/15 - 08/22 (2)
- ► 08/08 - 08/15 (3)
- ► 08/01 - 08/08 (6)
-
▼
07/25 - 08/01
(25)
- How to Make Custom iPhone Ringtones for Free Read...
- How to Unlock Password Protected Word Documents
- How can I install Windows Vista?
- How can I install Windows XP-on my computer?
- Post Codes-GPO-Pakistan-Punjab,Sindh,Nwfp,Balochistan
- Windows-Classic Start Menu
- What Is A Partition?
- Partitioning Hard Drive During XP Installation
- wikipedia
- About Your Hardware-Hardware Information
- Installing Fedora 10-Step by Step Guide
- Why Mac OS X?
- Available Software on Mac OS X
- where is google office
- How do you block someone on yahoo mail?
- Make a solar cell in your kitchen
- What is a proxy server?
- What is Denial of Service-(DoS) attack?
- What is DHC-(Dynamic Host Configuration Protocol)?
- What is TCP/IP?
- What is MAC Address?
- What is Subnet Mask?
- What is IP Address?
- How to make gmail id?
- Invisible Folder Name
- ► 07/11 - 07/18 (2)
Subscribe Now: standardSmall
Subscribe via email
Subscribe via email
Total Pageviews
Monday, July 26, 2010
What is Subnet Mask?
Posted by
ajab
at
3:06 AM
Subscribe to:
Post Comments (Atom)
My Headlines
Enter Donation Amount:
My Other Blogs
- Crack Into IT
- ajabhtml
- codecademy
- MCSE PU
- PU MCSE
- w6school
- tags
- Music it 2
- greenapple
- Pashto Time
- 808tube
- Funny Donky
- How Things are Working?
- Blog vs Bloger
- Photography PPT
- maulanatariqjameel2011
- Open Sourse Hut
- softkil
- beautyhub2
- trailer8
- Positive Statement
- picpok
- 808games
- Free Online Earning in Pakistan
- Blogs Vs Blogs
- Question and Answer سوال جواب
- Insider Dazs
About Me
Hi there!
I'm Ajab Khan,29, Pakistani Citizen living at Lahore, Pakistan. Currently Working at University of the Punjab, Pakistan.Started blogging since July 14, 2010 I have several blogs and first article was about how to use your mobile as a webcam you can access that article here, I love to collect interesting data if you like to share with me you can contact me by email here is the id ajabbiz@yahoo.com
I'm Ajab Khan,29, Pakistani Citizen living at Lahore, Pakistan. Currently Working at University of the Punjab, Pakistan.Started blogging since July 14, 2010 I have several blogs and first article was about how to use your mobile as a webcam you can access that article here, I love to collect interesting data if you like to share with me you can contact me by email here is the id ajabbiz@yahoo.com
0 comments:
¿Te animas a decir algo?