1

Take a look at this picture: enter image description here

My professor usually gives a topology like this and gives me a base IP. Let's say the base IP given is: 223.1.0.0/24. We're then asked to construct the given topology by subnetting, starting from the base IP.

In this case, we would borrow some bits from the host portion of the base IP and make subnets. What is the essence of this base IP? What router has this base IP assigned? How is that router connected to this topology?

Look at the subnet between R1 & R2. What is that a subnet of? How is that a subnet of the router with base IP? Its not even connected to the base router? All the 6 subnets in the picture can NOT be direct descendant subnets of the base router/ip. Why, then, we can just borrow 3 bits from the host portion of the base router to make these subnets?

baconater
  • 11
  • 1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer. – Ron Maupin Dec 16 '20 at 23:50

3 Answers3

2

Your professor gave you a contrived exercise in order for you to practice subnetting. It doesn't happen that way in real life. There is no "base router."

Sometimes, if you were designing a new network, you might assign a private address block, or you are given a block one from someone else. but there still is no base router as your professor may have described (I am assuming you understood his instructions correctly).

Ron Trunk
  • 67,450
  • 5
  • 65
  • 126
2

Mind that IP addresses are assigned to interfaces, not to devices.

Subnetting is a method of splitting a larger network into smaller ones (with longer prefix), so that you can use them for different networks.

The network (address block) you start with has either been assigned to you by your ISP or a local RIR (public IP), or it's been selected from the reserved private IP blocks. This network is split up into all the subnets you require, including link segments.

If your design is clever enough it'll last many years in spite of network growth and integration of new applications. If you discover limitations in your subnetting scheme over the years you'll need to renumber the network at some point or other.

Your "base IP" is the network prefix. At least with IPv4, that exact IP address isn't directly used on any interface (due to all host bits being zero), but it is the common aggregated routing prefix for all your subnets.

Note that in your question you actually subnet 223.1.0.0/20, not 223.1.0.0/24. Also, each IP address assignment should be accompanied with its prefix length (e.g. 223.1.9.1 /30).

For subnetting you should check out this excellent Q&A. It should be able to answer all questions: How do you calculate the prefix, network, subnet, and host numbers?

Zac67
  • 84,333
  • 4
  • 69
  • 133
1

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:

  1. Growth in number of hosts in each access-subnet
  2. 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:

  • 223.1.0.0/26: For loopbacks, p2p links, and growth
  • 223.1.0.64/26: For hosts on subnet connected to R1
  • 223.1.0.128/26: For hosts on subnet connected to R2
  • 223.1.0.192/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:

  • 223.1.0.0/29: For loopbacks

    223.1.0.1: R1-loopback
    223.1.0.2: R2-loopback
    223.1.0.3: R3-loopback
    
  • 223.1.0.8/29: For /31 p2p links

    223.1.0.8/31: R1-R2 p2p link
    223.1.0.10/31: R2-R3 p2p link
    223.1.0.12/31: R3-R1 p2p link
    
  • 223.1.0.16/28: For growth (possible future p2p links)

  • 223.1.0.32/27: For growth (possible future subnet)
  • 223.1.0.64/26: For hosts on subnet connected to R1

    223.1.0.65: R1-eth
    223.1.0.66-67: reserved for possible future router interfaces
    223.1.0.68: host
    223.1.0.69: host
    223.1.0.70-126: reserved for future hosts
    
  • 223.1.0.128/26: For hosts on subnet connected to R2

    223.1.0.129: R2-eth
    223.1.0.130-131: reserved for possible future router interfaces
    223.1.0.132: host
    223.1.0.133: host
    223.1.0.134-190: reserved for future hosts
    
  • 223.1.0.192/26: For hosts on subnet connected to R3

    223.1.0.193: R3-eth
    223.1.0.194-195: reserved for possible future router interfaces
    223.1.0.196: host
    223.1.0.197: host
    223.1.0.198-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 ?

Darrell Root
  • 2,193
  • 1
  • 9
  • 12