Xioami Mi - AP Only - Am I gonna brick it?

Hi;

I want to turn my Xiomi Mi router into a (dumb) access point. I am unsure, given the network (with switch) topology how to bridge properly, since this is the first time I have dealt with switch as opposed to discrete ports.

Thought I would ask before risk bricking my device. Following this guide:
https://openwrt.org/docs/guide-user/network/wifi/dumbap

/etc/config/network (original) - 1 wan port, 2 lan ports:

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 'fd90:8caa:af8f::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.6.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr 'redacted'

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

config device 'wan_dev'
        option name 'eth0.2'
        option macaddr 'redacted'

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

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

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

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

/etc/config/network (proposed) - no wan port, 3 lan ports, all bridged:

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 'fd90:8caa:af8f::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'dhcp'
        #option proto 'static'
        #option ipaddr '192.168.6.1'
        #option netmask '255.255.255.0'
        #option ip6assign '60'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr 'redacted'

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

#config device 'wan_dev'
#       option name 'eth0.2'
#       option macaddr 'redacted'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        #option ports '0 1 2 3 6t'
        option ports '0 1 2 3 4 6t'

#config switch_vlan
#       option device 'switch0'
#       option vlan '2'
#       option ports '4 6t'

Changes:

  • lan IP address from static to dhcp (will be assigned fixed IP address by upstream dhcp)
  • removed all wan* entries
  • assume? eth0.1 is vlan1 (switch)
  • removed vlan2. assume? switch port 4 is wan port
  • moved switch port 4 (wan?) from vlan2 to vlan1

Would anyone familiar with this hardware / network topology care to review / comment?

Thanks;
Bill

So; It appears anyone answering this with "looks ok" may fear being on the hook if incorrect. Don't blame ya.

I did not want a bricked router, so, added recovery (in rc.local) for next boot to undo changes if incorrect:

diff /etc/config/network /etc/config/network_lan
if [ "$?" == "1" ]; then
        cp /etc/config/network_lan /etc/config/network
        /etc/init.d/firewall enable
        /etc/init.d/dnsmasq enable
        /etc/init.d/odhcpd enable
        reboot
fi
exit 0

Bottom line: The changes above (in addition to disabling firewall, dnsmasq, odhcpd) were correct. My router is now a dumb access point.

FYI: can ssh into access point using dhcp assigned address.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.