0

WAN to WAN (router 1 to router 2) - is it possible and what will be the behavior in theory?

For example I will describe:

  1. LAN to LAN (from router 1 primary with DCHP 192.168.1.0/24 and WAN connected from modem ISP, to router 2 disable DHCP) - it does that router 2 will work as a switch
  2. LAN to WAN (from router 1 primary with DHCP 192.168.1.0/24 and WAN connected from modem ISP, to router 2 WAN - enable DHCP 192.168.2.0/24) - devices connected to router 2 will have a diverse IP addresses which receives from DHCP server in router 2.

But it is curious that I see all devices from router 2 in router 1 too and router 1 assigns different IP addresses to these devices too (I see it in DHCP table in router 1).

And I can access the router 1 web administration when I know its IP address.

I meant that router 2 devices will have a different networks (LAN) and I can not have access to the router 1 devices.

Question:

  1. WAN to WAN (router 1 to router 2) - is it possible and what will be the behavior in theory?

What I mean when I study it, that WAN is only waiting for input (modem ISP connectivity to internet) but it can not work like output (it is not possible to connect WAN to WAN, it does not have a practical use and meaning).

Thank you for explaining if need be I can create the image.

3
  • 1
    If you're trying to learn networking, you should primarily study general-purpose routers, as the home gateways which have "LAN/WAN" ports are built for one specific use case and do not fully represent how routers work in general; their firmware imposes a lot of restrictions and configuration that a general router wouldn't have. Things like "input only" are specific to home gateways. Aug 6, 2021 at 11:06
  • @user1686 You are right. When I connected router's 1 WAN to router's 2 WAN it does not anything.
    – JohnK
    Aug 6, 2021 at 11:15
  • @John That is logical. Both routers in their default config expect an ISP to be upstream from the WAN port. If you connect them to each other you will have to do a lot of configuration on both routers before you get a working setup. And many SOHO routers are very limited in what you can configure here. It may not be possible with your specific routers.
    – Tonny
    Aug 6, 2021 at 11:42

1 Answer 1

0

If both your WAN and LAN ports are Ethernet, then the difference between them is purely in software. Ethernet ports are always bidirectional – it's not like (e.g.) video, where some ports only have a transmitter and some only have a receiver.

In other words, every Ethernet port – whether it's labelled "WAN" or "LAN" – is always input and output.

The differences between them are mostly just IP configuration and stuff. While you could kind of say that the LAN port (with DHCP service) is an "output" and the WAN port (with DHCP client) is an "input", that's only kind of true – it's only correct for the standard configuration that home gateways come with, but it's not something that generally makes sense for router ports at all.

So if you have two home routers, and connect both of their WAN ports together, then things will not work at first (the ports will light up and nothing else) – but depending on the router's flexibility can be made to work easily. Specifically:

  1. Both routers have a DHCP client running on the WAN port, expecting to obtain an IP address from a DHCP server connected to that port.

    If the network doesn't have a DHCP server (i.e. it consists entirely just of the two DHCP clients, i.e. two "WAN ports", connected to each other) then none of them will be able to obtain an IP address via DHCP.

    But if you set both ports to use static IP configuration, then they'll be able to talk to each other just fine. (The only thing that DHCP does is IP configuration; it doesn't actually enforce which way packets go.)

    For example, if router A uses 192.168.1.0/24 for its LAN, and router B uses 192.168.2.0/24, then configure both of their WAN ports to use a static IP address 192.168.7.x/24 or something else.

    Alternatively, the router might even allow you to enable a DHCP server on the WAN port (just like on the LAN side). If one router is the DHCP server, another can remain as a DHCP client.

  2. Both routers come with a firewall which allows new connections in the LAN→WAN direction, but not the other way around.

    This made sense when the "WAN" side was facing the Internet, but in your case you'll need to disable it. Many routers allow the firewall to be either disabled completely, or a new rule added that allows everything. (Not all do; in some models it's deliberately made permanently active.)

  3. Both routers come with NAT enabled, rewriting the source IP address of "outgoing" (LAN→WAN) connections with their own address.

    NAT actually shouldn't prevent connections, but it can cause some confusion – and again, it no longer makes any sense to use it for this kind of direct connection when ISPs are not involved.

    This is sometimes disabled together with disabling the firewall; sometimes through a separate checkbox. Often it cannot be disabled at all.

Whether this has a "practical use", it depends. In general, yes; although in most situations you would want to be in 3 or more networks, and wouldn't be converting a WAN port to do something else, but instead would configure the router to have a 3rd network (say "LAN2" or "Neighbour's LAN") while the WAN still went to an ISP.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .