Hi, im trying to configure a wired only router to act as a bridge (or AP, switch?) but with DHCP enabled.
This router will be constantly moved between 2 networks from different ISP, one of them uses 10.0.0.x and the other uses 192.168.0.x, with the default settings (192.168.1.x) i can connect to the internet but i can't access devices connected to the router from outside (the main network), if i try switching to
DHCP client on the LAN (
br-lan) interface then the router can't assign IPs to the devices connected to it.
I followed the dumbAP guide too, with no luck.
Using a static IP in the corresponding subnet works but im trying avoid doing it every time.
If it is a wired router, it doesn't have any radios and therefore cannot be an AP. It might have a switch in it, but you didn't say what device you are using.
It doesn't sound like you should be trying to use a dumb AP configuration... a wired router doesn't serve any purpose at all if you try to make it into a bridge.
What exactly do you want it to do?
My guess is that you should probably be using a routed configuration (i.e. the default), so that it has a "wan" connection to the upstream router and then a "lan" to the downstream devices.
You absolutely should not enable a DHCP server on any kind of a bridge device that has a connection to the upstream network or you will cause problems for the entire network.
It's a NanoPi R2S, what i want is similar to the default setup but without using the default static IP and instead let the main modem assign them, to the nanopi and to the devices connected to it.
If the main modem assigns all the addresses, what is the purpose of having the R2S in the system? That would mean it wouldn't be routing (and thus also not doing anything else with firewall features and the like... it would literally be of zero functional use).
I realize it doesn't make too much sense, it's some weird setup, but it's to backup data from some devices that only have a local ftp server available, these devices are in different locations, the nanopi will be connected to the devices USB ports for power and use the ethernet previously connected to them, so they need to be accessible from the network in case something goes wrong or i need to change some settings.
There are two ways I can see this working:
- make the R2S a DHCP client on the network... this will make it 'just another device' on the network wherever you are, and therefore the local (L2) access between this device and the computers on the network will work without issue.
- Use the device in a stanard routed configuration with the upstream network as the wan, and the computers that need access to this R2S connected to the R2S's lan. That means disconnecting these computers from the existing network, of course.
You have incompatible requirements about the DHCP... either it's the OpenWrt device who assaigs the address, or us the ISP router.
If you have control of your environment, you could change the ISP device's DHCP so both are in the same subnet. Then you can use your PI as a client with a fixed IP in the same subnet so you can always access the Pi for admin.
Going outside the original question a bit, have you considered a site to site VPN so you could back up everything from one site instead of moving a device around?
To deploy what you originally proposed, you'd want the Pi to act as a three-port switch and bridge so that it can interact with the existing network and also not disturb how the device works when you plug it in line. This would mean the lan interface would be DHCP client.
Or since there are only two possible networks it will be connected to, you can assign two static IPs on the same interface (In OpenWrt, this is called an alias network). One would be unused while it is at the other site.
i got it working by bridging both ethernet ports and setting br-lan as DHCP client.
option name 'br-lan'
option type 'bridge'
list ports 'eth0'
list ports 'eth1'
option name 'eth1'
option macaddr '5e:eb:f2:80:54:65'
config interface 'lan'
option device 'br-lan'
option proto 'dhcp'
option name 'eth0'
option macaddr '5e:eb:f2:80:54:64'
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.