You are not logged in.
Pages: 1
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
...
/etc/rc.conflo="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
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
You might need to 'up' eth0
ifconfig eth0 up
Then maybe start the network (if it isn't running).
~jbw
Offline
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
amabeyo wrote:...
/etc/rc.conflo="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
Pages: 1