3

I've this scenario: an AP connected to the STA wirelessly, the AP is a DHCP server I have following configurations in /etc/config/network of the AP:

config interface lan
        option ifname 'eth1 eth0'
        option type     'bridge'
        option proto 'static'
        option ipaddr   '192.168.1.1'
        option netmask  '255.255.255.0'

The problem is that the station that is connected to the AP using WLAN0 interface, can see the eth0 mac address while not the wlan interface Mac address. i.e. the address I get after issuing "arp" is different from the one I get after issuing iw wlan0 station dump.

I was wondering if there is a way (other than overriding the mac address of AP lan interface) to overcome this issue, while I still want any device connected through eth0 to get its own ip address from the dhcp server.

I tried doing like this but didn't work:

config interface lan
        option ifname 'eth1'
        option type     'bridge'
        option proto 'static'
        option ipaddr   '192.168.1.1'
        option netmask  '255.255.255.0'

config interface local
        option ifname 'eth0 eth1'
        option type     'bridge'

Note: issues related to firewall are not relevant because firewall is disabled on both devices.

And as a plus I'd like also devices connected to STA via ethernet cable to get an ip from the same DHCP server and to be on the same network. I used wds and it worked but I have to avoid it since it created some problems.

0

Source: https://wiki.openwrt.org/doc/uci/network

Aliases: the new way

Basically create an 'interface' section per IP, but alias interfaces may NOT be of type bridge

For cases where the interface is bridged the ifname is br-base-interface, where base-interface is the name of the primary IP's config section (e.g. for a the default lan interface config, the first alias would use ifname br-lan).

config interface lan
        option ifname 'eth0  eth1'
        option type     'bridge'
        option proto 'static'
        option ipaddr   '192.168.1.1'
        option netmask  '255.255.255.0'

config interface local
        option ifname 'br-lan'
...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.