9

I've seen a lot of questions about this, but haven't really understood/didn't match my issue.

I'm a newbie regarding networking.

I got two routers, both are connecting to the wan (giving them different external IP).

192.168.0.1 is a vilfo and 192.168.2.1 is a dlink860l

is there anyway to connect those, so a computer on 168.0.x can access the printer (and other service) on 168.2.x (and vice versa)

The vilfo is special router for vpn, and are powered by LuCI lede-17.01, so it's highly customisable (if you know what to do (I don't))

I do have another router that's not used at the moment, if a bridge or something like that is necessary.

*edit: I just tested to put a network cable between the routers (lan port to lan port), but nothing really happened, so I did some other stuff. about 30 mins later I get a mail from my vilfo saying that as new unit had been discovered. Upon checking, I saw that it was the printer, on the other router that was detected..

I don't know why... but suddenly it just worked...*

6
  • 1
    You need static routing for your subnets , serverfault.com/questions/882970/… Commented Oct 8, 2020 at 7:22
  • 2
    i think it's interesting how people can downvote a complete fair network question, that's written pretty basic so people can understand it..
    – JoBe
    Commented Oct 8, 2020 at 9:15
  • @JoBe we cannot know what was in the downvoter head atm sadly.
    – LeRouteur
    Commented Oct 8, 2020 at 9:53
  • 1
    Do those routers have a third interface you can use to physically connect them (assuming they are in the same location to begin with)? Otherwise you need to create a VPN between them.
    – Massimo
    Commented Oct 8, 2020 at 12:36
  • 1
    What is between the two routers? Are they connected to the same WAN connection at home? Or are you trying to have the two networks linked together over the internet?
    – Nelson
    Commented Oct 8, 2020 at 18:20

4 Answers 4

4

As @mohammed said in his comment, you should have a look at static routing.

Let's suppose the router A (192.168.0.0) wants to communicate with the network behind the router B (192.168.2.0).

Using static routing, you'll simply add an entry in the routing table on the router A to tell "if I have a packet for network 192.168.2.0, I'll send it to the router 192.168.2.1 using my interface xxx".

Don't forget to also create a static route on the router B (if you don't, the communication will be unidirectional).

EDIT: according to @JacobEvans comment, I'll add that you'll also need a network between your 2 routers. You can use a site-to-site VPN (maybe your Vilfo router can do it) or a peering network, but I'll recommend a VPN since it's simpler to create.

4
  • 2
    you also need a 3rd common network that isn't going to NAT traffic between the networks, so a 'LAN2' interface, with a common statically assigned network (192.168.1.0/30 would suffice). also there's likely a DHCP server running on both routers! Commented Oct 8, 2020 at 12:21
  • So you mean an "inter-network" that will pass the communication between each router?
    – LeRouteur
    Commented Oct 8, 2020 at 12:23
  • I mean like a peering network. you could also build a site-to-site vpn Commented Oct 8, 2020 at 12:25
  • Oh yes, exactly. A VPN will be more simple to set up, I'll add it in my answer, thanks for the notice
    – LeRouteur
    Commented Oct 8, 2020 at 12:32
3

If you're looking to merge the networks, why keep them split? Otherwise some systems that use broadcast discovery (like spotify, chromecast, apple play, etc) won't work between those networks.

I'd recommend just making the dlink an access point on your vilfo router, if you want some services to use direct internet calls, vilfo has documentation on split-tunneling.

Per the Manual

If you are connecting the DIR-860L router to an existing router to use as a wireless access point and/or switch, you will have to do the following to the DIR-860L before connecting it to your network: • Disable UPnP™ • Disable DHCP • Change the LAN IP address to an available address on your network. The LAN ports on the router cannot accept a DHCP address from your other router. To connect to another router, please follow the steps below:

  1. Plug the power into the router. Connect one of your computers to the router (LAN port) using an Ethernet cable. Make sure your IP address on the computer is 192.168.0.xxx (where xxx is between 2 and 254). Please see the Networking Basics section for more information. If you need to change the settings, write down your existing settings before making any changes. In most cases, your computer should be set to receive an IP address automatically in which case you will not have to do anything to your computer.
  2. Open a web browser, enter http://192.168.0.1 (or http://dlinkrouter.local./) and press Enter. When the login window appears, set the user name to Admin and leave the password box empty. Click Log In to continue.
  3. Click on Advanced and then click Advanced Network. Uncheck the Enable UPnP checkbox. Click Save Settings to continue.
  4. Click Setup and then click Network Settings. Uncheck the Enable DHCP Server checkbox. Click Save Settings to continue.
2
  • that's a good answer, but I'm looking for a way to keep the different external IP's, to split the load (each router connected to the "wall" gets an own external IP & gigabit connection)
    – JoBe
    Commented Oct 9, 2020 at 8:20
  • So you can get full gigabit on both lines simultaneously, if so great! @LeRouteur's answer should be sufficient, you may need openwrt for the dlink to support the non-standard setup. I'm curious if your performance assumption is a reality Commented Oct 9, 2020 at 14:04
0

You need static route for your subnets ,
I refer to to check another post in serverfault How can I define static routes between two subnets in OpenWRT / LEDE?

-2

I’m confused about what you are meaning to say…. 192.168.0.x on the routers are not the external IP. They are the routers LAN IP address, this would be why connecting devices spits out IP S in that subnet range. An external IP address would be the WAN internet connection address from the ISP that your router uses to speak to the line going in/out your house.

So in this case do they actually have two different external IP’s ? Or are they set to the same WAN ISP external IP? As far as I know you can’t have two external IP’s without paying for and having a second line…. But I could be misinformed about the last part but as far as the external ip thing I know I’m not misinformed as it’s what I do for a living so I’m just wondering what configuration you are actually running?

I’m not even sure how you’d set the second router to a different external IP without having it assigned to you by your ISP in the first place. Otherwise u must have the same external because you can’t just make one up like you do for your routers LAN IP

2

You must log in to answer this question.

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