Main router’s DHCP server is out of scope here, router2 needs static IP address on “WAN” interface due to static route defined on main router. Well, router2 could actually obtain “WAN” IP address using DHCP, but it would have to be static lease.
I know that … but @anav is trying to figure it out … and concept of WAN interface is something he’s familiar with (I hope). We can call WAN interface the interface with default route set even though subnet directly beyond it is yet another LAN.
Anav, don’t start with multiple WANs now … I’d expect some knowledge about routing from a guy with multiple internet links
Haha, okay, so there is no WAN interface, so why does the second router have anything to do with the primary subnet?
Are you saying I should view the router as having a LAN interface (not WAN) with the primary router. Without NAT, WAN is really LAN …poof magic.
we have to define the secondary router on the primary subnet for their to be a route between its subnet or subnets with the primary subnet.
Starting to smell like a switch to me LOL
In fact the only difference is that on a switch we dont have to set ip routes, and unless its and advanced l3 switch firewall rules dont apply.
So we want all the functionality available on the router but turn NAT off… Cwazyee but I suppose there may be some requirements I just cannot fathom them yet…
I would simply use a switch or define all subnets on the primary.
Forget about LANs and WANs, think about interfaces and networks that are all equal. It’s almost true, only the NAT breaks it.
There’s network 192.168.10.x and it’s connected to router2’s interface etherX. Then there’s network 192.168.1.x and it’s connected to router2’s interface etherY and also to router1’s interface etherZ. Finally there’s the rest of internet and it’s connected to router1’s interface etherW. But not directly, there’s just some smaller network a.b.c.d/xx, the rest is behing another router (ISP’s gateway), and it goes on like this.
That’s how the whole internet works. ISP’s router that is router1’s default gateway is exactly such router, it has different subnets connected to different interfaces and it doesn’t have any NAT. And next one after it is the same. And next one too, all the way to e.g. MikroTik’s router behind which is webserver with this forum.
If you have NAT on router1, then rest of the internet knows only about public IP address on router1’s etherW. But it doesn’t have to be this way, you could have public addresses in all your networks. Then even router1 wouldn’t have any NAT and it would work, because every device on internet has routes to all other devices on internet. Only most devices don’t have them all, they just know about the next router (their default gateway) and trust that it knows where the rest of internet is.
If every IP address on a LAN will get its own ipv6 address, i dont see how they will run out of ipv6 addresses right quick. I have so many just in my house but I am being efficient and only using two IPV4 public IPs…
I wasn’t thinking about IPv6 now, the “it doesn’t have to be this way” could be either hypothetical scenario that would be possible if internet wasn’t so popular and there would be enough IPv4 addresses for everyone, or if you’d have e.g. some enterprise network and were able to get enough public addresses for it.
But yes, IPv6 fixes this, there are enough addresses for everyone and we’re not supposed to run out of them, ever. IPv4 address has 32 bits. It we added just one bit, we’d have twice as much addresses. If we added two, we would have four times as much. For three bits it’s eight times, and so on. But we added 96 bits. We can’t run out. That’s even with how wasteful current allocation is (e.g. smallest standard subnet has 64 bits, that’s half the length of address).
Don’t forget that “WAN” (Wide Area Network) doesn’t mean “Internet”. It seems to be a Mikrotik thing to treat them as one and the same. In reality you can have WAN that doesn’t need NAT, in fact that’s pretty commonplace, and many sites have separate WAN and Internet connections in which case the default route won’t point to the WAN.
Going back to basics a switch is effectively an Ethernet bridge and connects interfaces within the same L2 domain. It forwards Frames based on Ethernet destination address, with reference to it’s Ethernet bridging table. A router connects different subnets, which inherently should be separate L2 domains. It forwards Packets based on their IP destination address with reference to its IP routing table. I’m aware that Ethernet isn’t the only L2 network, and IP isn’t the only L3 protocol, but those are the ones we are speaking about at the moment.
Layer 3 switches appear to confuse the distinction but in reality they are just devices that contain both functions. They route packets between VLAN IP interfaces and/or natively addressed Ethernet interfaces. But they switch frames between interfaces within the same VLAN.