LinuxQuestions.org
Help answer threads with 0 replies.
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 09-12-2008, 12:01 AM   #1
chleng88
LQ Newbie
 
Registered: Sep 2008
Posts: 6

Rep: Reputation: 0
Destination Host Unreachable - can't ping Modem IP


I have my Linux box with one external NIC(eth0) and one integrated NIC (eth1) working as a router/gateway connected via modem to the public network. Able to ping itself but not able to ping the gateway of the modem:
[root@linux2 root]# ping 210.187.9.229
PING 210.187.9.229 (210.187.9.229) 56(84) bytes of data.
From 210.187.9.231 icmp_seq=2 Destination Host Unreachable
From 210.187.9.231 icmp_seq=3 Destination Host Unreachable
Ctrl+C
--- 210.187.9.229 ping statistics ----
5 packets transmitted, 0 received, +2 errors, 100% packet loss, time 4023ms, pipe 2

Some of the relevant information :
[root@linux2 root]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:10:5A:78:28:78
inet addr:210.187.9.231 Bcast:210.187.9.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2540 errors:0 dropped:0 overruns:0 frame:0
TX packets:9505 errors:0 dropped:0 overruns:0 carrier:4452
collisions:0 txqueuelen:100
RX bytes:254963 (248.9 b) TX bytes:595497 (581.5 Kb)
Interrupt:23 Base address:0xd840 Memory:dfaff000-dfaff038

eth1 Link encap:Ethernet HWaddr 00:13:20:3F:02:B1
inet addr:210.187.9.232 Bcast:210.187.9.235 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13761 errors:0 dropped:0 overruns:0 frame:0
TX packets:2010 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:976817 (953.9 b) TX bytes:199924 (195.2 Kb)
Interrupt:20 Base address:0xc800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:60303 errors:0 dropped:0 overruns:0 frame:0
TX packets:60303 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3988850 (3.8 Kb) TX bytes:3988850 (3.8 Kb)


[root@linux2 rc.d]# cat /etc/resolv.conf
nameserver 202.188.0.133
nameserver 202.188.1.5

[root@linux2 root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
210.187.9.232 0.0.0.0 255.255.255.252 U 0 0 0 eth1
210.187.9.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 210.187.9.229 0.0.0.0 UG 0 0 0 eth0


Both the NIC (eth0 & eth1) are working fine, the light is on and the cables are also working well. When connected to the modem from eth0 instead of eth1, by giving the Static IP Address(210.187.9.231), I am able to ping the LAN (ping 210.187.9.231) but not to the outside world (ping 210.187.9.229).

-----------------------------------------------------------------------------------------

Please help!
Thanks,
CHLeng
 
Old 09-12-2008, 07:49 PM   #2
grejon04
Member
 
Registered: Jun 2008
Posts: 43

Rep: Reputation: 15
210.187.9.232 with a 30-bit mask is a network address - e.g., you'll never be able to reach it. Try .233, for starters.

210.187.9.232 - network
210.187.9.233 - host
210.187.9.234 - host
210.187.9.235 - broadcast.

Also, did you do anything to the routing table, or was it just like that?
 
Old 09-16-2008, 11:06 AM   #3
chleng88
LQ Newbie
 
Registered: Sep 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by grejon04 View Post
210.187.9.232 with a 30-bit mask is a network address - e.g., you'll never be able to reach it. Try .233, for starters.

210.187.9.232 - network
210.187.9.233 - host
210.187.9.234 - host
210.187.9.235 - broadcast.

Also, did you do anything to the routing table, or was it just like that?
ok, thanks 4 d advice n i'll try it later. yup, i've edited the routing table. is there any problems? suppose it's like this:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
210.187.9.0 0.0.0.0 255.255.255.252 U 0 0 0 eth1
210.187.9.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 210.187.9.229 0.0.0.0 UG 0 0 0 eth0

and after i refer 2 some of the websites, i have change the gateway from 210.187.9.229 to 210.187.9.231.
 
Old 09-17-2008, 12:12 PM   #4
grejon04
Member
 
Registered: Jun 2008
Posts: 43

Rep: Reputation: 15
In the first entry of your routing table, that network (210.187.9.0 0.0.0.0 255.255.255.252) would consist of the following addresses:

210.187.9.0 - network address
210.187.9.1 - host
210.187.9.2 - host
210.187.9.3 - broadcast address

You might want to change this to the network that this int is on --

210.187.9.232 255.255.255.252

It might be helpful to read up a little on subnetting.
 
  


Reply

Tags
gateway, linux


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
a/p connected, route correct, ping router: "Destination Host Unreachable". DebianEtch shinyblue Linux - Wireless Networking 1 08-29-2006 09:34 PM
when ping I get Destination host unreachable Fuzia Linux - Networking 1 06-19-2006 01:22 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 01:18 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