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

10
  • Can you post a simple diagram? I'm having trouble picturing your scenario.
    – Ron Trunk
    May 8 '18 at 11:50
  • I have added an image. It is from the Cisco article.
    – Alex W
    May 8 '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 8 '18 at 18:20
  • IP addresses are assigned to interfaces, not to routers.
    – Zac67
    May 8 '18 at 18:35
  • This would go well with the other question I have asked today then...
    – Alex W
    May 8 '18 at 18:37
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.

2
  • 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 8 '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 8 '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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.