logo elektroda
logo elektroda
X
logo elektroda

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

pirates21 18864 11
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16891635
    pirates21
    Level 13  
    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  
    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  
    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.
  • ADVERTISEMENT
  • #4 16891764
    m.jastrzebski
    Network and Internet specialist
    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).
  • #5 16891772
    pirates21
    Level 13  
    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.
  • #6 16891777
    m.jastrzebski
    Network and Internet specialist
    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  
    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.
  • ADVERTISEMENT
  • Helpful post
    #8 16891800
    m.jastrzebski
    Network and Internet specialist
    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.
  • #9 16891881
    pirates21
    Level 13  
    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?
  • ADVERTISEMENT
  • #10 16891885
    m.jastrzebski
    Network and Internet specialist
    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  
    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  
    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.
Summary generated by the language model.
ADVERTISEMENT