Sunday, June 16, 2019
Netmask
A netmask is a 32-bit binary mask used to divide an IP address into subnets and specify the network's available hosts.
Netmask primarily provides a method to create small subnetworks from a large range of IP addresses. Generally, netmask length is defined in up to 24-bit format for all types of IP classes. The division or creation of networks into subnetworks depends on the class of IP address in use along with their available netmasks. For example, the netmasks for the three IP classes are:
In a netmask, two of the possible addresses, represented as the final byte,
are always pre-assigned and unavailable for custom assignment. For
example, in 255.255.225.0, "0" is the assigned network address. In
255.255.255.255, the final "255" is the assigned broadcast address. These two values cannot be used for IP address assignment.Netmask primarily provides a method to create small subnetworks from a large range of IP addresses. Generally, netmask length is defined in up to 24-bit format for all types of IP classes. The division or creation of networks into subnetworks depends on the class of IP address in use along with their available netmasks. For example, the netmasks for the three IP classes are:
- 255.0.0.0 for Class A with an 8-bit netmask
- 255.255.0.0 for Class B with a 16-bit netmask
- 255.255.255.0 for Class C with a 24-bit netmask
Below is an example of a netmask and an example of its binary conversion.
| Netmask: | 255. | 255. | 255. | 255 |
|---|---|---|---|---|
| Binary: | 11111111 | 11111111 | 11111111 | 11111111 |
| Netmask length | 8 | 16 | 24 | 32 |
A commonly used netmask is a 24-bit netmask, as seen below.
| Netmask: | 255. | 255. | 255. | 0 |
|---|---|---|---|---|
| Binary: | 11111111 | 11111111 | 11111111 | 00000000 |
| Netmask length | 8 | 16 | 24 | -- |
A simple formula can be used to determine the capable amount of networks a netmask can support.
2^(netmask length - # of used segments) - 2For example, if we used a netmask length of 24, having a netmask of 255.255.255.0 with three used segments, subtract three from the netmask length, e.g., 24-3 = 21. With this number determined, plug it into the above formula to get 2^21 - 2 = 2,097,150 total number of networks. You are subtracting two from this number because of the broadcast and network addresses that are already being used.
Another example is a netmask length of 16, having a netmask of 255.255.0.0 with two used segments. Using the above formula, you would get 2^14 - 2 = 16,382 total number of networks.
To determine the number of hosts a netmask is capable of supporting, use the following formula.
2^(# of zeroes) - 2For example, with a netmask length of 24, as shown in the above chart, there are eight zeroes. Therefore, using the formula above, this would be 2^8 - 2 = 254 total number of hosts. Again, two is subtracted from this number to account for the broadcast and network addresses.
Again, another example of a netmask length of 16, there would be 16 zeroes. The formula, in this case, would be 2^16 - 2 = 65,534 total number of hosts.
Below is a breakdown of each of the commonly used network classes.
| Class | Netmask length | # of networks | # of hosts | Netmask | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Class A | 8 | 126 | 16,777,214 | 255.0.0.0 | ||||||||||||||||||||||||||||||||||
| Class B | 16 | 16,382 | 65,534 | 255.255.0.0 | ||||||||||||||||||||||||||||||||||
| Class C | 24 | 2,097,150 | 254 | 255.255.255.0 |
Mounting Filesystems in Linux
On Linux and UNIX operating systems you can use the
The
In this tutorial, we will go over the basics of attaching and detaching various file systems using the
For more linuxize.com/post/how-to-mount-and-unmount-file-systems-in-linux
mount
command to attach (mount) file systems and removable devices such as
USB flash drives at a particular mount point in the directory tree.The
umount command detaches (unmounts) the mounted file system from the directory tree.In this tutorial, we will go over the basics of attaching and detaching various file systems using the
mount and umount commands.For more linuxize.com/post/how-to-mount-and-unmount-file-systems-in-linux
Routing Tables
A basic routing table includes the following information:
- Destination: The IP address of the packet's final destination
- Next hop: The IP address to which the packet is forwarded
- Interface: The outgoing network interface the device should use when forwarding the packet to the next hop or final destination
- Metric: Assigns a cost to each available route so that the most cost-effective path can be chosen
- Routes: Includes directly-attached subnets,
indirect subnets that are not attached to the device but can be
accessed through one or more hops, and default routes to use for certain
types of traffic or when information is lacking. Routing tables can
be maintained manually or dynamically. Tables for static network devices
do not change unless a network administrator manually changes them. In
dynamic routing, devices build and maintain their routing tables
automatically by using routing protocols to exchange information about the surrounding network topology.
Dynamic routing tables allow devices to "listen" to the network and
respond to occurrences like device failures and network congestion.
Example: - source: https://searchnetworking.techtarget.com/definition/routing-table
Python: Learn, qualify and work
Links to learn Python. Then qualify tests and get internships/jobs.
Learn sanfoundry.com/1000-python-questions-answers
Qualify and Work: https://rank.sanfoundry.com/python-programming-tests
Learn sanfoundry.com/1000-python-questions-answers
Qualify and Work: https://rank.sanfoundry.com/python-programming-tests
Subscribe to:
Comments (Atom)
-
//The HTML index page <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change ...
-
Here are some links to online work sites https://www.upwork.com/ https://www.guru.com/ https://studio.envato.com/freelance-switch/ htt...
-
Acronym Full Form AJAX Asynchronous JavaScript and XML API Application Programming Interface APK Android Application Package ASP Activ...