Can't ping www.google.com

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
jmarinchak
Posts: 3
Joined: Tue Jun 09, 2009 10:06 pm

Can't ping www.google.com

Post by jmarinchak »

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)
-----------------------
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Can't ping www.google.com

Post by mightyohm »

nvram config is obsolete and shouldn't affect anything on this version of OpenWrt - use the config files instead.

Comment out the "option bridge" line in the lan config and edit the rest to make it look like this:

#### LAN configuration
config interface lan
#option type bridge
option ifname "eth0.0"
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0

Your /etc/config/wireless looks ok. Try running "/etc/init.d/network restart" after you make the changes above and post the results here. Does the wireless LED turn on (even dimly)?
jmarinchak
Posts: 3
Joined: Tue Jun 09, 2009 10:06 pm

Re: Can't ping www.google.com

Post by jmarinchak »

Jeff,

Thanks for your suggestion. I tried your changes but, it didn't seem to help. I went back to the original configuration. Rebooted. And things seem to work. I could ping google. Later, I rebooted again. I interupted the boot process to get a shell prompt and the wireless LED never came on. I also could not ping google. It also seems to happen other times when I reboot - the wireless LED does not come on. I just reboot one or two times and eventually it seems to work. I wonder if anyone else is seeing intermittent connectivity.

Since I'm a newbie to mpd/mpc I had some trouble figuring out how to select different music. Sorry, but my taste in music is very different. If anyone else is interested, it looks like you can simply go to http://www.shoutcast.com and search for a station that you like. Open it with winamp (windows) and you can right click on the playlist to get the stream information.

Jeff
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Can't ping www.google.com

Post by mightyohm »

Thanks for the tip on adding other stations, I'm sure that will be useful for other people who don't share my musical preferences. :) You can also get the stream address from iTunes if you right click and select "Get Info" on the stream you want to add/change on the router.

I'm not sure what's causing your connectivity problem. If the wireless LED isn't coming on then for some reason the router isn't connecting to your wireless network. Since it works sometimes, I am pretty sure you have the config files set up correctly.

It could be a range or an interference problem. Try moving the router closer to your home network access point, or change the channel number that your Wi-Fi network is operating on.
Post Reply