I am trying to set up communication across a network, and I have run into a bit of a problem.

In the diagram below, why is it that I cannot ping host 2 from host 1? Router 1 has interfaces on both networks net1 and net2.

What rule do I have to add to the routing table to tell router 1 that it can access net 2 on its 2.250 interface?

I have tried

ip route add via but I get the error RTNETLINK : no such process.

enter image description here

  • Edit your question to include the Router1 configuration.
    – Ron Maupin
    Oct 26, 2015 at 20:01
  • Also, what is the default gateway for Host2. If it is set for Router4, Router4 would need to have a route to Net1.
    – Ron Maupin
    Oct 26, 2015 at 20:03
  • you show the net1, net2 networks with cloud symbol which is used mostly for the internet, what are they exactly? Are you just trying to say they're switches with clients connected?
    – allwynmasc
    Nov 28, 2015 at 5:20
  • 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 your own answer and accept it.
    – Ron Maupin
    Aug 7, 2017 at 0:33

4 Answers 4


You likely have a routing problem, but it probably isn't on R1 (which should know both subnets because they are directly connected). We wouldn't be able to confirm without knowing the router/host configurations and possibly the router vendor/model.

Having more than one router, each with distinct networks beyond it and not directly connected to the other routers, on the same subnet as hosts can be less than ideal. While it can work just fine, there are generally not "good" solutions to the problems that arise.

First, you do have to make sure that the each router knows about the networks beyond the other routers. Static routes are problematic as they are more difficult to maintain and prone to error. So this means running a routing protocol. (For the rest of my answer, I will assume that a routing protocol is running between the routers.)

Running a routing protocol on the routers on the same network where hosts are connected creates security implications. This can provide valuable information to an attacker (internal or external on compromised resource) about the network topography and subnets in use. Additional steps would be required to secure this.

Second, you have the issues associated with the hosts themselves. Typically hosts only have one "default" route or gateway where they will send all traffic destined to non-local subnets.

Here you have a number of options, none of them what I would consider "good":

  1. Configure static routes for other subnets on each host: again management issues and prone to error.
  2. Configure hosts to participate in a routing protocol: again security concerns and you need to make sure that the hosts can't inject routes into the router's routing table.
  3. Depend on ICMP redirects: security implications and more security implications. Generally turned off on routers and hosts are often configured to not respond to ICMP redirects. You would need to make sure it was enabled on all devices.
  4. Let the routers do the work without ICMP redirects. Probably the best option, but this means that your routers acting as default gateways will be processing more traffic, which means that they may need to be "bigger" (i.e. higher performance, possibly faster interfaces) and there are some security concerns. Why is this the case? Because traffic that is intended for those other routers needs to be received on an interface and then sent back out that same interface to another router.

So, what are alternatives? Well, if you go back to my statement early on in this post, there are a few things I could consider better options:

  1. Provide direct connections between your router(s) acting as the default gateway and the other routers using physical interfaces. This require more interfaces per router and still may require a "bigger" router, but it provides a number of benefits.
    • You can run your routing protocol on interfaces where hosts are not connected.
    • You avoid any security concerns when you would receive and send the same traffic on the same interface.
    • You avoid "doubling" the outbound traffic by not receiving and sending the same traffic on the same interface.
    • Increased redundancy when using HSRP, VRRP, GLBP or similar to provide gateway redundancy.
  2. Provide direct connections between your router(s) acting as the default gateway and the other routers using "virtual" interfaces, for example through the use of VLANs and trunking/tagged links. Gives the same first two benefits I mentioned in the first option.
  3. Add a router (or routers for redundancy) between hosts in Net1 and R1/R2/R3 (as well as other similar locations such as Net2/Net4). Basically provides all the benefits from the first option, but requires extra hardware to a manage.

The only thing i guess, you need to do is to add a route on host1 and 2:

Host1: ip route add via
Host2: ip route add via

Router already knows hoe to reach the two networks, ´cause it have directly connected.

  • I would think that if the gateways of the two hosts is not Router1, the real answer would be to have routing set up on the routers so that each router knows how to reach the networks in question. Why have routers if they only know how to reach their own attached networks?
    – Ron Maupin
    Oct 26, 2015 at 20:26
  • Ok, route 1 is not necesary, my fault, but host2 is connected to 2 routers, then, wich of the two is it gateway?? It is necesary put it on a gateway Oct 26, 2015 at 20:28
  • See what I wrote in my answer.
    – Ron Maupin
    Oct 26, 2015 at 20:32
  • Ok, i´m agree with @RonMaupin Oct 26, 2015 at 20:34
  • If a host doesn't have a default gateway set, it can't get off its attached subnet. The host knows if a destination is on or off its subnet by the configured IP address and mask. For destinations off its subnet, it will just sent the traffic to its configured gateway. Without a gateway, it can't send anything to a different network.
    – Ron Maupin
    Oct 26, 2015 at 20:37

You need to have routing set up on the routers so that every router which is on the networks of the two hosts knows how to reach the other network.

This would work if each host's gateway was Router1, but that may not always be the case. The whole point of routing is that the routers know how to reach the other networks, even if they aren't attached to the networks. You can do this dynamically with a routing protocol, or statically with static routes configured in the routers. Static routing doesn't scale, and it can't automatically respond to changes in the network.


Check the basics on host 1 and host 2:

Does host 1 have a default route via router 1, or a specific route to host 2's network via router 1?

Does host 2 have a default route via router 1, or a specific route to host 1's network via router 1?

As you've provided no useful debug, it's difficult to guess what's going on, especially as your diagram mentions many devices, but we're only interested in three of them - two hosts and a router - simplify the problem for yourself, and you may find it easier to work out the solution.

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.