It is common for network engineers to get a batch of IPv4 addresses and a network topology, and have to allocate addresses. Normally I would request a batch of RFC-1918 (non-internet-routable) address space for loopbacks, p2p links, and IP phones. End hosts would get internet-routable space if available. In this case we only have one /24 of internet-routable space.
You want to be able to grow in two areas over time:
- Growth in number of hosts in each access-subnet
- Growth in number of access subnets
Here's what you currently need for IP addresses in your network:
- 3 /32 loopback addresses (one for each router)
- 3 /31 p2p links (normally you can't use host .0 or the all-broadcast address but /31 is an exception per RFC 3021 https://tools.ietf.org/rfc/rfc3021.txt)
- 3 access subnets
Since this is a class exercise, lets forget about #2 (growth in number of access subnets). Having access-subnets smaller than /26 is usually problematic. /27's are pretty darn small.
We can split one /24 into four /26's. We have 3 subnets. So lets allocate one /26 to each access subnet. That leaves one /26 for p2p, loopback addresses, and growth. That gives us this first-level allocation:
- 220.127.116.11/26: For loopbacks, p2p links, and growth
- 18.104.22.168/26: For hosts on subnet connected to R1
- 22.214.171.124/26: For hosts on subnet connected to R2
- 126.96.36.199/26: For hosts on subnet connected to R3
Since we have 3 routers, a /30 (4 IPs) is sufficient for loopbacks, but lets allocate a /29 (8 IPs) for growth. To achieve artistry, lets have the last octet of the IP match the router name.
For each access-subnet, I always reserve the first 3 IPs for routers. That's usually subnet+1 for the default route (which might be a HSRP or VRRP IP) and subnet+2 and subnet+3 for redundant routers. In this case we have one router per subnet so it goes at subnet+1.
That gives us this 2nd level allocation:
188.8.131.52/29: For loopbacks
184.108.40.206/29: For /31 p2p links
220.127.116.11/31: R1-R2 p2p link
18.104.22.168/31: R2-R3 p2p link
22.214.171.124/31: R3-R1 p2p link
126.96.36.199/28: For growth (possible future p2p links)
- 188.8.131.52/27: For growth (possible future subnet)
184.108.40.206/26: For hosts on subnet connected to R1
220.127.116.11-67: reserved for possible future router interfaces
18.104.22.168-126: reserved for future hosts
22.214.171.124/26: For hosts on subnet connected to R2
126.96.36.199-131: reserved for possible future router interfaces
188.8.131.52-190: reserved for future hosts
184.108.40.206/26: For hosts on subnet connected to R3
220.127.116.11-195: reserved for possible future router interfaces
18.104.22.168-254: reserved for future hosts
If we were concerned about growth in number of subnets over time, we would have no choice but to reduce each subnet allocation from a /26 to a /27. But that's pretty small for a real access subnet (only 30 usable IPs). That's where you begin to think about using RFC1918 address space and setting up NAT.
At some point, professors should start assigning IPv6 allocations. What if the same network was assigned 2001:0db8:0123:4500::/56 ?