Community discussions

MikroTik App
 
palii
just joined
Topic Author
Posts: 23
Joined: Sun Nov 19, 2017 6:57 pm

Connecting two routers in two buildings with cable

Sat Mar 02, 2019 5:46 pm

Hi Everyone,

  • We have 2 buildings, 2 routers, 2 internet connections
  • Each has is own dhcp and vlans
  • Currently the networks are bridged with an ipsec tunnel, which works well
  • Since the buildings aren't that far apart, I would like to connect the routers on their ETH5 by running a CAT6 cable
  • Preferably I would keep the current topology and make it work as the current ipsec tunnel (separate vlans, dhcp, internet connections etc)
networks.jpg
My question: What do I need to configure after connecting the cable to the 2 router's ETH5 ports?

Thanks
You do not have the required permissions to view the files attached to this post.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19109
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Connecting two routers in two buildings with cable

Sat Mar 02, 2019 6:06 pm

Well I see a conflict as both routers are providing DHCP?
What would be the purpose of ether5 on both routers, in other words what does the connectivity allow.....
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11444
Joined: Thu Mar 03, 2016 10:23 pm

Re: Connecting two routers in two buildings with cable

Sat Mar 02, 2019 10:19 pm

Forget UTP cable, ethernet over UTP is limited to 100 metres. For anything longer one has to use optical fibre ...

Keeping that problem aside, you'd have to add some routing. Easiest would be to use a /30 subnet for both ether5 ports and add one static route on each router to access remote LAN via tis path.
 
palii
just joined
Topic Author
Posts: 23
Joined: Sun Nov 19, 2017 6:57 pm

Re: Connecting two routers in two buildings with cable

Tue Mar 12, 2019 12:25 pm

What would be the purpose of ether5 on both routers, in other words what does the connectivity allow.....
To provide faster connectivity than ipsec between the two buildings.

Forget UTP cable, ethernet over UTP is limited to 100 metres. For anything longer one has to use optical fibre ...
I may have overstated the actual distance, it wouldn't be over 100 meters. Optical can be an option by switching to RB760iGS and using an SFP module.

Keeping that problem aside, you'd have to add some routing. Easiest would be to use a /30 subnet for both ether5 ports and add one static route on each router to access remote LAN via tis path.
I think I get the general idea what you suggest. You mean like this?

IP -> address:
  • Router #1 = Address: 10.99.0.1/30, Interface: Eth5
  • Router #2 = Address: 10.99.0.2/30, Interface: Eth5
IP -> routes:
  • Router #1 = 10.2.0.0/16, Gateway: Eth5
  • Router #2 = 10.1.0.0/16, Gateway: Eth5
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11444
Joined: Thu Mar 03, 2016 10:23 pm

Re: Connecting two routers in two buildings with cable

Tue Mar 12, 2019 3:24 pm

I think I get the general idea what you suggest. You mean like this?

IP -> address:
  • Router #1 = Address: 10.99.0.1/30, Interface: Eth5
  • Router #2 = Address: 10.99.0.2/30, Interface: Eth5
IP -> routes:
  • Router #1 = 10.2.0.0/16, Gateway: Eth5
  • Router #2 = 10.1.0.0/16, Gateway: Eth5

I'd use "the other end's" IP address as gateway:
  • Router #1
    /ip route add dst-address=10.2.0.0/16 gateway=10.99.0.2
  • Router #2
    /ip route add dst-address=10.1.0.0/16 gateway=10.99.0.1

And then, of course, you'd want to construct some firewall rules on both routers targeting the remote LAN :wink:
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: Connecting two routers in two buildings with cable

Tue Mar 12, 2019 3:49 pm

Hello,

I'm assuming that the /16s are just to summarize local subnets and you don't have such a big network. Otherwise, break the subnet down to smaller ones (like /24).

Also, I'd probably go with fiber regardless since your working with two buildings. Fiber will insulate you from grounding issues, as both building most probably don't share one (commun) ground.

Finally, even if you have a small network, I'd still suggest dynamic routing (like OSPF) as you won't want to manage the topology changes that may (will) occur in the futur and stuff you may have forgotten. The best example I see of this here is that nobody suggested static routes for ISP redundancy. If one fails, then that building is out of Internet, even though you have a perfectly good (and reachable) one next door.

Cheers,
 
User avatar
Steveocee
Forum Guru
Forum Guru
Posts: 1120
Joined: Tue Jul 21, 2015 10:09 pm
Location: UK
Contact:

Re: Connecting two routers in two buildings with cable

Tue Mar 12, 2019 4:51 pm

Hello,

I'm assuming that the /16s are just to summarize local subnets and you don't have such a big network. Otherwise, break the subnet down to smaller ones (like /24).

Also, I'd probably go with fiber regardless since your working with two buildings. Fiber will insulate you from grounding issues, as both building most probably don't share one (commun) ground.

Finally, even if you have a small network, I'd still suggest dynamic routing (like OSPF) as you won't want to manage the topology changes that may (will) occur in the futur and stuff you may have forgotten. The best example I see of this here is that nobody suggested static routes for ISP redundancy. If one fails, then that building is out of Internet, even though you have a perfectly good (and reachable) one next door.

Cheers,
^^^ This.

You don't want copper between 2 different buildings, add your distance and fibre is the only option.
Fantastic point regarding redundancy as well.
 
palii
just joined
Topic Author
Posts: 23
Joined: Sun Nov 19, 2017 6:57 pm

Re: Connecting two routers in two buildings with cable

Mon Mar 25, 2019 10:20 pm

Thanks for all the wonderful suggestions. The RB760iGS arrived, I will start testing in-house with copper first, then a manufactured mikrotik sfp optical cable.

AlainCasault:
I'm assuming that the /16s are just to summarize local subnets and you don't have such a big network. Otherwise, break the subnet down to smaller ones (like /24).
Indeed, there are multiple vlans in both networks. Only two specific vlans would be "bridged".

AlainCasault:
The best example I see of this here is that nobody suggested static routes for ISP redundancy. If one fails, then that building is out of Internet, even though you have a perfectly good (and reachable) one next door.
Great idea. Could you give me pointers on how to configure this? Both buildings have dynamic external IP with PPPoE internet connections.

mkx:
I'd use "the other end's" IP address as gateway:
Alright, thanks for the corrections! :)

Steveocee:
You don't want copper between 2 different buildings, add your distance and fibre is the only option.
Yeah, I'll go with fiber. We used to have lightning-related problems.
 
User avatar
AlainCasault
Trainer
Trainer
Posts: 632
Joined: Fri Apr 30, 2010 3:25 pm
Location: Prévost, QC, Canada
Contact:

Re: Connecting two routers in two buildings with cable

Tue Mar 26, 2019 3:06 pm

I'd go with OSPF and let everything sort itself our ;)

Take a look at https://alaincasault.com/ca/posts/, the post named. "Redundant WAN links".

When the failure is in the ISP's infrastructure, the regular "check gateway" doesn't help much.

Cheers,


Sent from my cell phone. Sorry for the errors.

Who is online

Users browsing this forum: abdullanetworking, akakua, cmmike, eworm, yakovz and 29 guests