Linksys WHW03 v1: make it an access point

Well, the title pretty much says is all. I would like to reconfigure Linksys WHW03 v1 (running snapshot) to work as an access point. Here's what I have right now (with minor redactions to avoid giving evidence against oneself):

root@WHW03:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether XX:XX:XX:XX:XX:6c brd ff:ff:ff:ff:ff:ff
    inet6 XXXX::XXXX:XXXX:XXXX:306c/64 scope link
       valid_lft forever preferred_lft forever
3: lan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether XX:XX:XX:XX:XX:6c brd ff:ff:ff:ff:ff:ff
4: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether XX:XX:XX:XX:XX:6c brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.85/24 brd 10.42.0.255 scope global wan
       valid_lft forever preferred_lft forever
    inet6 XXXX::XXXX:XXXX:XXXX:306c/64 scope link
       valid_lft forever preferred_lft forever
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether XX:XX:XX:XX:XX:6c brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
    inet6 XXXX:XXXX:XXXX::1/60 scope global noprefixroute
       valid_lft forever preferred_lft forever
    inet6 XXXX::XXXX:XXXX:XXXX:306c/64 scope link
       valid_lft forever preferred_lft forever

root@WHW03:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'XXXX:XXXX:XXXX::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan'

config device
        option name 'lan'
        option macaddr 'XX:XX:XX:XX:XX:6c'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'wan'
        option macaddr 'XX:XX:XX:XX:XX:6c'

config interface 'wan'
        option device 'wan'
        option proto 'dhcp'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'

If I am reading this correctly, the device has a switch at eth0 with two physical ports designated lan and wan. So there's one MAC address ending in 6c for the entire wired subsystem; eth0, lan, br-lan, and wan all have the same MAC address.

So... what's the appropriate way to rewrite /etc/config/network for access point use? My first thought is to rename lan and wan into lan1 and lan2 and bridge them:

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'XXXX:XXXX:XXXX::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'

config device
        option name 'lan1'
        option macaddr 'XX:XX:XX:XX:XX:6c'

config device
        option name 'lan2'
        option macaddr 'XX:XX:XX:XX:XX:6c'

config interface 'lan'
        option device 'br-lan'
        option proto 'dhcp'

But I am not sure whether the names lan and wan are in any way "magical" (predefined in code, have special significance, etc.) and thus must be retained. So I would love some guidance on this...

Your config looks generally fine -- you'll simply link an SSID with the network lan (in the wireless config).

For more info, we have an article about a bridged AP (which is what you're doing here)

There is no magic to the lan and wan network interfaces except for the fact that they are pre-configured and the terms are well understood ("local area network" and "wide area network"). But the names are somewhat arbitrary. They could be apple and orange if you wanted, provided it is consistent across all the files in which the networks are referenced.

Of course. But that's elsewhere, in /etc/config/wireless. As long as I retain the name lan for the bridge, the wireless subsystem should have a destination to link to.

I am going to attempt this configuration and report on the outcome.

It should work without issue. Let us know if you run into issues.

So far, total failure to launch. Neither the upstream device (connected to the port formerly known an wan) nor the administrator's workstation (connected to the port formerly known an lan) detected any attempts at a connection. Both reported no-carrier status for their ports connected to the WHW03. A brief detour into the recovery mode, and I am back to square one... :smile:

What port were you using on the WHW03 to connect it to the upstream network?

As suggested in the ToH entry for WHW03 v2:

This arrangement worked for me (and is working again, once I have reset the device) in the router mode on WHW03 v1...

Follow the ap guide I linked earlier, adapting for your specific network/subnet.

Connect using the lan port to your upstream network.

Still no joy. Here's what I did, step by step:

# Edited /etc/config/network as shown earlier in this thread

# Configured the wireless subsystem (nothing special there)

# Disabled and stopped services as suggested in the guide:

/etc/init.d/dnsmasq disable
/etc/init.d/dnsmasq stop

/etc/init.d/odhcpd disable
/etc/init.d/odhcpd stop

/etc/init.d/firewall disable
/etc/init.d/firewall stop

rm /usr/sbin/wpa_supplicant

# Added the following to /etc/rc.local before the exit command:

for i in firewall dnsmasq odhcpd; do
  if /etc/init.d/"$i" enabled; then
    /etc/init.d/"$i" disable
    /etc/init.d/"$i" stop
  fi
done

rm /usr/sbin/wpa_supplicant

# and rebooted the device

Tried swapping Ethernet cables; no connection anywhere, no carrier all over the place. Tried connecting to the wireless; SSIDs are broadcasted, but connections are refused.

Looks like my edits of /etc/config/network are misbegotten...

None of those steps are required. I guess the AP directions should be clarified... in fact, I don't recommend those changes at all.

  1. Reset to defaults.
  2. Configure wifi (set the SSID, encryption type, passphrase, and country code, then enable the radios).
  3. Disable the DHCP server on the lan (by setting the server to ignore that interface).
  4. Change the IP address of the lan to either DHCP client or to an address outside your main router's DHCP pool and unused by any other device.
  5. Connect the lan of your upstream network to the lan of your OpenWrt AP.

As in,

uci set dhcp.lan.ignore=1
uci commit dhcp
/etc/init.d/dnsmasq restart

uci set dhcp.lan.dhcpv6=disabled
uci set dhcp.lan.ra=disabled
uci commit

?

Yes. Those are the only things that need to be done with dnsmasq

Thank you! I am out of time for now, will have to try it later and report back...