-   Linux - Networking (
-   -   connect: Network is unreachable (

joenomad 04-09-2002 07:39 AM

connect: Network is unreachable
Ok, so I have a machine that I previously ran with 7.1, which
has an integrated network interface (a SOYO Dragon with a VIA
chip set). Anyway, when I installed 7.1, I figured the board
was so new that it would be unlikely that there was support
for the onboard network interface, so I added a NIC right from
the start and everything worked great. Now since I re installed
with 7.2 I am having some trouble. During the install 7.2
recognized the onboard interface (the 7.1 install never even
detected it), so I figured I would configure both the onboard
and the NIC. Then if the onboard worked, I would pull the NIC,
or if not, I would just use the NIC. Well now niether works. I
can ping both the lo, eth0 and eth1 (which is the NIC) but when I
ping anything else I get the message

connect: Network is unreachable

I Would love to get the onboard interface
working, but I will settle for the NIC if I have to. Any
responses are greatly appriciated.

Here is some additional info from relevent commands.

# ifconfig

eth0 Link encap:Ethernet HWaddr 00:50:2C:00:B1:F8
inet addr: Bcast: Mask:
RX packets:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:12413 (12.1 Kb) TX bytes:168 (168.0 b)
Interrupt:11 Base address:0xec00

eth1 Link encap:Ethernet HWaddr 00:04:5A:54:45:FC
inet addr: Bcast: Mask:
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:4 dropped:0 overruns:0 carrier:8
collisions:0 txqueuelen:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0xd000

lo Link encap:Local Loopback
inet addr: Mask:
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3444 (3.3 Kb) TX bytes:3444 (3.3 Kb)

# cat /proc/interupts

0: 74594 XT-PIC timer
1: 533 XT-PIC keyboard
2: 0 XT-PIC cascade
5: 0 XT-PIC usb-uhci
8: 1 XT-PIC rtc
10: 9 XT-PIC eth1
11: 102 XT-PIC eth0, cmpci
12: 859 XT-PIC PS/2 Mouse
14: 24265 XT-PIC ide0
15: 2384 XT-PIC ide1
NMI: 0
LOC: 0
ERR: 0
MIS: 0

# route -n

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface U 0 0 0 eth1 U 0 0 0 eth1 U 0 0 0 lo

# ifup eth0

# ifup eth1

# cat /etc/modules.conf

alias parport_lowlevel parport_pc
alias eth0 via-rhine
alias eth1 tulip
alias sound-slot-0 cmpci
post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || :
pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :
alias usb-controller usb-uhci

# netstat -r

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface * U 40 0 0 eth1 * U 40 0 0 eth1 * U 40 0 0 lo

Mik 04-09-2002 09:27 AM

You are missing a default gateway. Try adding one with the route command.

joenomad 04-18-2002 12:12 AM

well I tried adding the gateway and here is where I ended up.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 eth1 * U 0 0 0 eth1 * U 0 0 0 eth0 dragon.affoinfo UG 0 0 0 eth0 * U 0 0 0 eth0 * U 0 0 0 lo
default UG 0 0 0 eth0

PING ( from : 56(84) bytes of data.
From Destination Host Unreachable
From Destination Host Unreachable
From Destination Host Unreachable

--- ping statistics ---
5 packets transmitted, 0 packets received, +3 errors, 100% packet loss

so I gather I am not doing somthing correctly.

Also I can't seem to delete the ones I want to get rid of.

trusouthrnplaya 04-18-2002 07:30 AM

R u using a manufacture router (ie. linksys, d-link) or r u using a linux box? What distro?

joenomad 04-18-2002 08:05 AM

I believe its a cisco router.

trusouthrnplaya 04-18-2002 08:26 AM

what is the default gateway of the router?
also can u ping any other url or ip addy at ur current config?

joenomad 04-18-2002 08:51 AM

the gateway (router) address is on my side. I don't know what it's address is externally.

the only IP adresses I can ping successfully are lo, eth0 and eth1.
I haven't even bothered with urls yet.

I'm not sure how this plays into it but our subnetmask is route didn't seem to work when I tried to use this for the genmask.

trusouthrnplaya 04-18-2002 11:17 AM

Alright I think this is ur problem.....when u added the default gateway u also added the word when u do a route -n u get
"default". Depending on what distro ur using u need to take that out and then try it agian..I'm running a linksys router and ur config isn't to much diff from mine. R u connected to a school network or something? did u also try changing ur Genmask to and see'n what happens?

joenomad 04-18-2002 12:13 PM

in the man pages it says you have to set up the static route to the gateway first before you can set up the default gateway route. I would assume that this would mean I would use a command like this to set up to set up routing to the local subnet.

# route add -net genmask dev eth0

I tried this and it didn't seem to make any diffence I still got the error:

connect: Network is unreachable

and it would not allow me to ad a default gateway at this point.

then I tried this

# route add -net genmask dev eth0

that seem to make it a little happier and at this point if I try to ping addresses with in the subnet, I get a message that looks something like this

[IP address] host is unreachable

where IP address was any IP within the subnet.

after that last command, even though I could not ping the gateway I was able to issue this command without error

# route add default gateway

also I think I am confused about the syntax to delete a spicific line from the routing table, I tried somthing like this and was unsuccessful

# route del

It returned an error and I think it said something like "no such process"

joenomad 04-19-2002 02:28 PM

can someone give me an example of the output of the route -n command on a system that has the routeing table set up correctly?

trusouthrnplaya 04-19-2002 05:24 PM

Here is mine:
Destination Gateway Genmask Flags Metric Ref Use Iface U 0 0 0 eth0 U 0 0 0 lo UG 0 0 0 eth0

of course those r not my real gateway/destination ip's....I'm using a linksys router w/ wireless acess point

joenomad 04-21-2002 10:33 AM

Ok so I think things are starting to become a little clearer. Now I understand that the subnet mask of means that there are blocks of 16 addresses (i.e. 0-15, 16-31, 32-47...)so we have apperently been aloted two blocks by our ISP, 48-63 and 64-79. So the route for the block in which my actual address exist was set up already by the config files except for the wrong device so I tried adding this:

# route add -net netmask dev eth0

then in order to talk to the gateway, which is in the first block, I tried this

#route add -net netmask dev eth0

So from what I understand this should allow me to communicate with all the IP addresses within our 2 address blocks but I am still getting the message

destination host unreacheable

for all the IP's in that range:confused: What am I missing?

All times are GMT -5. The time now is 05:37 AM.