CCNA HUB

CCNA and Linux Training Hub!

CCNA and Linux Training Hub!

CCNA HUB > IP Fundamentals > IPv4 Address System > Understanding Classful Network Mask

Understanding Classful Network Mask

By Imad Daou Leave a Comment

Post Views: 9,303

CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> IPv4 Address System Section

section table
  1. Understanding IPv4 Addressing System
  2. Understanding Class A Network IP Addresses
  3. Understanding Class B Network IP Addresses
  4. Understanding Class C Network IP Addresses
  5. Understanding Classful Network Mask
  6. Understanding Classless Subnet Mask
  7. Understanding Classless Subnetting Concept
Image Source
Image Source

Understanding Classful Network Mask explains why every Network IP device must belong to a Network Address, and how every Network Address must have Netmask Address. Therefore, to communicate with ccnahub.com’s web server, PC1 or its Gateway must know the Web Server’s IP Address, Network Address, and the Netmask which will point to the Network Portion of the Web Server’s IP Address.

Table of Contents

  • Netmask Address
  • Identifying Network Portion
  • Analyzing IPv4 Settings
  • Masking Class A Networks  

Netmask Address

After A, B, and C Classful Networks have been created from the One Big Pie of IPv4 Space, the IP Address in each Class needed 2 logical portions to work:

  • Network Portion
  • Hosts Portion

For an IPv4 Network Device to function properly, 6 things needed:

  • IP Address
  • Netmask Address
  • Network Address
  • Broadcast Address
  • Gateway Address
  • DNS Address

Note: Mainly, the minimum 4 pieces required for IPv4 TCP/IP to function are: IP, Netmask, Network, and Broadcast Addresses. If you are using Windows Machine, Network and Broadcast Addresses configured Automatically for you.

If an IP Address meant to identify a Network device on a particular Network, then the Netmask is meant to identify the Network’s portion of this device. TIP: Identifying the network’s portion will automatically identify the host portion as well.

Network Mask or Netmask for short, helps Computers locate and identify where the network portion is, hence, the Host’s portion at this IP could be located as well.

  • n = Network Portion
  • h = Hosts Portion

Presenting Class A Network and its Mask

Decimal

Class A Network: 1.0.0.0
Class A Netmask: 255.0.0.0

Binary

Class A Network: 00000001.00000000.00000000.00000000
Class A Netmask: 11111111.00000000.00000000.00000000
                 nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh

Presenting Class B Network and its Mask

Decimal

Class B Network: 130.1.0.0
Class B Netmask: 255.255.0.0

Binary

Class B Network: 10000010.00000001.00000000.00000000
Class B Netmask: 11111111.11111111.00000000.00000000
                 nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh

Presenting Class C Network and its Mask

Decimal

Class C Network: 195.3.128.0
Class C Netmask: 255.255.255.0

Binary

Class C Network: 11000011.00000011.10000000.00000000
Class C Netmask: 11111111.11111111.11111111.00000000
                 nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh

Identifying Network Portion

When Classful Networks were created as mentioned under Understanding IP Addressing System, Internet Protocol and Internet Routing Protocol needed a way to locate the Network portion of an IP Address.

Therefore, if a Class A IP Address such 50.10.20.1 used by itself without Network Mask, how the computer would locate or identify its network portion?

And where this IP Address might be located in the world if the network portion can’t be identified? Hence, even Routers that use Internet Routing Protocols won’t be able to route without knowing the Network portion.

Some people believe that it is very similar to a home address system. How you would identify a home on a map without knowing first the its geographical portion (Network Portion) such country, city, postal code, and finally, you can point to the home address.

Of course, neither countries nor cities exist in IPv4, but the concept is almost the same. With this in mind, the Engineers must come up with 3 Network Masks Addresses to identify the Classes or to distinguish between the Classes Network portions.

Remember: Once you nail the Network portion you automatically nailed the Hosts portion.

The 3 Default Network Masks

Class A Default Network Mask: 255.0.0.0 is known by its first byte ruling, which will be able to locate all the Networks that fall at the first byte. This Mask locates Classful A Networks starting from 1.0.0.0 up to 126.0.0.0 Networks, therefore, the hosts portion can be identified or located at the rest of the 3 bytes.

Class B Default Network Mask: 255.255.0.0 is known by its first and second bytes ruling, which will be able locate all the Networks that fall at first and second Bytes. This Mask locates Classful B networks starting from 128.0.0.0 up to 191.255.0.0 Networks, therefore, the hosts portion can be identified or located at the third and fourth bytes.

Class C Default Network mask: 255.255.255.0 is known by its first, second, and third Bytes ruling, which be able to locate all the Networks that fall at the first, second, and third Bytes. This mask locates Classful C Networks starting from 192.0.0.0 up to 223.255.255.0 Networks, therefore, the hosts portion can be identified or located at the fourth byte.

Classful Networks

Flipping between Network Masks

  • Class A Networks can use Class A, B, C Network Masks, but Class A Netmask 255.0.0.0 can be used ONLY with Class A Networks.
  • Class B Networks can utilize Class B and C Network Masks, but Class B Netmask 255.255.0.0 can be used with Class A and B Networks.
  • Class C Networks utilize Only Class C Network Mask, but Class C Netmask 255.255.255.0 can be used with Class A, B, and C Networks.

Analyzing IPv4 Settings

If you open Ubuntu /etc/network/interface config file, you can view or configure the network settings. A Class A Public IP Address Settings would be as follows:

Assuming we have Ubuntu1 Linux interface using Class A Public IP Address.

Iface eth0 inet static
 address         50.0.0.2
 netmask         255.0.0.0
 network         50.0.0.0
 broadcast       50.255.255.255
 gateway         50.0.0.1
 dns-nameservers 8.8.8.8

Breaking Pieces Down

The first thing to note that any TCP/IP setting at any network device should make sense, meaning, the IP address should fall under the range of its network 50.0.0.0. The network mask serves the network ID and helps the other network devices to locate this Ubuntu machine.

Second, if happens that you have another Ubuntu (as Virtual Machines) and you want to communicate with the upper machine settings directly without using a gateway (Gateway needed to cross Networks), your second Ubuntu machine must have IP Address 50.0.0.3 with the same netmask, network, broadcast, gateway, and dns-nameserver address of Ubuntu1.

TIP: You can set a Host Network at your VirtualBox and practice the different Classes between 2 Ubuntu Machines.

Finally, notice how the DNS server IP doesn’t really matter if it falls under Class A, B, or C Network, any Network device (Windows or Linux) will be able to use any DNS settings from any Unicast Class Network, whether A, B, or C DNS address, since it is used primarily to resolve names and got nothing to do with locating IP Address or Network Portion.

Keep in Mind

Network Engineers discussed the netmask ahead of time, netmask determines the network portion and how many hosts the network portion can hold.

Therefore, the 4 sections: address, network, broadcast, and gateway should belong to the same Network as the netmask dictated. At the upper Ubuntu Network setting example, netmask 255.0.0.0 was chosen, so the IP setting must be from Class A networks range, besides, the address, network, broadcast, and gateway should all fall under Class A.

It happens that I used 50.0.0.0 network, you can pick any Class A range such 1.0.0.0. up to 126.0.0.0 that can be used with Class A Netmask 255.0.0.0

Class A Private IP Address Settings

Iface eth0 inet static
 address         10.0.0.2
 netmask         255.0.0.0
 network         10.0.0.0
 broadcast       10.255.255.255
 gateway         10.0.0.1
 dns-nameservers 8.8.8.8

Class B Network IP Address Settings

Public IP Address

Iface eth0 inet static
 address         130.0.0.2
 netmask         255.255.0.0
 network         130.0.0.0
 broadcast       130.0.255.255
 gateway         130.0.0.1
 dns-nameservers 8.8.8.8

Private IP Address

Iface eth0 inet static
 address         172.16.0.2
 netmask         255.255.0.0
 network         172.16.0.0
 broadcast       172.16.255.255
 gateway         172.16.0.1
 dns-nameservers 8.8.8.8

Class C Network IP Address Settings

Public Address

Iface eth0 inet static
 address         195.0.0.2
 netmask         255.255.255.0
 network         195.0.0.0
 broadcast       195.0.0.255
 gateway         195.0.0.1
 dns-nameservers 8.8.8.8

Private IP Address

Iface eth0 inet static
 address         192.168.0.1
 netmask         255.255.255.0
 network         192.168.0.0
 broadcast       192.168.0.255
 gateway         192.168.0.1
 dns-nameservers 8.8.8.8

Masking Class A Networks  

Netmasking: Most of the time, administrators at the Enterprise or small businesses need to Mask tweak the Network’s portion to reduce the Host’s portion, especially when dealing with Local Area Networks.

Assuming you have 100 computers at your company and you want to connect them using a Class A private IP Address (10.0.0.0 Network), after some analyzing of your Network device requirements, you have determined that the most needed now, and in the future at this network, would be no more than 200 Network devices.

Therefore, you can Mask tweak a Class A Private IP Address Range that can accommodate 200 computers. As you probably know, that Class A Private Address 10.0.0.0 with its netmask 255.0.0.0 gives you 3 bytes for Hosts.

However, doing the Math: 24 places for the hosts: 224 = 16,777,216 – 2 = 16,777,216 usable IP Addresses for Hosts. WOW! That’s a lot more than the 200 needed.

Is it possible to use Class A Private Network with less Hosts bits based only on your needs? Yes!, It is possible by using Class B or Class C Netmask instead to reduce the Host’s bit.

As you guessed, Network Mask or Netmasking has one job to do (either by using Class A, B, or C Netmask) to identify Network portion, hence, identifying Hosts portion and hosts number of devices.

Choosing the Right Mask

Having said this, Class A Private IP Network 10.0.0.0 can utilize 3 of the Network Masks:

  • 255.0.0.0
  • 255.255.0.0
  • 255.255.255.0

Default Class C Mask 255.255.255.0 can be used by Class A Private Network 10.0.0.0, which will reduce the Class A Network 10.0.0.0 hosts from 16,777,216 up to 254 usable IP Addresses, hence, close to your needs of 200 network devices.

Private A Network 10.0.0.0 using Class C Network Mask

Decimal:

Class A Network: 10.0.0.0
Class C Netmask: 255.255.255.0

Binary

Class A Network: 00001010.00000000.00000000.00000000
Class C netmask: 11111111.11111111.11111111.00000000
                 nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh

As you can see, we have reduced the hosts portion from Millions of IP address to just 8 bits hosts places, which would be 28 = 256 – 2 = 254 usable IP Addresses using 255.255.255.0 netmask.

Growing more than 254 Network Devices

After few years, you might face that you are running out of IP addresses and almost all the 254 IP Addresses were consumed. You might be telling yourself; man I wish I have used the Class B Netmask to accommodate more machines.

Well, this is not a good strategy to use Class B Netmask to accommodate more machines. Any Network that hold more than 510 devices, might face deadly broadcast storm.

Believe it or not, when machines cross 510 devices at one Network, it can consume more than 50% of a network performance due to just normal broadcast messages. Some administrators won’t even use more than 100 machines per network to reduce Broadcast Messages.

What is a Broadcast Storm?

Broadcast is a TCP/IP message, used between or among the Network devices to communicate about certain things, it is the natural way of TCP/IP communication; it is crucial for TCP/IP to function, but before you know it, it might got worse than gossip 🙂

Each machine has its TCP/IP stack configured, therefore, this network device is capable to send and receive TCP/IP messages, and among them the Broadcast, Unicast, and Multicast messages.

However, broadcast can be dangerous when there are a lot of devices connected all together using one Network, usually more than 510 devices will cause broadcast storm.

Why a broadcast can be a dangerous? Broadcast storm can be caused with too many devices inside the One Network, however, faulty Network card, bad switch port, or bad cable end are all can cause broadcast storm as well.

Let’s assume you are ridding the Subway from Brooklyn to New York City, on the way, someone all of sudden got sick, the conductor has been informed and the train stopped at the next station for 911 help. Now, the train will never move before 911 come and check the sick customer in order to decide whether to leave the customer inside the train or take the customer to the hospital.

Now, can you just imagine for how many minutes the train might wait. First, all customers got delayed for their work, second and worse, if you are riding the train behind the waiting train.

Deadly Broadcast Message

Faulty NIC is an example where the broadcast storm could evolve and will utilize the whole bandwidth of a Network; therefore, no other useful messages or communication can be used among the Network devices.

Imagine that one of the machines got faulty Network Card, how you would easily spot a Faulty NIC among hundred of machines? And if you decided to use Class B Netmask which will carry thousands of Machines, how for God sack you would spot this bad NIC? So, you got the image.

It’s impossible to spot a bad NIC among hundreds of machines more than 510 connected all together using one network address, although theoretically possible, but because of broadcast deadly messages and even a regular broadcast massages among the machines, this would be impractical to connect hundreds and hundreds of network devices altogether using one Network.

So, sick NIC that all of sudden is sending thousands of broadcast messages inside the one network is capable to stop the whole network (the way a sick customer had stopped the whole train and all the trains behind it), whether you have 2 network devices or hundreds of Network devices connected together, a bad NIC, bad switch’s port, or bad cable’s end, could storm the Network with deadly broadcast messages and bring the whole Network down!

VLAN Blessing

Virtual Local Area Network (VLAN) is blessing solution to reduce broadcast messages. It controls Broadcast messages and limit the connected Network devices to desired number of network virtually.

VLANs stops broadcast hitting all machines in the network, hence, using smaller portion of Hosts bits is a must design to reduce and control broadcast messages and storms.

Running Out of Private IP Addresses

If you ran out of IP addresses when using 10.0.0.0 Network with Netmask 255.255.255.0, then use the next network 10.1.0.0 and the next Network 10.2.0.0 and so on, instead of using Class B Netmask.

Using 255.255.255.0 with different Class A Private Networks, each network will provide 254 usable IP addresses. Finally, you can use either a Router in a Stick or Layer 3 Switch to route communication among the different networks.

Masking Class B Networks

Class B includes 16 Private Networks which can use Class B Netmask or Class C Netmask. The Networks can be laid as follows:

Private Class B Networks 172.16.0.0 up to 172.31.0.0

Class B or C default Netmasks can be used with Class B Private Networks

255.255.0.0 or 255.255.255.0

Note: 255.0.0.0 mask is not meant for Class B Networks or Class C Networks.

All together, there are 172 networks between 172.16.0.0 and 172.31.0.0 for private use. Using netmask 255.255.0.0 will provide you with 216 – 2 = 65, 534 usable IP Addresses, however, use 255.255.255.0 to reduce hosts bits instead.

It all depends on the Network Design, Class A or Class B Private Networks can do the job, and Class C default Netmask 255.255.255.0 should be always your choice to reduce Hosts bits and prevent broadcast problems.

Masking Private Class B Networks

Decimal

Class B Network: 172.16.0.0
Class C Netmask: 255.255.255.0

Binary

Class B Network: 10101100.00000000.00000000.00000000
Class C Netmask: 11111111.11111111.11111111.00000000
                 nnnnnnnn.nnnnnnnn.nnnnnnnn.hhhhhhhh

Since Class default Netmask is used, the third byte at 172.16.0.0 Network becomes part of the network. Using 255.255.255.0 will leave you with only 254 usable IP Addresses.

Use the Next Class B Private Network for more usable IP Addresses, 172.16.1.0 Network or 172.16.2.0 can be used for the next 254 usable IP Addresses, up to the 172.16.255.0 Class B Private Network

Note: keep in mind that Classful Netmask Addresses are not used anymore in Public Networks (The Internet) since the beginning of the 90’s, therefore; Classful A, B, and C default Netmasks can be used only in Private Networks.

Instead, public IPv4 Networks use Classless Subnet Masks (CIDR) since 1993 to utilize the IPv4 Address Space more efficiently.

Next articles will explain how Classless Network and Subnet Mask (Sub Network Mask) extended the life of IPv4 Public IP Addresses, and instead of dealing with Netmasking, you will deal with Subnet Masking, or for short Subnetting!

Subject Related

By Wikipedia Classful Networks | Router Ally IPv4 | HighTech IPv4 Addressing | The TCP IP Guide | Cisco CCNA Simplified | Cisco CCNA in 60 Days | CCNA R&S Certification Kit | Subnetting Made Easy | Who is Running the Internet | IP Addressing and Subnetting | The Only IP Book You Will Ever Need!

"Understanding Classful Network Mask", 5 out of 5 based on 1 ratings.

CCNA Routing and Switching
<< IP and Network Fundamentals Course
>> IPv4 Address System Section

section table
  1. Understanding IPv4 Addressing System
  2. Understanding Class A Network IP Addresses
  3. Understanding Class B Network IP Addresses
  4. Understanding Class C Network IP Addresses
  5. Understanding Classful Network Mask
  6. Understanding Classless Subnet Mask
  7. Understanding Classless Subnetting Concept
  • Was this information helpful?
  • Yes(0)   No(0)
Get CCNA R&S Updates!

system-software-update-hi

ALSO ON CCNA HUB
  • Understanding Class A Network IP Addresses
    Understanding Class A Network IP Addresses
  • Understanding Class B Network IP Addresses
    Understanding Class B Network IP Addresses
  • Understanding Class C Network IP Addresses
    Understanding Class C Network IP Addresses
  • Understanding Classless Subnetting Concept
    Understanding Classless Subnetting Concept

Filed Under: IP Fundamentals, IPv4 Address System Tagged With: Subnet Maks, Network Mask

About Imad Daou

CCNA HUB Founder, Imad has been in IT field since 2007. Currently holding A+, Network+, Server+, Security+, and Storage+. HP, Dell, and IBM Hardware Certified. Pursuing Linux+, LPIC-2, RHCSA, RHCE, AWS, CCNA, and JNCIA.

LEAVE A COMMENT Cancel reply

We're glad you have chosen to leave a comment. All comments are moderated according to our comment policy. Use your real name and not keywords in the name field. Let's have a personal and meaningful conversation.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

Get CCNA HUB Updates!

MISSION

CCNA, Linux, and Wordpress Training Hub. For Students, Network Pros, DevOps, Linux/Wordpress Lovers, and Entrepreneurs. CCNA HUB Articles and Labs will help you build a solid foundation in Network, Linux, and Wordpress. E.g. Linux WHS will show you how to build a Professional Web Hosting Solution using DigitalOcean or Vultr VPS provider.

TAG CLOUD

transport layer WAN virtual circuit switches understanding switching transmission control protocol tcp sockets sudo wordpress CMS TCP/IP SSH Agent Forwarding VLSM wordpress.org CMS understanding Routing Wordpress Hosting Hub VPS Hosting udp sockets TCP subnet mask T1 wide area network transport layer protocols Wordpress Multisite SSH Client su

RSS UPDATES

  • IP Fundamentals
  • CCNA R&S
  • CCNA Labs
  • Linux WHS
  • Wordpress
  • All CCNA HUB Topics

Copyright © 2021 ·Genesis Sample Theme - Genesis Framework by StudioPress - WordPress - Log in

This website uses cookies. By continuing to browse the site, you are agreeing to our use of cookies