1

I intend to implement an interconnected star topology network. For this, I am using 3 routers: Router A, A1 and A2.

           internet
              |
           Router A
         172.16.0.1 /16
          /         \
         /           \
        /             \
     A1                A2
172.16.1.1 /24    172.16.2.1 /24
     /\                /\
    hosts             hosts

I wish to assign the IPs in a hierarchical manner, to allow the subnets A1 and A2 be independently managed and further broken into even smaller subnets.

How should I configure the IP address of each interface in this situation?

Could I use the same IP (172.16.1.1) on both A1's interfaces?

Lets say eth0:172.16.1.1/16 and br1:172.16.1.1/24

I would actually want to use host address 0, but I've omitted that above to avoid confusion, so I wrote 1 instead.

1 Answers1

3

You technically could use the same address on both interfaces, but the traffic for /24 will only go to the interface with that subnet, since routing follows the longest network prefix. However, if the interface with the /24 is down, traffic for that subnet will go to the /16 interface, where it will die.

Best practice is not to have overlapping ranges, unless you have a specific requirement

Kevin
  • 161
  • 4
  • So, a packet originating from the /16 subnet with destination 172.16.1.1 will first pass on the other side and arrive at the /24 interface. However, a packet originating from the /24 subnet will arrive at the same /24 interface.Did I get that right? – Radu Marinescu Jan 10 '20 at 04:54
  • If the source is in the /16, it will stay local because it is not aware that another network with the same target as 172.16.1.1. With the exception of special cases, routing information is not propagated down to the end hosts. Since the destination is a local address in the /16 block, it would never need to be routed. This type of config is bad news and sure to cause problems – Kevin Jan 10 '20 at 19:05
  • I can imagine this scenario working in case of some dynamic routing protocol in place (the /24 subnets would be propagated "up" to A router). The question is if this would be understood as "simple" configuration or if the easier way would be just select other address schema. It may have sense to keep one /24 subnet as interconnection and other /24 subnets for "sub routers". – Kamil J Jan 11 '20 at 23:03
  • Actually, I would rip into any of my people that came up with a plan like this, unless there was a very good reason. It is fraught with problems and will bite you later. Just assign non-overlapping network to each interface – Kevin Jan 12 '20 at 14:34