You are not logged in.

#1 2009-11-07 06:49:33

amabeyo
Member
Registered: 2009-11-07
Posts: 3

Network Troubleshooting. Fresh Install.

Hi all,

I'm upgrading from Ubuntu, but I'm having some network configuration problems. I know there are posts similar to this one, but after spending an hour or two looking through them, I decided to start one.

The problem begins here:

ping www.google.com
ping: unknown host www.google.com

I then try pinging my router:

ping 192.168.1.1
connect: network is unreachable

Next I try 'ifconfig'

ifconfig

Ling encap: Ethernet HWaddr 52:7E:DA:24:1B:00
inet addr: 192.168.0.2 BCast: 192.168.0.255 mask:255:255:255.0
UP BROADCAST MULTICAST MTV:1500 Metric:1
RX packets:1406 errors:18 dropped:0 overruns:0 frame:18

It looks to me that I have an IP address, and that I am receiving packets, so it confuses me that the network isn't working.

Here are the related network configuration files:

/etc/rc.conf

lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES = (lo eth0)
gateway =  "default gw 192.168.1.1"
routes = (!gateway)

/etc/resolv.conf

nameserver 192.168.1.1

/etc/hosts

127.0.0.1 localhost.localdomain TedsLaptop

If anybody could help me out on this, it would be great. I've spent the last few hours looking for typos and through forums for the answer to this problem. Thanks!

Offline

#2 2009-11-07 06:55:23

sliponoga
Member
Registered: 2007-09-14
Posts: 38

Re: Network Troubleshooting. Fresh Install.

amabeyo wrote:

...
/etc/rc.conf

lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES = (lo eth0)
gateway =  "default gw 192.168.1.1"
routes = (!gateway)

...

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"

Offline

#3 2009-11-07 06:55:39

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: Network Troubleshooting. Fresh Install.

Your router has IP address 192.168.1.1 and your machine has IP address 192.168.0.2. If there isn't something else in (e.g. another router) between, this won't work, since they are in different networks. Change the IP address of your machine to 192.168.1.2 and try again.

Offline

#4 2009-11-07 10:41:48

jbw
Member
Registered: 2009-11-07
Posts: 10

Re: Network Troubleshooting. Fresh Install.

You might need to 'up' eth0

ifconfig eth0 up

Then maybe start the network (if it isn't running).


~jbw

Offline

#5 2009-11-07 12:47:15

hexanol
Member
From: Canaduh
Registered: 2009-08-04
Posts: 95

Re: Network Troubleshooting. Fresh Install.

Also, in ROUTES, remove the '!' before 'gateway', so the line becomes

ROUTES=(gateway)

Also, you don't need to explicitly set up the loopback adapter, so you could remove the references to 'lo'.

Also, I don't know why (driver problem?), but your "ifconfig" output looks incomplete. Even with a routing problem, you should see more lines then what you have shown.

Offline

#6 2009-11-07 16:36:08

amabeyo
Member
Registered: 2009-11-07
Posts: 3

Re: Network Troubleshooting. Fresh Install.

sliponoga wrote:
amabeyo wrote:

...
/etc/rc.conf

lo="lo 127.0.0.1"
eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES = (lo eth0)
gateway =  "default gw 192.168.1.1"
routes = (!gateway)

...

eth0="eth0 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255"

Thanks Slipnooga, I made your changes, and pinging my local network would work.
Then I followed hexanol's advice to remove the ! before gateway in the /etc/rc.conf file, which then allowed me to ping www.google.com
So now I've got it working.
Thanks so much for the help guys.

Offline

Board footer

Powered by FluxBB