Please help: Stuck on part 8 (no more internet)

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
samirsky
Posts: 4
Joined: Sun Jun 26, 2011 5:00 am

Please help: Stuck on part 8 (no more internet)

Post by samirsky »

After following the instructions for step 8 changes to /etc/config/network (including lan/wan correction in step 9), I can no longer connect to the internet. When I "ping www.google.com", I get "ping: bad address 'www.google.com'". The "Air" light on the Asus is on (although dim).

When I undo the changes to /etc/config/network and wireless, I get internet connectivity again. I changed my home wireless router to 192.168.24.xxx to avoid conflicts. With this configuration I can access internet (ping google, wget from mightyohm.com, etc). When I make the changes in Steps 8/9, I no longer can access the outside world.

Please help!
Any help is appreciated.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Please help: Stuck on part 8 (no more internet)

Post by mightyohm »

Hello!!

Can you post your before and after (working and not-working) /etc/config/network and /etc/config/wireless files? Did you change /etc/config/firewall also?
samirsky
Posts: 4
Joined: Sun Jun 26, 2011 5:00 am

Re: Please help: Stuck on part 8 (no more internet)

Post by samirsky »

Files in working configuration (before steps 8/9):
network:

Code: Select all

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        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 ipaddr  192.168.1.1
        #option netmask 255.255.255.0


#### WAN configuration
config interface wan
        option ifname   "eth0.1"
        option proto    dhcp
wireless:

Code: Select all

config wifi-device  wl0
        option type     broadcom
        option channel  6  # channel of wireless network

        # REMOVE THIS LINE TO ENABLE WIFI:
        # option disabled 1

config wifi-iface
        option device   wl0
        option network  lan
        option mode     sta  # configures router to connect to network
        option ssid     MyNetwork  # SSID of network
        option encryption psk2
        option key      MyPass
firewall:

Code: Select all

config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT

config zone
        option name             lan
        option input    ACCEPT
        option output   ACCEPT
        option forward  REJECT

config zone
        option name             wan
        option input    ACCEPT
        option output   ACCEPT
        option forward  REJECT
        option masq             1

config forwarding
        option src      lan
        option dest     wan
root@OpenWrt:~# ping http://www.mightyohm.com
PING http://www.mightyohm.com (75.125.121.238): 56 data bytes
64 bytes from 75.125.121.238: seq=0 ttl=48 time=64.050 ms
64 bytes from 75.125.121.238: seq=1 ttl=48 time=46.390 ms
64 bytes from 75.125.121.238: seq=2 ttl=48 time=69.734 ms
64 bytes from 75.125.121.238: seq=3 ttl=48 time=52.942 ms


Not working config (only changes are "LAN configuration" and wireless lan to wan, Steps 8/9)
network

Code: Select all

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        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    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

#### WAN configuration
config interface wan
        option ifname   "eth0.1"
        option proto    dhcp
wireless

Code: Select all

config wifi-device  wl0
        option type     broadcom
        option channel  6  # channel of wireless network

        # REMOVE THIS LINE TO ENABLE WIFI:
        # option disabled 1

config wifi-iface
        option device   wl0
        option network  wan
        option mode     sta  # configures router to connect to network
        option ssid     MyNetwork  # SSID of network
        option encryption psk2
        option key      MyPass
No changes to firewall.
As of this documenting/testing/, home network is on 192.168.1.xxx

root@OpenWrt:~# ping http://www.mightyohm.com
ping: bad address 'www.mightyohm.com'

Do I need to change the 'config forwarding' in firewall? Note that in this configuration I am able to Telnet to the router with a direct RJ45 cable from my latop to the router, as well as via the serial interface (FTDI cable).

Any ideas on why the last config does not work is appreciated.
samirsky
Posts: 4
Joined: Sun Jun 26, 2011 5:00 am

Re: Please help: Stuck on part 8 (no more internet)

Post by samirsky »

Thanks dddesign for your reply!
But I couldn't get that to work either.

After spending many hours trying different options/combinations, this is what I got to work:
network file:

Code: Select all

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"

#### Loopback configuration
config interface loopback
        option ifname   "lo"
        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    static
        option ipaddr   192.168.2.1
        option netmask  255.255.255.0

#### WAN configuration
config interface wan
        option type     bridge
        option ifname   "eth0.1"
        option proto    dhcp
The trick for me is to have the router lan address on a different subnet than my home network (ok, I can kinda see how that might be needed), and making the wan "option type bridge". I must do BOTH. Either of the above changes alone don't work.

Is that right? I have seen no one else who needed to make the wan 'bridge'. That is the only way it seems to connect to my wifi network (by monitoring the "DHCP Active IP Table" on my home network wifi router). Is this bad? Could it mess up something?
Post Reply