LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Destination Host Unreachable - can't ping Modem IP (http://www.linuxquestions.org/questions/linux-networking-3/destination-host-unreachable-cant-ping-modem-ip-669382/)

chleng88 09-12-2008 12:01 AM

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

grejon04 09-12-2008 07:49 PM

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?

chleng88 09-16-2008 11:06 AM

Quote:

Originally Posted by grejon04 (Post 3278816)
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.

grejon04 09-17-2008 12:12 PM

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.


All times are GMT -5. The time now is 11:16 PM.