Can't ping www.google.com
Posted: Sat Jun 20, 2009 2:37 pm
I'm rediscoving the engineer in me (I got my engineering degree in '84). Thanks for the great project and your detailed instructions. I got to the point where OpenWRT is installed but, I'm having problems pinging outside systems. I noticed that when I reboot the router, this message scrolls by -
Device eth0: hwaddr 00-24-8C-86-08-94, ipaddr 192.168.1.3, mask 255.255.255.0
gateway not set, nameserver not set
When I get a shell prompt, I try pinging and get:
root@OpenWrt:/# ping www.google.com
ping: bad address 'www.google.com'
I *thought* I followed your directions (including the correction posted in Part 9) for editing the appropriate network files (see below). I have another router connected to the internet at 192.168.1.1 and I've got the ASUS either using 192.168.1.3 or dhcp (i've tried both) to try to connect through my other router to the internet. I've also tried to set the gateway and nameserver address using nvram commands:
nvram set wan_gateway=192.168.1.1
nvram set wan_dns=68.94.156.1
nvram set lan_gateway=192.168.1.1
nvram set lan_dns=68.94.156.1
nvram commit
Here is my /etc/config/network file:
-----------------------------------------------------------
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto dhcp
option netmask 255.255.255.0
option gateway 192.168.1.1
option dns 68.94.156.1
option dns 68.94.157.1
#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp
option netmask 255.255.255.0
option gateway 192.168.1.1
option dns 68.94.156.1
option dns 68.94.157.1
-----------------------------
And my /etc/config/wireless file:
--------------------------------
option type broadcom
option channel 6
# REMOVE THIS LINE TO ENABLE WIFI:
#option disabled 1
config wifi-iface
option device wl0
option network wan
option mode sta
option ssid Palmer
option encryption wep
option key XXXXXXXXXX (changed to protect the innocent)
-----------------------
Device eth0: hwaddr 00-24-8C-86-08-94, ipaddr 192.168.1.3, mask 255.255.255.0
gateway not set, nameserver not set
When I get a shell prompt, I try pinging and get:
root@OpenWrt:/# ping www.google.com
ping: bad address 'www.google.com'
I *thought* I followed your directions (including the correction posted in Part 9) for editing the appropriate network files (see below). I have another router connected to the internet at 192.168.1.1 and I've got the ASUS either using 192.168.1.3 or dhcp (i've tried both) to try to connect through my other router to the internet. I've also tried to set the gateway and nameserver address using nvram commands:
nvram set wan_gateway=192.168.1.1
nvram set wan_dns=68.94.156.1
nvram set lan_gateway=192.168.1.1
nvram set lan_dns=68.94.156.1
nvram commit
Here is my /etc/config/network file:
-----------------------------------------------------------
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto dhcp
option netmask 255.255.255.0
option gateway 192.168.1.1
option dns 68.94.156.1
option dns 68.94.157.1
#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp
option netmask 255.255.255.0
option gateway 192.168.1.1
option dns 68.94.156.1
option dns 68.94.157.1
-----------------------------
And my /etc/config/wireless file:
--------------------------------
option type broadcom
option channel 6
# REMOVE THIS LINE TO ENABLE WIFI:
#option disabled 1
config wifi-iface
option device wl0
option network wan
option mode sta
option ssid Palmer
option encryption wep
option key XXXXXXXXXX (changed to protect the innocent)
-----------------------