Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
connect: Network is unreachable [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
slak5
n00b
n00b


Joined: 27 Jul 2006
Posts: 41

PostPosted: Fri Oct 13, 2006 5:09 am    Post subject: connect: Network is unreachable [SOLVED] Reply with quote

from client:
Code:
ssh 192.168.0.10
ssh: connect to host 192.168.0.10 port 22: Connection refused

apache and everything else is also unreachable

from server:
Code:
# ping www.google.com
connect: Network is unreachable

Code:
ifconfig
eth0      Link encap:Ethernet  HWaddr 00:01:29:24:19:11
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::201:29ff:fe24:1911/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1519 errors:0 dropped:0 overruns:0 frame:0
          TX packets:747 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:267224 (260.9 Kb)  TX bytes:113874 (111.2 Kb)
          Interrupt:16 Base address:0xa000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)


I installed 2006.1 and selected most of the server packages in the installer. At first the machine was able to send/recieve from inside the network, but now everything is down from me trying to fix it. What do I need to setup to get a static IP working? BTW everything was working in the livecd installer.


Last edited by slak5 on Sat Oct 14, 2006 1:29 am; edited 1 time in total
Back to top
View user's profile Send private message
feiticeir0
Apprentice
Apprentice


Joined: 13 Jul 2005
Posts: 288
Location: Castelo Branco, Portugal

PostPosted: Fri Oct 13, 2006 8:48 am    Post subject: Reply with quote

Hello.

have you checked your /etc/resolv.conf ?
that file provides information about your DNS servers and domain to search in.
this is a typical /etc/resolv.conf
Code:

# Generated by dhcpcd for interface eth0
search domain.com
nameserver xxx.xxx.xxx.xxx
nameserver xxx.xxx.xxx.xxx


you need to have that file...
since you have IP and in the livecd everything was working, it could be that.

please post your /etc/conf.d/net

about the ssh, from your post, you can reach that computer, but the sshd server is not working... (the refused connection)

cheers
_________________
Do It With Rhythm
Back to top
View user's profile Send private message
slak5
n00b
n00b


Joined: 27 Jul 2006
Posts: 41

PostPosted: Fri Oct 13, 2006 1:31 pm    Post subject: Reply with quote

I think its the resolv.conf file because it only contains:
Code:
nameserver 192.168.0.1


in the livecd environment I used to have to copy it over with
Code:
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

I'm guessing the installer didn't do that for me, so how do I go about gathering this information? I believe I can get the nameservers, thats just dns primary and dns secondary correct? I'm kindof lost on what the search ... is about. my slackware /etc/resolv.conf looks the same but Its using dhcp on a different machine.

/etc/conf.d/net:
Code:
config_eth0=( "192.168.0.10" broadcast 192.168.0.266 netmask 255.255.255.0" )
Back to top
View user's profile Send private message
slak5
n00b
n00b


Joined: 27 Jul 2006
Posts: 41

PostPosted: Sat Oct 14, 2006 1:28 am    Post subject: Reply with quote

I finally fixed it, It ended up I didn't have a default gateway, but here is how I managed to find it:

check these files:
/etc/conf.d/hostname:
Code:
HOSTNAME="pain"

/etc/conf.d/hosts:
Code:
127.0.0.1       localhost
192.168.0.10    pain.home pain

/etc/conf.d/net
Code:
config_eth0=( "192.168.0.10 broadcast 192.168.0.255 netmask 255.255.255.0" )
routes_eth0=( "default gw 192.168.0.1" )

/etc/conf.d/resolv.conf:
Code:
search home
nameserver 192.168.0.1


The nameserver is my router but if you are connected directly its your ISP Primary and Secondary DNS IP addresses.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum