LAN Routing

Connecting 2 networks with different subnets

Occasional Visitor

Connecting 2 networks with different subnets



I have  2 buildings- each with their own networks, switches, routers etc.

Building A is on the network and Building B is on the network.

We ran fiber to connect the 2 buildings together. I am using a static route on my router to get the networks to talk to each other- but I think it is slowing things down- I'm only getting 90-150Mbps instead of 500-1000Mbps.


So I want to try having the switches do the routing. I've attached a diagram of the current network topology.


From what I understand- I need to create a new VLAN on each switch- with the IP address of the other buildings network. Then add the fiber port # on the switch to that new VLAN as TAGGED. Then enable IP Routing on both switches.


My question is:

1) Is that all I need to do?

2) What IP should I give the VLAN- a random IP- or something like (the whole network)?

3) I still want the router to deal with all other routing- will doing this interfere?



Thanks for your help!






Honored Contributor

Re: Connecting 2 networks with different subnets

If you enable routing on both switches, you will need to:

1. Change all your hosts' default GWs to point at the switch IP address instead of the router IP address

(eg, building A hosts' default GW needs to be

2. Add to each switch a default route pointing at its local router 
(eg, Building A needs -->

3. Create on each switch a new VLAN, VLAN2, giving it an address of, eg, at Building A, and at Building B

4. Add to each switch a static route for the other switch's subnet pointing at the other switch's IP address in VLAN2.

(eg, Building A needs>

5. On both switches, on the switchport that is patched to the other switch, change it to VLAN2 Untagged.

Occasional Visitor

Re: Connecting 2 networks with different subnets

Thank you very much- it worked.


2 things to point out.


1) You can get around having to change the Gateway IP on every device by simply swapping the switch IP with the router (former gateway) IP. This way all devices are still pointing to the correct gatweay.


2) To ensure that DHCP works correctly: Set a ip helper address of the same side router and change the DHCP server gateway address to be the switch.