Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@neilkidd
Copy link

neilkidd commented Jun 18, 2017

Hi,
Just wanted to say thanks :)
I used this as the basis for adding a second tp-link wdr3600 in my home network.

Regards

@braian87b
Copy link
Author

braian87b commented Jul 5, 2017

@neilkidd glad that worked for your wdr3600!, you are welcome!

@ShapeShifter499
Copy link

ShapeShifter499 commented Sep 4, 2017

I landed on this page after I found my printer couldn't be seen from the LAN wired side of my "Dumb AP". After some searching I found this page and turns out I was missing the bit about dnsmasq, turning that off fixed everything, thanks!

uci commit dhcp; echo '' > /etc/config/dhcp
/etc/init.d/dnsmasq disable
/etc/init.d/dnsmasq stop

@xpseudonym
Copy link

xpseudonym commented Oct 20, 2018

Just what I was looking for... except, I'd like to make use of the DumbAP1 as my DHCP server. Should I just comment out the Disable Dnsmasq section? Thanks heaps.

Sorted that - best not to delete it in the first place: but otherwise, copied back the default /etc/config/dhcp plus some tweeks; enabled dnsmasq; disabled firewall - correct me if I'm wrong, but I can't see the point of a firewall in a (not quite so) dumb AP; also deleted wan6 as per deletion of wan

@D2nnyim
Copy link

D2nnyim commented Nov 21, 2018

First of all, thank you very much for this tutorial!
I have 3 Archer C7's waiting to be installed (OpenWRT is already installed), but I'm waiting for the contractor to clean the pipes for my wires (the builder poured concrete while the pipes were still open...)
As soon as this is done, I will start configuring them, with this tutorial.

I just have one question... I noticed:
uci set network.lan.broadcast='192.168.0.255'

While the rest of the config points to the 192.168.1.x subnet, the broadcast here is 192.168.0.x
Is this done intentionally or, is this a typo?

@AlMoselly
Copy link

AlMoselly commented Feb 14, 2019

First of all, thank you very much for this tutorial (Script) !

I just wanted to ask for help if you can help me with a small problem that i have with my (Wrt1900acs) AP, and that is i have disabled ip6 on my dumb AP but still i can se my home host names in ip6 version in both my dumb AP and in my opnsense router.

i have also disabled ip6 in my router.

i hope that you can help

best regards.

@braian87b
Copy link
Author

braian87b commented Jul 31, 2019

@ShapeShifter499 Glad that this helped you!

@xpseudonym yes.

@D2nnyim yes it was a typo! thank for noticing, I corrected it now.

@AlMoselly I don't know what it could be doing that, please try to debug it using logread, see if you have more than one router maybe with dhcp enabled, you may have your ISP router with ipv6 dhcp connected to the lan, or may be just that device that have separate config for ipv6.

@hatran3e
Copy link

hatran3e commented Dec 3, 2019

@braian87b thanks for helping me out with this instruction, I had used it for my 841ND to bridge multi router at my home. The problem is the openwrt act as it is invisible in the network. You cannot ping it at 192.168.x.x as you has already set. I had followed your command above as well as instruction with Luci in the main page of openwrt. The bridge does it job perfectly but I cannot control it anymore. Do you have any solution for that?

@braian87b
Copy link
Author

braian87b commented Dec 3, 2019

What do you mean that you cannot control it anymore? please explain better that... thanks.

@hatran3e
Copy link

hatran3e commented Dec 4, 2019

What do you mean that you cannot control it anymore? please explain better that... thanks.

It have no ip address in the network, which means you cannot go to luci page or even get ssh connection to the openwrt

@braian87b
Copy link
Author

braian87b commented Dec 5, 2019

This config steps are for configure a Router as DumbAP and connect it to your existing LAN with an existing Main Router using an ethernet cable (wired).

On the Lan interface on the DumbAP you can set a fixed IP (on the same range of your existing network) or configure it as DHCP (to get an ip automatically) if you have it automatic you should scan your network (using nmap or some other ip scanner) or watch the dhcp leases table on your main router.

Please see relevant lines on this again, are 17 to 23, and 25 to 31 you should run just one of those depending on what mode you choose, not both.

@hatran3e
Copy link

hatran3e commented Dec 5, 2019

Thanks for your response. I just copy it to a bash script and run. I don't even read the comments. My dump bridge now run as good as what it's supposed to be!

@braian87b
Copy link
Author

braian87b commented Dec 5, 2019

Very happy about that!.

@knowmansoul
Copy link

knowmansoul commented Feb 20, 2020

I have done this before and thought I knew how to get the router running as an AP, but running diagnostic I still have 100% packet loss. I have disabled firewall, disabled dnsmasq, set static IP and turned off DHCP, but still I have 100% loss. But, the device is connected to my main router and is online. I can connect wirelessly through it and openwrt.org is there. But when I attempt to ping or update software list for adding samba, it fails to connect. Also, I basically did all this 4 days ago using ROOter firmware and pretty quickly had it connected and ping received 100% easy peezy.

@tlaurion
Copy link

tlaurion commented Jul 12, 2021

@braian87b
Confused here. Trying to apply what seems logical of this recipe over a newer OpenWrt version.
Main router is 192.168.2.1, I want it to have the dhcp server and dns server, and have the same SSIDs defined on dumb and main router to have clients bounce around. This is what this recipe is supposed to be about from my understanding.

So basically taking the pieces and bits that I need, but that results into having client devices trying to connect and not obtain leases from the main router and basically DoS the clients that try to connect to the nearest SSID.... until I power off the dumb ap.


# ========================================================
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE
# ========================================================
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces)
uci set network.lan.type='bridge'
# assign WAN physical interface to LAN (will be available as an additional LAN port now)
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)"
uci del network.wan.ifname
# Remove wan logical interface, since we will not need it.
uci del network.wan

# Disable Dnsmasq completely (it is important to commit or discard dhcp)
uci commit dhcp; echo '' > /etc/config/dhcp
/etc/init.d/dnsmasq disable
/etc/init.d/dnsmasq stop

# Set static network configuration (sample config for 192.168.2.0/24)
# 192.168.2.1 is the Main Router
uci set network.lan.ipaddr='192.168.2.2'
uci set network.lan.dns='192.168.2.1'
uci set network.lan.gateway='192.168.2.1'
uci set network.lan.netmask='255.255.255.0'
uci set network.lan.broadcast='192.168.2.255'

# Set DHCP on LAN (not recommended, but useful when Dumb AP is moveable from one building to another)
#uci del network.lan.broadcast
#uci del network.lan.dns
#uci del network.lan.gateway
#uci del network.lan.ipaddr
#uci del network.lan.netmask
#uci set network.lan.proto='dhcp'

# To identify better when connected to SSH and when seen on the network
uci set system.@system[0].hostname='DumbAP1'
uci set network.lan.hostname="`uci get system.@system[0].hostname`"

# ========================================================
# Optional, Disable IPv6
# ========================================================
#uci del network.lan.ip6assign
#uci set network.lan.delegate='0'
#uci del dhcp.lan.dhcpv6
#uci del dhcp.lan.ra
#uci del dhcp.odhcpd
/etc/init.d/odhcpd disable
/etc/init.d/odhcpd stop

# ========================================================
# Commit changes, flush, and restart network
# ========================================================
# This way we will get internet on this AP and we must reconnect
uci commit
sync
/etc/init.d/network restart
# If all is OK then reboot and test again:
#reboot

At this point, I can see ipv6 dumb ap on main AP/router. But nothing else.
Changes from your script (commented out):

  • not setting up DHCP on lan (I want main AP to deal with that so that there is no change of leases when clients are roaming around)
  • Not disabling IPV6 on dumb AP.
  • Tried to connect Dumb AP for internet uplink on WAN port (would have thought WAN port was bridged on LAN bridge?)
    Changes from original post:
  • Relate to Main router/AP network 192.168.2.1-255 as opposed to 192.168.1.1-255.
  • Relate to Dumb AP as 192.168.2.2 as opposed to 192.168.1.2

Not done but might be simple fix:

  • Connect dumb AP uplink to Lan port.

Other documentation read:

Any advice?

@braian87b
Copy link
Author

braian87b commented Jul 12, 2021

if you gonna use is as dumbAP then you have to:
disable dhcp (dnsmasq), connect a LAN port to a LAN port of your main Router or Lan port or your lan Network.
to prevent conflct disable ipv6 also (odhcpd, you can leave if6assign if you need to access to your dumbap config using ipv6 but should not lease ipv6 addresses to the network since probably your main router is already doing that)
you may also clean firewall configuration and disable the firewall too (to save a little bit of cpu/ram).

finally, you can convert you physical wan port into a Lan port (that process varies from hw/device, but is easy, lmk)

@braian87b
Copy link
Author

braian87b commented Jul 12, 2021

everything else that you did is fine. so the only main missing fix is : "Connect dumb AP uplink to Lan port."

@tlaurion
Copy link

tlaurion commented Jul 13, 2021

# ========================================================
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE
# ========================================================
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces)
#uci set network.lan.type='bridge'
# assign WAN physical interface to LAN (will be available as an additional LAN port now)
#uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)"
#uci del network.wan.ifname
# Remove wan logical interface, since we will not need it.
#uci del network.wan

# Disable Dnsmasq completely (it is important to commit or discard dhcp)
uci commit dhcp; echo '' > /etc/config/dhcp
/etc/init.d/dnsmasq disable
/etc/init.d/dnsmasq stop

# Set static network configuration (sample config for 192.168.1.0/24)
# 192.168.1.1 is the Main Router
uci set network.lan.ipaddr='192.168.2.2'
uci set network.lan.dns='192.168.2.1'
uci set network.lan.gateway='192.168.2.1'
uci set network.lan.netmask='255.255.255.0'
uci set network.lan.broadcast='192.168.2.255'

# To identify better when connected to SSH and when seen on the network
uci set system.@system[0].hostname='AP-south'
uci set network.lan.hostname="`uci get system.@system[0].hostname`"

# ========================================================
# Optional, Disable IPv6
# ========================================================
uci del network.lan.ip6assign
uci set network.lan.delegate='0'
uci del dhcp.lan.dhcpv6
uci del dhcp.lan.ra
uci del dhcp.odhcpd
/etc/init.d/odhcpd disable
/etc/init.d/odhcpd stop

#Wifi setup on WRT32X, no slow network overlap. Check channels might be problematic
#Not disclosed here

# ========================================================
# Commit changes, flush, and restart network
# ========================================================
# This way we will get internet on this AP and we must reconnect
uci commit
sync
/etc/init.d/network restart
# If all is OK then reboot and test again:
reboot

Made it work. Seems like putting wan to lan was the culprit on the WRT32X. Not sure why since it is supposed to be supported, but yeah, works fine now!

Thanks @braian87b!

@braian87b
Copy link
Author

braian87b commented Jul 14, 2021

Great! @tlaurion

# Set lan logical interface as bridge (to allow bridge multiple physical interfaces)
uci set network.lan.type='bridge'
# assign WAN physical interface to LAN (will be available as an additional LAN port now)
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)"
uci del network.wan.ifname
# Remove wan logical interface, since we will not need it.
uci del network.wan

Those steps should work, but it will be interesting to know why it doesn't, please if you can post here output of:

uci show network

@tlaurion
Copy link

tlaurion commented Jul 20, 2021

@braian87b

uci get network.lan.ifname
uci: Entry not found
uci get network.lan
interface

uci show | grep bridge
network.@device[0].type='bridge'

uci show | grep ifname


BusyBox v1.33.1 (2021-06-13 22:02:19 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 21.02.0-rc3, r16172-2aba3e9784

Well this seems to explain that! :)

@sajati
Copy link

sajati commented Sep 20, 2021

uci show | grep ifname


BusyBox v1.33.1 (2021-06-13 22:02:19 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 21.02.0-rc3, r16172-2aba3e9784

Well this seems to explain that! :)

so how to do this in v21.02 ?

@rgatti
Copy link

rgatti commented Sep 26, 2021

Saw this in the documentation here https://openwrt.org/docs/guide-user/base-system/basic-networking.

This article may contain network configuration that is version dependent post 2021-06

ifname@interface has been moved to device and device sections
while legacy ifname syntax may work on 21.02 or recent master it is recommended that you migrate to device usage

So now looks like this should be uci get network.lan.device

@Domepo
Copy link

Domepo commented Apr 7, 2022

Referred to this question:

/etc/init.d/network restart should be changed to /etc/init.d/network reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment