1

This question is motivated by the example given near the end of Cisco's article on Subnet Zero and the All-Ones Subnet (from the subsection titled The All-Ones Subnet), but I include all necessary details here.

Suppose we have a router A connected to the rest of the network/internet with (arbitrary) network address and mask 195.1.2.0/24, and suppose we want four routers connected to this one router (and not the rest of the network), named W, X, Y, and Z and each with one quarter of this allocation of IPs. These would be of the form 195.1.2.{0,64,128,192}/26.

If Router A is sent a packet with destination 195.1.2.255, Router A would forward this to router Z (as it lies in router Z's range), which has broadcast address 195.1.2.255, and hence broadcasts the message up to router A. Would this then be sent back to router Z, resulting in a routing loop?

Cisco's article suggests that this is avoided with the correct maskings (24 and 26) but, if all maskings are (incorrectly) 24, this routing loop occurs. Why?

Below is an image of the organisation of the routers, by Cisco and from the above link.

The image of the organisation of the routers, by Cisco, from the above link

Alex W
  • 263
  • 2
  • 6
  • Can you post a simple diagram? I'm having trouble picturing your scenario. – Ron Trunk May 08 '18 at 11:50
  • I have added an image. It is from the Cisco article. – Alex W May 08 '18 at 18:09
  • You are showing more than four networks. Where are the specific addresses in question on the diagram? Remeber that every interface on a router will have its own address and mask, and they cannot overlap in a single router. – Ron Maupin May 08 '18 at 18:20
  • IP addresses are assigned to interfaces, not to routers. – Zac67 May 08 '18 at 18:35
  • This would go well with [the other question I have asked today](https://networkengineering.stackexchange.com/questions/50352/network-gateways-vs-interfaces) then... – Alex W May 08 '18 at 18:37
  • It may be the case that my question actually doesn't make sense. If you can explain that in an answer, I'm willing to also accept that. – Alex W May 08 '18 at 18:39
  • @RonMaupin I'm not sure I understand technically what a network is, then. I believed the following could work: Router 1 has assigned to it 195.1.2.0/24, and is connected to the internet. With this, instead of having connections to all interfaces(?), it can connect to four other routers each of which forwards to a quarter of the range, giving each a 26-bit mask. These then connect to interfaces. – Alex W May 08 '18 at 18:43
  • Each router interface is connected to a different network, and each interface will have an address in the network to which it is connected. Router A will have two addresses: the address for its ISP, and a local network address. The other routers on the local network will have addressing in that network, but the other routers will have addresses for the other networks connected to their other interfaces. Every interface in a router will have an address in a network that does not overlap with the network on any other router interface. Routers route packets _between_ networks. – Ron Maupin May 08 '18 at 18:52
  • 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 provide and accept your own answer. – Ron Maupin Dec 25 '18 at 08:24
  • @RonMaupin I ended up quite confused and I'm planning on coming back to the answers after/during a one-week networking course I have in February. – Alex W Dec 25 '18 at 11:36

2 Answers2

1

First, routers do not forward broadcasts, but assume it was traffic destined for a different, unicast address. Routers route traffic between networks, not from a network back to the same network.

Assume Router A has four interfaces, one for each of the networks. Any traffic from one of the networks to any of the other three networks will enter Router A from its source network. Router A will then forward the traffic to the appropriate interface for the destination network. That is the end of the story. No other routers need be involved because Router A can reach all four networks.

Now, assume Router A connects to only two of the networks: 195.1.2.0/26 and 195.1.2.64/26. Router A shares 195.1.2.64/26 with Router Z, which is also connected to 195.1.2.192/26. If traffic needs to get from 195.1.2.23 to 195.1.2.216, the 195.1.2.23/26 host will know that the destination is on a different network, and it will send the packets to its gateway (Router A).

Router A will need to know where to forward traffic destined to a network to which it is not directly connected, otherwise it will simply drop traffic to any network that it does not know. Either you have manually configured a static roue toward Router Z for the 195.1.2.192/64 network, or Router A and Router Z share a common routing protocol, and Router Z has told Router A that it knows how to get to that network.

Router A will forward the packets sourced from 195.1.2.23 and destined to 195.1.2.216 to Router Z. Router Z will know it is directly connected to the destination network, and it will forward the packets to the interface to which the destination network is connected.

Ron Maupin
  • 98,218
  • 26
  • 115
  • 191
  • I am not sure I understand or think you may have answered a slightly different (albeit also helpful) question. I was focusing particularly on the specific destination of 195.1.2.255 as it marks the end of the range of both Router A and Z (traditionally the broadcast addresses), and is contained in both Router A's and Z's range. I have tried to clarify my question by mentioning that Router A is connected to the internet and the others are not; I am not sure whether this is important. It could be the case the message derived from outside these routers. Routers W-Z connect only to hardware. – Alex W May 08 '18 at 18:36
  • If Router A is connected to `195.1.2.0/24`, it knows that `195.1.2.255` is the broadcast address for that network, and it will not forward that address anywhere else. If Router Z is not addressed with `195.1.2.0/24` or `195.1.2.192/26`, it will know that address is in a different network, and it will try to forward it to the interface in its routing table that indicates the network is that direction. Router A, receiving that will inspect the packets with that address because they are broadcasts to it, but it will not forward then anywhere wlse. – Ron Maupin May 08 '18 at 18:46
1

An IP address isn't assigned to a router. The router has interfaces and that's where the IP addresses are assigned to.

In the diagram, let's assume router 1 has 195.1.1.1/24 assigned to its downfacing interface. Accordingly, routers 2-5 would have an IP address from the same subnet assigned to each upfacing interface. Let's assume these are 195.1.1.2, 195.1.1.3, 195.1.1.4, and 195.1.1.5. Effectively, you can use any network address that's not being used anywhere else in your network, including the bottom subnets.

Now you can connect one of your four subnets to each routers downfacing interface: 195.1.2.1/26, 195.1.2.65/26, 195.1.2.129/26, and 195.1.2.193/26.

Zac67
  • 81,287
  • 3
  • 67
  • 131