2 Ip's in one router

Hi team little help if anyone have the time to help.....i was trying to make vlan my home network unsuccesful becaude is something new for me....i try to make something like this

now i think to try something easier to make my basic openwrt router with 2 ip lans something like this

trying different parameters but nothing......any ideas?

Apologies if I am not interpreting your intentions correctly, but it appears that you have:

  1. Two Xiaomi APs, both operating in router mode, double-natted behind an ISP router.
  2. A primary network connected to a switch. ( is it managed or unmanaged?)
  3. A secondary network ( presumably for IOT devices? )
  4. It seems as if you are intending to make two VLANS on each device for both.

What I am not clear on is your intention for connecting the two Xaiomis. Despite the fact you could configure two ports on each Xiaomi as VLANs, you would be bridging two routers.
One issue with that is both devices are (likely) configured to serve DHCP for both subnets. Another issue is you would collectively have two gateways on each subnet. Even though you could work around that by two different addresses and splitting the DHCP scope in half - the main point here is you are creating conflict, and a very inefficient traffic route even if you were to workaround the conflicts.
The question I would ask you is what is the purpose for interconnecting two routers when you appear to have designed your network for seperation to begin with. ( i.e. segregating your IOTs from your main network.)
Is it that you have a wifi coverage issue / limited wireless range for each and are trying to be able to connect any wireless device from each network? If the answer is yes, it would be better to mesh the APs ( each existing one with a new one )

But If your intention however is just to be able to switch over and manage all devices from your computer while still having VLAN separation from your primary network, maybe configure two VLANs on the switch and toggle your PC. ( You would need to replace your switch if it is unmanaged, but there are some reasonably priced ones. )

hi my friend and thanks for the answer........first of all the switch is managed..i have a tp-link TL-SG1016DE......thwe reason that i have 2 xiaomi devices is for different networks...i want one device for main network ...servers pc's etc....and the other device only for home assistant server and wifi sensors......the reason is not make the main xiaomi router to manage all this devices all servers and wifi sendors....i know that i have mistakes with my network setup.......i want when i connect with my phone or with any pc to have access to both routers and to different ip servers to manage everything

p.s make one change now .....give from main xiaomi router internet to other xiaomi to wan directly and not from ISP router.......i make this changes to main router.

Hi Chrisrer,
I forgot to ask if your central switch was Layer 2 or Layer 3. Ideally, you would have an L3 switch with two VLANs. Problem solved. :slight_smile:

sorry but i dont know what is layer..sorry.....this is the reason asked help.......

After you edited your previous post with your switch model number, you have a TPLink Layer 2 switch. L2s support VLANs, but will not route between them. You need a Layer 3 switch.

Here is a reasonably priced L3 switch that would work for you:
TP-Link JetStream TL-SG2218 16-Port

i not make my job with this devices? without make vlan.......with physical ethernet and make everything the routers

Chrisrer, my way to approach this would be upgrading the L2 switch to an L3 and make that a central distribution switch with 2 VLANs. I just think that is the most efficient way (traffic and config wise) of doing it.
I would point out however, if you are going to let every device talk to every other device (as you mentioned in a previous post, you are kind of defeating the whole purpose of having a segregated VLAN. :wink:

Maybe it would just be best for you to change wireless networks on a tablet / laptop / phone as needed, to access your IOTs.

Maybe hold off on doing anything for now to give others time to reply with other suggestions. There are gurus in the community with much more experience than me; and they might have a better solution.

1 Like


from my experience, these low cost tp-links are very limited managed switches
in my past, i was struggling with these because there is no way to remove VLAN1 from ports or make management interface on vlans other than vlan1

so ...

according to your first picture, from my point of view, best way to do this is:

  1. reset R1 to factory
  2. reset switch to factory
  3. bring R1 and switch to same address space, so you could manage switch when you connect to wifi. It will be your management vlan1

now the hard part
4. on R1 make additional VLANs
5. on R1 make additiona SSID and connect to VLANs
6. on R1 make a trunk port: add tagged vlan 2 & 3 to existing Vlan1
7. on managed switch make trunk & access ports
8. test on your PCs this setup

if everything is OK, then you could make R2 to act as a dumb AP with multi SSID & VLANs

Because i don't know how to setup a vlan , can i connect 2 router with ip to main router (not isp but openwrt) connect in main router? And managed everything from there? The 2 router connect there home assistant server with 192.168.3.X ip and take internet in wan from main router main router ( control all.connections ...no connections with 192.168.3.X in switch.....the switch have only 192.168.2.x connections l.......