logo elektroda
logo elektroda
X
logo elektroda

Connecting Two LAN Routers (No.1 & No.2) via WAN Port: Maintaining Default Gateway & IP Addresses

pirates21 20181 11
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16891635
    pirates21
    Level 13  
    Posts: 197
    Help: 4
    Rate: 5
    Hello all,

    I have a question, is it possible to connect such routers, namely router no. 1 (main with external IP) is connected to your LAN under router no. 2 through its WAN port. I want to do this because the hosts of the second router have the same default gateway and IP addresses as in the router no. 1. - I would like to avoid configuring settings in the hosts of router No. 2. How do you see them?

    Connecting Two LAN Routers (No.1 & No.2) via WAN Port: Maintaining Default Gateway & IP Addresses
  • ADVERTISEMENT
  • #2 16891716
    Vytautas_YT
    Level 30  
    Posts: 1425
    Help: 128
    Rate: 297
    Lighten up a bit more. Currently how is it connected? Devices are connected to ROUTER1 and you want to add one router between them and ROUTER1 as in the diagram?
    If so, you must either set WAN on router 192.168.0.0/24 with gate 192.168.0.1 on LAN Router 2, set address other than 192.168.0.0/24 on LAN Router 2 (eg 192.168.1.1) and change the addressing of all devices with ROUTER1 to ROUTER2 (unless they have DHCP it pulled the addresses themselves).
    The second option is change to ROUTER1 LAN address, for example 192.168.1.1, WAN on Router 2, then you set from the 192.168.1.0/24 pool with 192.168.1.1 gateway and LAN on Router 2 set 192.168.0.1 and addresses of devices overwrapped from ROUTER1 to ROUTER2 they will not change.
    Otherwise it will not give because on ROUTER 2 you can not set WAN from the pool 192.168.0.0/24 and LAN in the same pool because there will be a conflict.
  • #3 16891744
    pirates21
    Level 13  
    Posts: 197
    Help: 4
    Rate: 5
    Quote:
    Lighten up a bit more. Currently how is it connected? Devices are connected to ROUTER1 and you want to add one router between them and ROUTER1 as in the diagram?
    Previously, it looked like Hosts with router no. 1 (main) were and are connected to the main router, while hosts with router no. 2 had a different internet provider and were connected to the router no. 2. It worked independently. Now I want to pass Hosts from router No. 2 as quickly as possible to router no. 1, that's why I thought about adding a router.
  • #4 16891764
    m.jastrzebski
    Network and Internet specialist
    Posts: 5238
    Help: 679
    Rate: 862
    Router 2 connect to the LAN port and nei WAN. Wsio will be in one network then. On router 2, disable DHCP, hosted hosts to router 2 will be downstream from DHCP router 1.

    Router 2 will be doing switch + access point (if it also has WiFi).
  • ADVERTISEMENT
  • #5 16891772
    pirates21
    Level 13  
    Posts: 197
    Help: 4
    Rate: 5
    m.jastrzebski: I guess it will be the easiest way to do it, I will have to change the IP addresses of the router's hosts no. 2, considering the number of hosts on the router no. 1 conflict will be bricked.
  • ADVERTISEMENT
  • #6 16891777
    m.jastrzebski
    Network and Internet specialist
    Posts: 5238
    Help: 679
    Rate: 862
    pirates21 wrote:
    m.jastrzebski: I guess it will be the easiest way to do it, I will have to change the IP addresses of the router's hosts no. 2, considering the number of hosts on the router no. 1 conflict will be bricked.

    I do not know if it is the worst. Zalezzy what you want to achieve . You can connect to WAN but then hosts from router 1 will not see hosts from router 2 (NAT). Router 1 will be "ISP" for router 2.
  • #7 16891786
    pirates21
    Level 13  
    Posts: 197
    Help: 4
    Rate: 5
    m.jastrzebski: in general, I mean it: once they do not see each other and as you say router 1 will be an ISP for the second router. Just tell me if I will do a router configuration no. 2 in the way that: WAN set to e.g. 192.168.0.123, while the router address (default gateway for hosts) will set 192.168.0.1? In the router no. 1 left the configuration as it was.
  • Helpful post
    #8 16891800
    m.jastrzebski
    Network and Internet specialist
    Posts: 5238
    Help: 679
    Rate: 862
    pirates21 wrote:
    m.jastrzebski: in general, I mean it: once they do not see each other and as you say router 1 will be an ISP for the second router. Just tell me if I will do a router configuration no. 2 in the way that: WAN set to e.g. 192.168.0.123, while the router address (default gateway for hosts) will set 192.168.0.1? In the router no. 1 left the configuration as it was.


    How do you connect via WAN:

    1. the hosts from router 2 will see the hosts from router 1, and what is behind the router 1, that is, the entire internet.
    But not the reverse. Those from router 1 will not see those from router 2, because they will be hidden with NAT. So that hosts1 and hosts 2 can not see you, you need to use a more advanced router, or if you have to use VLANs.


    2. In the host / DHCP configuration of the 2 NIC router, you do not change from the LAN side. The only thing you set, its WAN address 192.168.0.X and gate, probably 192.168.0.1. Or, to put it differently, the router's WAN port 2 becomes a host on the router's network 1. It's nothing different than a computer on the network 1.
  • ADVERTISEMENT
  • #9 16891881
    pirates21
    Level 13  
    Posts: 197
    Help: 4
    Rate: 5
    So, when connecting to WAN, everything would fit, the question of visibility of router 1 hosts for router 2 hosts remains. What features of routers can be used for this purpose?
  • #10 16891885
    m.jastrzebski
    Network and Internet specialist
    Posts: 5238
    Help: 679
    Rate: 862
    pirates21 wrote:
    So, when connecting to WAN, everything would fit, the question of visibility of router 1 hosts for router 2 hosts remains. What features of routers can be used for this purpose?

    I was writing. VLAN.
  • #11 16892296
    pirates21
    Level 13  
    Posts: 197
    Help: 4
    Rate: 5
    I tested the connection of two routers between LAN and WAN - I can not have LAN in the same subnet as WAN - that's what Vytautas_YT mentioned - thank you. Recalling what's going on so that you do not have to read everything from the beginning ;) Hosts from Router 1 and 2 have the same subnet - 192.168.0.0, there is also the same default gateway. So the easiest way would be to connect everything to one router and count on static addresses do not bite. There is also a problem of this type, so that both groups of computers connected only to one router can not see each other. Here, I thank my colleague m.jastrzebski for a hint to use the VLAN for this purpose. I guess we will not think of anything anymore so as not to change the configuration of hosts from both routers?
  • Helpful post
    #12 16892546
    Vytautas_YT
    Level 30  
    Posts: 1425
    Help: 128
    Rate: 297
    Well, there is no other solution. By changing the address you will have to change the user addresses for one or the other router. Put everything into one subnet and possibly change the configuration of those users who are conflicting. Or scan the network with one and the other router and see any conflicts.

Topic summary

✨ The discussion revolves around connecting two LAN routers (Router No. 1 and Router No. 2) via the WAN port of Router No. 2 while maintaining the same default gateway and IP addresses. Users explore various configurations, emphasizing that Router No. 2 should ideally connect to Router No. 1's LAN port instead of the WAN port to avoid NAT issues, allowing all devices to be on the same network. Suggestions include disabling DHCP on Router No. 2 and using it as a switch or access point. The conversation also touches on the necessity of VLANs for visibility between hosts on different routers and the challenges of maintaining the same subnet without conflicts. Ultimately, the consensus is that to avoid reconfiguring host IP addresses, both routers should be in the same subnet, or VLANs should be implemented for isolation.
Generated by the language model.

FAQ

TL;DR: Want Router2 via WAN without changing host IPs? Expect 0 visibility from Router1 to Router2 under double NAT; “those from router 1 will not see those from router 2.” Use LAN–LAN with DHCP off to merge, or VLANs to isolate. [Elektroda, m.jastrzebski, post #16891800]

Quick Facts

Can I keep all hosts on 192.168.0.0/24 and connect Router2 via its WAN port?

No. A router cannot have its WAN and LAN in the same /24. That addressing creates a conflict and routing breaks. You must either place Router2’s LAN on a different subnet (for routed/WAN setup) or use LAN–LAN mode to merge networks. [Elektroda, Vytautas_YT, post #16891716]

What’s the simplest way to merge two LANs without readdressing most devices?

Use LAN–LAN: connect a LAN port of Router2 to Router1, and disable DHCP on Router2. Router2 then acts as a switch and optional access point, and Router1’s DHCP serves all clients automatically. [Elektroda, m.jastrzebski, post #16891764]

If I use WAN (double NAT), who can see whom?

Router2 clients can reach Router1 and the Internet. Router1 clients cannot see devices behind Router2 because NAT hides them. As the expert put it, “those from router 1 will not see those from router 2.” [Elektroda, m.jastrzebski, post #16891800]

How should I set Router2’s WAN IP and gateway when chaining to Router1?

Assign Router2’s WAN an address from Router1’s LAN, for example 192.168.0.123, with gateway 192.168.0.1. Think of Router2’s WAN as just another host on Router1’s network. Leave Router2’s LAN addressing per its own subnet. [Elektroda, m.jastrzebski, post #16891800]

I need isolation but one physical network—what feature should I enable?

Use VLANs. Place each group in a separate VLAN on one router or a managed switch. Block inter‑VLAN routing to keep groups invisible while sharing the same upstream gateway and cabling. [Elektroda, m.jastrzebski, post #16891800]

Can VLANs keep both groups on the same default gateway without mutual visibility?

Yes. The thread suggests unifying under one router and separating traffic with VLANs to prevent device discovery across groups while preserving the same upstream gateway. [Elektroda, pirates21, post #16892296]

What happens if both sides already use 192.168.0.0/24 and I try WAN‑to‑WAN?

It fails. Router2 cannot have LAN and WAN in the same address pool. Change one side’s subnet for routing, or use LAN–LAN mode instead. This is a common edge‑case that blocks connectivity. [Elektroda, Vytautas_YT, post #16891716]

How do I quickly move Router2’s hosts under Router1 without touching each client?

Follow LAN–LAN: 1) Disable DHCP on Router2. 2) Connect Router1 LAN to a Router2 LAN port. 3) Reboot clients to obtain new DHCP leases from Router1. Router2 becomes a switch/AP. [Elektroda, m.jastrzebski, post #16891764]

Do I need to change static IPs when unifying networks?

Only those that conflict. Put everything into one subnet, then correct overlapping static addresses. You can scan from either router to find conflicts and update the few affected hosts. [Elektroda, Vytautas_YT, post #16892546]

What is a VLAN, in plain terms for this setup?

A VLAN is a logical LAN segment on the same physical gear. It lets you isolate two groups so they cannot see each other, even though they connect to the same router or switch. Enable it to enforce separation. [Elektroda, m.jastrzebski, post #16891800]

What is double NAT and when is it acceptable here?

Double NAT occurs when Router2 performs NAT behind Router1. It blocks inbound discovery from Router1 but allows Router2 clients out. Use it when you want one‑way visibility and quick onboarding without readdressing. [Elektroda, m.jastrzebski, post #16891800]

Can I set Router2 WAN to 192.168.0.123 and keep its LAN gateway at 192.168.0.1?

Not if Router2’s LAN also uses 192.168.0.0/24. WAN and LAN cannot share the same subnet. Use a different LAN subnet or switch to LAN–LAN mode. [Elektroda, Vytautas_YT, post #16891716]

I want mutual visibility across routers; will double NAT work?

No. NAT hides Router2’s devices from Router1, preventing mutual discovery. For two‑way visibility, route between distinct subnets or collapse into one LAN with VLANs disabled. [Elektroda, m.jastrzebski, post #16891800]

Any best‑practice IP examples to avoid conflicts in a routed setup?

Use distinct /24s, such as Router1 LAN 192.168.0.0/24 and Router2 LAN 192.168.1.0/24. Set Router2’s WAN to 192.168.0.x with gateway 192.168.0.1. This preserves about 254 usable addresses per subnet. [Elektroda, m.jastrzebski, post #16891800]
Generated by the language model.
ADVERTISEMENT