2

Having a 192.168.1.0/24 network connected to a router1 on eth0, I want to access several others in the 192.168.222.0/28, 192.168.222.16/28, ..., 192.168.222.240/28 range, all accessible through eth1.

Is it OK to add a single "192.168.222.0/24 via eth1" routing entry, or do I need to add one for each network "192.168.222.0/28 via eth1", "192.168.222.16/28 via eth1", ...

Kind regards.

Edit

Actually, eth1 is connected to another router2, living in the first subnet 192.168.222.0/28 with the IP 192.168.222.1. That one is the one routing to all the other subnets, that is, specifying their gateways with individual rules. So that router2 is the one which would be the gateway for router1's "192.168.222.0/24 via 192.168.222.1%eth1" entry.

On router1 is it possible to insert just one rule? Can there the "route summary" Pedro Brito is talking about be applied?

  • what kind of router are we talking about? – Mike Pennington Nov 5 '14 at 9:20
  • MikroTik (RouterOS) – Daniel F Nov 5 '14 at 12:06
3

It's generally possible. It's called a route summary and normally used to simplify routing when using static routes or to reduce the size of the routing table.

If there's a subnet in the range that isn't accessible via eth1, packets are still going to be delivered in that interface, unless there's a more specific route pointing somewhere else.

  • Hi, thanks Pedro, I've added some additional text to the question. I'll check that "route summary" to see if this answer fits the question. – Daniel F Nov 5 '14 at 12:16
  • And there won't be any issues with the broadcast addresses? Won't broadcasts then also get routed out to eth1? I mean, if 192.168.222.15 is the broadcast address for 192.168.222.16/28, router1 wouldn't mind to route it via eth1 – Daniel F Nov 5 '14 at 12:19
  • 1
    Since the Router isn't directly connected to any of the 192.168.222.x networks, it would never receive a 'broadcast' packet in that range. Which is to say, since Router's don't forward broadcasts, when Router2 receives a broadcast destined to 192.168.222.15, it won't pass it to Router1. The only broadcast Router1 may see is 192.168.222.7, since it is directly connected to that network (if I understand the topology correctly), and it knows that 192.168.222.7 is a broadcast because the directly connected 192.168.222.0/29 network is a more specific route than the 192.168.222.0/24 static route. – Eddie Nov 5 '14 at 13:11
  • @Eddie I totally overlooked that... Thanks, now everything (related to this question) makes sense. – Daniel F Nov 5 '14 at 13:13

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.