Interesting puzzle

I believe I have solved this one but I found it interesting so I thought I would post it as a question. I’m no networking expert so maybe it is more obvious to others or maybe I have it wrong. I am testing a mikrotik with a 3G card, build in wifi and lan port. I have it setup in what I would think is a very standard config. I am using the standard IP of 192.168.88.1, the wifi and LAN are bridged and 3G is natted. DHCP is setup on the LAN/WIFI bridge. The LAN port is connected to my network, just for convenience, that has a router to the internet on 192.168.1.1.

The issue is that when I connect to the WIFI on the mikrotik I am expecting it to connect to the internet via the 3G card. But doing some tests it is clearly getting to the internet via my regular internet connection. I didn’t setup any routes to 192.168.1.1 so it seems like it is doing this by magic. Anyone know what is going on?

If you have wifi and LAN bridged, DHCP server on bridge, and LAN connected to network with another router with I assume another DHCP server, then it sounds to me that you just created network with two DHCP servers. If so, results may be unpredictable.

Yes, that is my thoughts. I was expecting when I connected to the wifi card that I would connect to the local DHCP server and 3G card. But it was all the same layer2 network and the local DHCP and 3G card was no different to the other DHCP card and rest of the network. So it got an IP from the other DHCP server and used the other gateway. You got the answer a lot quicker than me. I was baffled for a long time. :slight_smile:

That’s what bridge does, it connects networks… :slight_smile:

It is very interesting. Basically all the interfaces are just devices on a switch. The wifi on router A has no greater association with the WAN on router A than it does with the WAN on router B. You can use the WIFI on one device and it will connect to the WAN on another device with no config. This would possibly even work for a couple of bog stock home routers.

This could be useful if you have 1 device with great wifi but the wan is not compatible with your current wan technology. And you have another device with the right WAN but no wifi. You just turn DHCP off on the first router and it just works.

Yes, bridge is basically a software equivalent of hardware switch. And while hardware switches are usually only for ethernet, bridge can connect also other kinds of interfaces like wireless or some kinds of VPN.

Home routers also use bridge for LAN, they have one dedicated ethernet port for WAN, and then the rest of ethernet ports switched and then bridged together with wifi. You often want to use them just as transparent AP. Some of them can be configured as such, to bridge all ports together (including original WAN). But some, for some strange reason, can’t (even though most of them - if not all - are based on Linux, i.e. they could do it if their manufacturers allowed it). In such case you can do exactly what you wrote, disable DHCP server, ignore WAN port and instead connect device to network using one of LAN ports. And you have transparent AP.