Connected devices with AP do no get IP from DHCP

214 views
Skip to first unread message

Tahmid Shahriar

unread,
Aug 11, 2021, 11:35:33 AM8/11/21
to OpenWISP

Hi, I am new in OpenWISP and having some issues while connecting devices with AP. My AP is registered perfectly with OpenWISP portal though connected devices with AP are not getting IPs from DHCP instead getting link local addresses i.e. 169.254.x.x. I have created a bridge and add br-lan and wlan0 interface in that. It will be greatly helpful for me if someone can help me in this regard.
"package network

config interface 'wlan0'
option auto '1'
option enabled '1'
option ifname 'wlan0'
option mtu '1500'
option proto 'none'

config interface 'br'
option auto '1'
option enabled '1'
option ifname 'wlan0 br-lan'
option igmp_snooping '1'
option mtu '1500'
option proto 'none'
option stp '0'
option type 'bridge'

package wireless 

config wifi-iface 'wifi_wlan0'
option device 'radio0'
option disabled '0'
option encryption 'psk2'
option hidden '0'
option ifname 'wlan0'
option isolate '1'
option key '12345678'
option macfilter 'disable'
option mode 'ap'
option ssid 'OpenWISP-TAHMID'
option wds '0'
option wmm '1'
"

OpenWISP.png

Tahmid Shahriar

unread,
Aug 11, 2021, 1:40:34 PM8/11/21
to OpenWISP
OpenWISP server IP is 10.20.20.4. Sorry for typo.

Federico Capoano

unread,
Aug 11, 2021, 6:21:55 PM8/11/21
to open...@googlegroups.com
The WiFi interface needs to be "attached" to the lan interface (which in your example is called br).
Unfortunately this is how wifi interfaces are bridged in OpenWRT so defining the wlan as a bridge member is not enough.

Look for "network" in the OpenWrt wifi wiki page: https://openwrt.org/docs/guide-user/network/wifi/basic

In the OpenWISP config editor, you can specify this  in "Attached Networks".
See also this section of the netjsonconfig documentation (the configuration engine library): Wireless attached to a different network.

You're not the first one having this issue, therefore I created an issue in the netjsonconfig library to see if maybe we can handle this automatically in the future: https://github.com/openwisp/netjsonconfig/issues/191.

I hope this helps!

Tahmid Shahriar

unread,
Aug 12, 2021, 8:16:28 AM8/12/21
to OpenWISP
Hi, thanks a lot for your response. I am still unable to attach the lan with wlan and while trying to do so notification " The configuration of MKT has encountered an error. The last working configuration has been restored from a backup present on the filesystem of the device. " popped in OpenWISP portal.
Kindly have the interface details of Mikrotik AP which has been booted with OpenWRT.
# cat /etc/config/network

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

config globals 'globals'
    option ula_prefix 'fdf4:9cc1:5e11::/48'

config interface 'lan'
    option type 'bridge'
    option ifname 'eth0.1 eth1.1'
    option proto 'dhcp'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'dhcp'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'dhcpv6'

config interface 'sfp'
    option ifname 'eth0.3'
    option proto 'none'

config switch 'switch0'
    option ar8xxx_mib_poll_interval '500'
    option ar8xxx_mib_type '0'
    option enable_vlan '1'
    option name 'switch0'
    option reset '1'

config switch_vlan 'switch0_vlan1'
    option device 'switch0'
    option ports '2 3 4 5 0t'
    option vlan '1'

config switch_vlan 'switch0_vlan2'
    option device 'switch0'
    option ports '1 0t'
    option vlan '2'

config switch_vlan 'switch0_vlan3'
    option device 'switch0'
    option ports '6 0t'
    option vlan '3'

config switch 'switch1'
    option enable_vlan '1'
    option name 'switch1'
    option reset '1'

config switch_vlan 'switch1_vlan1'
    option device 'switch1'
    option ports '1 2 3 4 5 0t'
    option vlan '1'
------------------------------------------------
OpenWISP template
{
    "interfaces": [
        {
            "wireless": {
                "network": [],
                "mode": "access_point",
                "radio": "radio0",
                "ack_distance": 0,
                "rts_threshold": 0,
                "frag_threshold": 0,
                "ssid": "OpenWISP-TAHMID",
                "hidden": false,
                "wds": false,
                "encryption": {
                    "protocol": "none"
                },
                "wmm": true,
                "isolate": true,
                "macfilter": "disable",
                "maclist": []
            },
            "type": "wireless",
            "name": "wlan0",
            "mtu": 1500,
            "mac": "",
            "autostart": true,
            "disabled": false,
            "addresses": [],
            "network": "lan"
        }
    ]
}

Requesting your help.

Federico Capoano

unread,
Aug 12, 2021, 12:34:34 PM8/12/21
to open...@googlegroups.com
On Thu, Aug 12, 2021 at 7:16 AM Tahmid Shahriar <tahmids...@gmail.com> wrote:

[cut]
 
OpenWISP template
{
    "interfaces": [
        {
            "wireless": {
                "network": [],

These are the attached networks to which the WiFI interface will bridge, here you should add "lan", as in the example linked in my previous email:
                "mode": "access_point",
                "radio": "radio0",
                "ack_distance": 0,
                "rts_threshold": 0,
                "frag_threshold": 0,
                "ssid": "OpenWISP-TAHMID",
                "hidden": false,
                "wds": false,
                "encryption": {
                    "protocol": "none"
                },
                "wmm": true,
                "isolate": true,
                "macfilter": "disable",
                "maclist": []
            },
            "type": "wireless",
            "name": "wlan0",
            "mtu": 1500,
            "mac": "",
            "autostart": true,
            "disabled": false,
            "addresses": [],
            "network": "lan"

this is the OpenWRT network name, you should remove this.
 
        }
    ]
}

Best regards
Federico Capoano
OpenWISP OÜ
Harjumaa, Tallinn, Sepapaja tn 6, 15551
VAT: EE101989729

Tahmid Shahriar

unread,
Aug 16, 2021, 4:43:41 AM8/16/21
to OpenWISP
Hi Federico, working fine now. Thanks a lot for your help.

{
    "interfaces": [
        {
            "wireless": {
                "network": [
                    "lan"
                ],

                "mode": "access_point",
                "radio": "radio0",
                "ack_distance": 0,
                "rts_threshold": 0,
                "frag_threshold": 0,
                "ssid": "OpenWISP-TAHMID",
                "hidden": false,
                "wds": false,
                "encryption": {
                    "protocol": "none"
                },
                "wmm": true,
                "isolate": false,

                "macfilter": "disable",
                "maclist": []
            },
            "type": "wireless",
            "name": "wlan0",
            "mtu": 1500,
            "mac": "",
            "autostart": true,
            "disabled": false,
            "addresses": [],
            "network": ""
        }
    ]
}

Regards,
Tahmid
Reply all
Reply to author
Forward
0 new messages