Skip to main content

Subnet masking -II


What we discussed in the previous section is Classful subnet masking. A Subnetmask normally contains the host portion of the bits also. This is called Classless Inter Domain Routing (CIDR). This will enable more networks for a given class of network address. For example, allowing 3 host bits towards subnet portion in our previous IP address, will allow us to offer 2X2X2 or 8 additional subnetworks. Traditionally, all zeros, and all ones subnets are not used, and hence we are left with 6 subnets.
192.189.210.078: 1100 0000.1011 1101.1101 0010.0100 1110 Class C IP Address
255.255.255.224: 1111 1111.1111 1111.1111 1111.1110 0000 Class C subnet mask with 3 additional bits of host portion used for Subnetting.
Broadcast address: 1100 0000.1011 1101.1101 0010.0101 1111 :192.189.210.95
The above is the broadcast address for a given subnet (192.189.210.078). Under Classful routing, the broadcast address would have been 192.189.210.255.
Note that by using Subnetting, we are able to increase the number of networks available within a given IP address. On the otherhand, we will be loosing the number of hosts available within a subnet to 2or 16 hosts per subnet. Again, all zeros, and all ones host addresses are traditionally reserved for other purposes.
CIDR (Classless InterDomain Routing) notation: Subnet mask is also represented as below:
192.189.210.078/27, where 27 is the number of bits in the network portion of the IP address.
Why use CIDR?
Normally, ISPs allocate the IP addresses for individuals or Corporates.  The reason being that it is almost impossible to allocate a classful IP address to every individual or a corporate. Using CIDR, the biggest ISPs are given large pool of IP address space. The ISP's customers such as individual or Corporates are then allocated networks from the big ISP's pool. This kind of arrangement will enable efficient management and utilization of the Internet.
Classful addresses can easily be written in CIDR notation
Class A =  A.B.C.D/8, Class B = A.B.C.D/16, and Class C = A.B.C.D/24
Where A,B,C,D are dotted decimal octets.
Example Question:
You have an IP of 156.233.42.56 with a subnet mask of 7 bits. How many hosts and subnets are possible?
A. 126 hosts and 510 subnets
B. 128 subnets and 512 hosts
C. 510 hosts and 126 subnets
D. 512 subnets and 128 hosts

Correct answer: C
Explanation:
Class B network has the form N.N.H.H, the default subnet mask is 16 bits long.
There is additional 7 bits to the default subnet mask. The total number of bits in subnet are 16+7 = 23.
This leaves us with 32-23 =9 bits for assigning to hosts.
7 bits of subnet mask corresponds to (2^7-2)=128-2 = 126 subnets.
9 bits belonging to host addresses correspond to (2^9-2)=512-2 = 510 hosts.

Comments

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex