A teacher told us about VLSM and "nested subnetting":
- you should NOT use all-1 / all-0 subnets
- the same public network you got, can be split up in subnetworks of different size / having different subnet masks
- you can nest subnets, so that the same IP actually belongs to 2 subnetworks: in the example below the range of B is from 184.108.40.206 to 190, but C is nested inside from 220.127.116.11 to 18.104.22.168; furthermore B & C are nested in A
- the aim of this is to waste less IPs
- it is not supported by routers, but theoretically it would work
The teacher gave us examples with requirements like these:
- you got 22.214.171.124 /24 from your ISP
- A: 140 hosts
- B: 20 hosts
- C: 2 hosts
- given: C should be nested in B
--> using equally sized subnets without nesting will not work
┌───────┬──────────────┬──────────┬──────┬──────────┬─────────┬─────────┐ │network│net address │last octet│suffix│first host│last host│broadcast│ ├───────┼──────────────┼──────────┼──────┼──────────┼─────────┼─────────┤ │A │126.96.36.199 │0000 0000 │/24 │1 │254 │255 │ ├───────┼──────────────┼──────────┼──────┼──────────┼─────────┼─────────┤ │B │188.8.131.52│1010 0000 │/27 │161 │190 │191 │ ├───────┼──────────────┼──────────┼──────┼──────────┼─────────┼─────────┤ │C │184.108.40.206│1011 1100 │/30 │189 │190 │191 │ └───────┴──────────────┴──────────┴──────┴──────────┴─────────┴─────────┘
I had never head about it and could not find very much information, so I have some questions about it:
- I think C is an all-1-subnet, am I right?
- What happens if a router (e.g. the router connecting the local network to the internet) receives a packet with target = 220.127.116.11? How does it decide, whether to route it to all hosts (everyone between 18.104.22.168 and 22.214.171.124, no matter, whether it is in subnet B or C) or just to the hosts, that are directly in network 126.96.36.199 (the root of the nested networks)
- Who will receive packets addressed to 188.8.131.52? All hosts in B including C or only the hosts in C?
- In general, even if you do not use VLSM and nesting, but you ALLOW all-0 / all-1-networks: How do you distinguish between the network / broadcast address of the "super-network" and the sub-network? (following the linked article it should work meanwhile)
- Does anyone use this technique in real life?
Cisco article about all-1 and all-0 subnets http://www.cisco.com/c/en/us/support/docs/ip/dynamic-address-allocation-resolution/13711-40.html