LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Basic networking problem: "Network is unreachable" (https://www.linuxquestions.org/questions/linux-networking-3/basic-networking-problem-network-is-unreachable-553571/)

phsythax 05-13-2007 02:13 PM

Basic networking problem: "Network is unreachable"
 
Hello!
Some days ago i found a very cheap second hand Netgear 5-port "fast Ethernet switch" FS105
(its an old one with a "normal or uplink" button.)
so i bought it and now I'm playing around with it. I connected my two windows boxes to it and they automatically received an ip address. However, i couldn't send ping (standard ICMP type 8 packet) to either of them. So i booted into gentoo, got a static ip on the network and tried again. this is what happened:

Code:

# ping 192.168.18.63
connect: Network is unreachable

error received when trying to ping a windows box from a gentoo box.

Que_273 05-13-2007 02:45 PM

When DHCP assigns an ip address, it usually also gives the IP of the default route.
For example your IP might be 192.168.18.12 and the default route might be 192.168.18.1

route -n will show you what your current routes are
Code:

Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
x.x.144.0      0.0.0.0        255.255.252.0  U    0      0        0 eth0
0.0.0.0        x.x.144.1      0.0.0.0        UG    0      0        0 eth0

The second line is the default route. Anything I don't know how to route will be sent here. If thi line is missing and you are trying to ping an address that is not included in any of the subnets, the destination will be "unreachable".

If you can find the default route that is assigned to the Windows PCs, you can add it using
route add default gw 1.2.3.4
or add it to the "static" section in /etc/network/interfaces

Who is assigning the ip addresses in your setup? Your linux box, one of the Win PCs or someone else?

phsythax 05-14-2007 09:43 AM

Quote:

Originally Posted by Que_273
Who is assigning the ip addresses in your setup? Your linux box, one of the Win PCs or someone else?

I have no idea. this is how it is set up:

boxA(windows&gentoo) <---(standard network cable)---> netgear switch <---(standard network cable)---> boxB(windowsXp)

I havn't made any configuration on boxB, neither with boxA when windows is booted, when gentoo is booted, i edited the /etc/conf.d/net to the following, then i rebooted:
Code:

# use either the dhcp or static ip
#config_eth0=( "dhcp" )
config_eth0=( "192.168.1.2 netmask 255.255.255.0" )

dhcpcd_eth0="-t 10" # Timeout after 10 seconds
dhcp_eth0="release nodns nontp nonis" # Only get an address



All times are GMT -5. The time now is 01:27 AM.