Suppose you bought the class C range 126.96.36.199 /24. This range supports upto 254 addresses. But in your network you have two small separate networks each consisting of only 100. The range you have can obviously cover both networks but because the two networks are physically/organizationally separate, you can not assign them both the same range. Without subnetting the only way is to buy a new range (say 188.8.131.52/24) and assign it the second network. This is a complete waste of address space and budget. With subnetting you can simply split the first range into two (184.108.40.206/25 and 220.127.116.11/25) and give each network it's own sub range.
Hope this makes sense.
Re: Subnetting Advantages/Questions
8 years 5 months ago #33504
It's basically what S0lo said but it points out why you need subnets.
The short of it is..
Without subnets you have to allocate an entire class A B or C address block per network so we use subnets to allow routers to be able to find fragments of those blocks on different autonomous systems.
Think about it this way. Not using subnets:
You have 2 networks. You have an entire class C address range.
You give 18.104.22.168 to your A router for your A network
And you give 22.214.171.124 to your B router for your B network
You assign 126.96.36.199- 188.8.131.52 for hosts on Network A
You assign 184.108.40.206-194.1.140 for hosts on Network B
Then you let users try to communicate.
Host 220.127.116.11 tries to ping 18.104.22.168
The packet goes out the network interface card as a packet wrapped in a frame hits the first switch which then floods the requests out of all ports on the local LAN. Of course by flooding the frame it will eventually get to the network router which drops the packet due to filtering because without sub dividing IPs into some logical groups it thinks that 22.214.171.124 is within the same logical group as that source 126.96.36.199. (and if your next question is why do routers need logical groups the answer is route tables would simply be to big to record IP addresses and paths for every node)
Basically from the routers point of view when you tell it route a packet it from 188.8.131.52 to 184.108.40.206 it tells you it's not sending it because it should be on your local LAN anyways.
Subnetting solves this
Lets try 255.255.255.128 (/25) (one bit was used to identify that you broke the network in two groups)
Effectively you now have 2 SUB GROUPS of IP's (subnets) recognized by your routers.
A list of IP's that Range from
Effectively your networks are now identified by 220.127.116.11 for A and 18.104.22.168 for B both with a /25 mask.
So now lets go back to our example:
*note IP's changed with allowable addresses
Host 22.214.171.124 on Network A
wants to ping
Host 126.96.36.199 on Network B
The network interface card kicks our the frame holding the packet to the local switch.
Switch doesn't recognize the mac address so it floods to all ports
eventually hitting the network router.
This time around the network router gets the packet and it forwards it instead of filtering it.
And the million dollar question is why did it forward it with subneting instead of filtering it out?
The answer is:it looked at the subnet ID 188.8.131.52 and the mask of 255.255.255.128 and realized 184.108.40.206 can't be in the same range as 220.127.116.11 because that subnetwork grouping only goes to 127.
Continuing on the router passes the packet along it's default route where the next router which receives it similarly evaluates 18.104.22.168 /25 to be on a different network then 22.214.171.124/25 and passes it hop to hop till it eventually gets to the router that knows 126.96.36.199 /25 must be on network 188.8.131.52/25 and forwards it accordingly.
To summarize: subnets subdivide networks.
Subdivision allows routing to be manageable.
(Manageability is created because your grouping things up.)
Without division you do not have a reasonable logical way of knowing where something is.
Re: Subnetting Advantages/Questions
8 years 5 months ago #33509