How to interconnect two different LANs?

9,265

Solution 1

You can plug a router in between Switch A and Switch B (from here on referred to as Router C, with ip addresses 192.168.0/1.254), and set up two static routes on the gateway routers to route between the two networks.

On Router A: A route to 192.168.0.0 with subnet mask 255.255.255.0 using the 192.168.1.x address of Router C

Example (Cisco IOS command): ip route 192.168.0.0 255.255.255.0 192.168.1.254

On Router B: A route to 192.168.1.0 with subnet mask 255.255.255.0 using the 192.168.0.x address of Router C

Example (Cisco IOS command): ip route 192.168.1.0 255.255.255.0 192.168.0.254

It is absolutely not necessary that this Router C be a Cisco device, I've simply included the Cisco syntax as it is what I am familiar with to be used as an example.

There may be a way to do this using just a cable connected between Router A and Router B if they have spare ports on them, but that would largely boil down to specifics about the capabilities of the routers you are using, while the above example should work on just about any equipment (I personally just ran a simulation in Cisco's Packet Tracer to make sure it was accurate).

Solution 2

Your issue is that you have two networks that are bespoke for the attached devices IE if computer 1 and 2 are attached to Network A, and computers 3 and 4 are attached to Network B, they cannot interconnect

What you would need to do is connect all 4 PC to network A, and then via a separate network adapter also connect them to network B. You could, connect via wireless to one and via Ethernet to the other.

Then all computers can share other devices on both networks.

Share:
9,265

Related videos on Youtube

Kunwar
Author by

Kunwar

Updated on September 18, 2022

Comments

  • Kunwar
    Kunwar over 1 year

    I have two different routers connected to different ISPs having different LANs. I want to set up the network in such a way that we can connect to devices on the other LAN or ping devices on the other network. One router has DHCP enabled. NAT is enabled on both of the routers.

    I have tried putting in a static router but I am not sure if I am doing it right. I want to connect to computers, DVR and other devices. Right now I change 0 and 1 in the IPs to switch between networks. Is there a way to do it?

    Router A's settings: IP Address: 192.168.1.1 Subnet Mask: 255.255.255.0

    Router B: IP Address: 192.168.0.1 Subnet Mask: 255.255.255.0

    (192.168.1.1)                      (192.168.0.1)
    WAN 1> Router A> Switch1-----------Switch2< Router B(DHCP) < Wan 2
             |                                      |
    Computers and Printer              Computers, IP Phones and DVR
    
  • Rocket04
    Rocket04 almost 10 years
    this doesn't really answer anything...
  • 0xDAFACADE
    0xDAFACADE almost 10 years
    This method will work, but assumes you can install extra nic's into your various network equipment such as the DVR mentioned in the question. It also poses scaling issues that leave it as a less than ideal solution once you get beyond a handful of devices, making a router (or layer three switch between the two routers) a more elegant solution.
  • Kunwar
    Kunwar over 9 years
    I used Cisco 851 to do this. Configured one ip on the WAN side and another on VLan1 cuz this router is a hybrid router and has Ethernet ports in switch mode. Plugged the router in the network and added static routes and it worked! Thanks for your help