1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Joining two networks on the LAN side

Discussion in 'Networking Issues' started by duckworth, Dec 9, 2005.

  1. duckworth

    duckworth Guest

    I have two networks, each with their own internet connections and routers and I would like create a wired route between them so that I can route traffic between the two internal lans without going out over the internet. I have a WRT54G (DD-WRT v23) with an internal LAN of 10.11.12.XXX and a WRTP54G with an internal of 192.168.15.XXX

    I have a hard wired ethernet link between them both plugged into the LAN sides of each router. What would I have to do to be able to access the 192.168.15.xxx addresses from the 10.11.12.xxx lan and vice versa? do I need to enter a staic route on each router?

    Not sure what I need to do.
  2. agarza

    agarza Network Guru Member

    Yes, you need to add a static route on each router.
  3. OldeBill

    OldeBill Network Guru Member

    Hmm, this one seems a bit tricky.

    First off, if the point is to allow 10.11.12.XXX and 192.168.15.XXX to exchange traffic without going out over the Internet. I'm not sure how to accomplish this by just having a static route. Unless, of course it's possible to configure the WRT54G's with multiple VPNs on the LAN side. I'm not familiar with DD-WRT, if it is possible to create on VLAN for and another for, and that the router can route between VLANs then yes, a static route could work. However, I would have figured that this would have been inherent in setting up the VLANs.

    Otherwise, it may be possible to accomplish this using a bit of IP Subnet Mask manipulation. I'm thinking of something like moving all the PCs to a single /24 network but carefully assigning IP addresses and configuring the routers with /25 networks. I hope I can explain this clearly.

    OK, let's start with; the /24 (pronounced "slash 24") refers to a subnet mask with the first 24 bits set to '1', and may be more familiar to you as In a /24 all the addresses from to are part of the same LAN. Now let's set up the LAN interfaces on the routers with the following: let's take the devices that formerly belonged to and plan to fit them into the following IP network i.e., a subnet mask of So, devices with addresses from to are on the same LAN. Note that IP addresses above 127 i.e., .128 to .255 will be part of a different LAN.

    Next, take the devices that were part of and plan to make them part of That is, these devices will have IP addresses between and

    The idea here will be to set up the NICs for all LAN devices except the routers as part of while setting up the routers to and respectively. From the standpoint of the non-router devices all of the IPs are part of the same /24 IP network and they can reach each other directly, without needing to traverse a router. From the stand point of each router, it can only see traffic (and route traffic) for the /25 network that it's configured to serve.

    Thus, computer NICs will need to be configured with static IP addresses, a subnet mask, and the appropriate router IP as it's default gateway. Computers with addresses from .0-.127 go to a router with an IP address in the same range. And, similarly for computers and the router with an IP address in the .128-.255 range.

    For the routers, the LAN interface will also need to be set up statically for both. One router will be set up to i.e., with a subnet mask of, and the other to Thus each router will only interconnect it's own /25 IP network to the Internet connection and will ignore other IP addresses. Hence devices from the current will still only interconnect through the router they're currently using and the same for devices on the current IP network.

    Note that the big pain here is that DHCP won't work if you want communications between the and networks. This is because DHCP will set the subnet mask to /25 instead of the /24 we're setting up manually. And, that is needed to make both /25 networks part of a single /24 for computers. However, you *can* use DHCP for any devices that do *not* need to communicate from one /25 to the other. Still, it might be best to configure Static DHCP to make sure that devices get assigned to the right /25.

    Sorry this is so long. Hopefully it's clear enough.

Share This Page