LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2010, 11:57 AM   #1
sangprabv
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
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
 
Old 05-26-2010, 03:56 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
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.)

If you really need to route to different gateways, read here:
http://www.linuxjournal.com/article/7291
 
Old 05-27-2010, 12:22 AM   #3
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Rep: Reputation: 33
It is not working with multiple default gateways.
You have to specify one
 
Old 05-27-2010, 02:00 AM   #4
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by sangprabv View Post
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.

Cheers,
MT.
 
Old 05-27-2010, 06:57 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
His netmask may be correct, but then his routing table entry would be bogus.

With the info given, the subnet range is: 192.168.31.113 - 192.168.31.118

His routing table shows:
Code:
192.168.31.112 0.0.0.0 255.255.255.248 U 0 0 0 eth2
@sangprabv: Check with someone who understands/manages these networks, and use the correct settings.
 
Old 05-27-2010, 10:22 PM   #6
mac.tieu
Member
 
Registered: Jan 2010
Location: Vietnam
Distribution: Arch
Posts: 65

Rep: Reputation: 22
Quote:
Originally Posted by anomie View Post
His netmask may be correct, but then his routing table entry would be bogus.

With the info given, the subnet range is: 192.168.31.113 - 192.168.31.118

His routing table shows:
Code:
192.168.31.112 0.0.0.0 255.255.255.248 U 0 0 0 eth2
@sangprabv: Check with someone who understands/manages these networks, and use the correct settings.
You are right, i am mistaken.
 
Old 05-28-2010, 09:51 AM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
No, you're fine. You spotted the problem about a conflicting gateway and netmask. Now OP needs to clean it up.
 
Old 05-28-2010, 10:51 AM   #8
sangprabv
LQ Newbie
 
Registered: May 2010
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Destination HOST Unreachable - cannot ping gateway rpkosuri Linux - Networking 5 06-16-2008 11:38 PM
Ping error "Destination Host Unreachable" from the gateway cristi_ro Linux - Networking 4 10-30-2006 04:32 PM
Destination Host Unreachable susankhya Linux - Networking 3 06-14-2006 02:14 AM
Destination Host Unreachable danka Linux - Networking 8 01-01-2005 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration