Subnetting


 
Thread Tools Search this Thread
Special Forums IP Networking Subnetting
# 1  
Old 03-11-2017
Linux Subnetting

Dear friends am confused with the logic behind subnetting. i am learning from video tutorial and quite didn't get it
so my question is as below

Quote:
Subnetting a class C : 255.255.255.128/25 bits
After subnetting class c address by borrowing one bit from host to network , it leaves host with 7 bit and network increases bit to 25 bits .

According to my video tutorial it stated that theoretically class C address has
one network and 255 hosts. And after subnetting 2 networks with 127 hosts. but i dont think so .... Smilie

i believe class c has around 2097150 network and 255 hosts. i didn't get that logic . please help me get that right in my head.
# 2  
Old 03-11-2017
Say you have a class C network of 192.168.1.0/24 which has 254 usable host addresses, because 192.168.1.0 and 192.168.1.255 are not usable (2^8-2).

By changing the CIDR suffix to 25 , you create two networks:
Code:
192.168.1.0/25

and
Code:
192.168.1.128/25

The first has 126 usable host addresses (192.168.1.{1..126}, 2^7-2)
The second has 126 usable host addresses (192.168.1.{129..254}), 2^7-2)


--
The subnet mask of the /24 network is 255.255.255.0
The subnet mask of the two /25 networks is 255.255.255.128
This User Gave Thanks to Scrutinizer For This Post:
# 3  
Old 03-11-2017
thanks a lot for wonderful explanation. Does that means
Code:
192.168.1.0/24

has 254 usable host address and that 254 host has to share only one network address. ie i can have only one network and within that network i cannot have more than 254 computers.

And using that subnetting i get two network with each network having 126 usable host address.

can you please check what i quoted below make sense or its wrong

Quote:
SmilieSmilielogically every public address without subnetting has only one network address no matter its class A,B or C. With difference class it makes only difference with how much Host it will have .. is that correct SmilieSmilie

Last edited by lobsang; 03-11-2017 at 06:00 AM..
# 4  
Old 03-11-2017
Hi,

To put it as simply as possible, in any given network range the very first address and the very last address are not usable for hosts. The first address is the network address, and the last address is the broadcast address.

So for 192.168.1.0/24 you'd have:

192.168.1.0 - Network address (NOT usable for hosts)
192.168.1.1 through 192.168.1.254 - Free IPs (Usable for hosts)
192.168.1.255 - Broadcast address (NOT usable for hosts)

And for /25 sub-nets (and all others besides) it'd be the same: the first address in the range and the last address in the range are not usable for hosts.
These 2 Users Gave Thanks to drysdalk For This Post:
# 5  
Old 03-11-2017
Quote:
Originally Posted by drysdalk
Hi,

To put it as simply as possible, in any given network range the very first address and the very last address are not usable for hosts. The first address is the network address, and the last address is the broadcast address.

So for 192.168.1.0/24 you'd have:

192.168.1.0 - Network address (NOT usable for hosts)
192.168.1.1 through 192.168.1.254 - Free IPs (Usable for hosts)
192.168.1.255 - Broadcast address (NOT usable for hosts)

And for /25 sub-nets (and all others besides) it'd be the same: the first address in the range and the last address in the range are not usable for hosts.
Thank you Drysdalk . i believe i didn't understood properly what a single ip address means. From your above explanation . for e.g.
Code:
192.168.1.1 through 192.168.1.254 - Free IPs (Usable for hosts)

Does all those ip are list of single ip address. i believe list of hosts in ip class means list of single ip address. Does my public ip address as mentioned
Code:
46.126.40.51

means one of hosts from class A public ip address .
# 6  
Old 03-11-2017
Hi,

Firstly, from just looking at a single IP, you can't tell how large the network it's a part of is. You need to know the netmask. So for example, if I had an IP of 192.168.1.10, that doesn't tell you anything at all about how large or small the network I'm a part of is.

But if I tell you the netmask - e.g. 192.168.1.10/24 or 192.168.1.10/255.255.255.0 - then you know it's part of a network of 256 addresses, running from 192.168.1.0 to 192.168.1.255.

If on the other hand I'd told you the netmask was 192.168.1.10/25 or 192.168.1.10/255.255.255.128 - then you'd know it was part of a network of 128 addresses going from 192.168.1.0 to 192.168.1.127.

And again, in every network, the very first address and the very last address are not usable for hosts, as they are reserved for other purposes.

You can also get plenty of other netmasks than the old simple Class A, B, C notation tells you. For instance I could just have easily told you my netmask was 192.168.1.10/28, in which case you'd then be able to calculate that the network I was a part of runs from 192.168.1.0 to 192.168.1.15, and conists of 16 IP addresses.

So just from looking at an IP you can't tell anything about the size of the network. And these days, there are far more netmasks and subnet sizes that are far more common than the old Class A/B/C notation.
This User Gave Thanks to drysdalk For This Post:
# 7  
Old 03-11-2017
i just came to learn that my public ip address through whatsmyip

Code:
46.126.40.51

since its class A IP address so default subnet mask is
Code:
46.126.40.51/8  ie 255.0.0.0

does that means apart from from 46.0.0.0 and 46.255.255.255. i can use all the rest for host. And i believe its possible within one network

And when some one bought a class A static IP address for personal use. does that means i can have around 16777214 host within a single network.

Last edited by lobsang; 03-11-2017 at 07:47 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. IP Networking

Subnetting

Guys, Anyone could help me understand subnetting. I know a bit in networking but there are things that I don't get them easily. Thank You in advance. (1 Reply)
Discussion started by: etcpasswd
1 Replies

2. IP Networking

Subnetting in 11 steps

As seen on Digg.com, here is my ip addressing article in full... Original Subnetting in 11 Steps article Subnetting in 11 Steps There are a few things that you will need to know first. I personally use 11 rules that I learned from Mike Vana. Below you will find the 11 rules as well as... (1 Reply)
Discussion started by: jking2100
1 Replies

3. IP Networking

Subnetting

We have subnetted our Internal Network. We used an I.P. range of 172.16.16.0-254, 172.16.17.0-254, 172.16.18.0-254, 172.16.19.0-254 and mask 255.255.252.0. We created a subnet range of 172.16.10.0-254 and maske 255.255.255.0. Our routers are configure to route to approprate network. We are able... (2 Replies)
Discussion started by: cassy
2 Replies
Login or Register to Ask a Question