Destination Host Unreachable On Multiple eth and Multiple Gateway
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Destination Host Unreachable On Multiple eth and Multiple Gateway
I have three ethernet cards on my linux with these configuration:
eth0 202.153.193.193 netmask 255.255.224 (connect to internet)
eth1 192.168.8.1 netmask 255.255.255.0 (connect to LAN)
eth2 192.168.31.116 netmask 255.255.248 (connect to my partner)
And this is the routing table:
192.168.31.112 0.0.0.0 255.255.255.248 U 0 0 0 eth2
202.153.193.192 0.0.0.0 255.255.255.224 U 0 0 0 eth0
192.168.8.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 202.153.193.193 0.0.0.0 UG 100 0 0 eth0
When I try to ping 192.168.31.113 which is the gateway for eth1 it returns "From 192.168.31.116 icmp_seq=1 Destination Host Unreachable"
How to make it able to ping 192.168.31.113? Thanks
What OS / version? Are you sure you need to be able to route to different gateways? IOW, what network(s) are you expecting the 192.168.31.113 gateway to route you to?
It seems more likely that you just need to be able to communicate with other hosts on the 192.168.31.112/255.255.255.248 and 192.168.8.0/255.255.255.0 subnets. (That doesn't require another gateway. You're already on the same LANs.)
I have three ethernet cards on my linux with these configuration:
eth0 202.153.193.193 netmask 255.255.224 (connect to internet)
eth1 192.168.8.1 netmask 255.255.255.0 (connect to LAN)
eth2 192.168.31.116 netmask 255.255.248 (connect to my partner)
And this is the routing table:
192.168.31.112 0.0.0.0 255.255.255.248 U 0 0 0 eth2
202.153.193.192 0.0.0.0 255.255.255.224 U 0 0 0 eth0
192.168.8.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 202.153.193.193 0.0.0.0 UG 100 0 0 eth0
When I try to ping 192.168.31.113 which is the gateway for eth1 it returns "From 192.168.31.116 icmp_seq=1 Destination Host Unreachable"
How to make it able to ping 192.168.31.113? Thanks
Change your subnet mask of eth0 from '255.255.255.248' to '255.255.255.240' to include '192.168.31.113' address.
Hi All,
Many thanks for the response. The gateway itself is OK. Since I have tested with a single NIC PC and apply manually the configuration. I can ping the gateway. The problem comes when I apply it on 3 NICs Linux box (I use Ubuntu Lucid).
But now it is all solved. I installed Shorewall and treat the traffic to 192.168.31.116/29 is dmz. I think it is all about IPTables. Thanks again for the effort on my case
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.