Routing 2 networks


I have 2 networks on different networks, and they both have their seperate internet connection and their own router but i need them to be able to access data, i thought about using LAN Routing but i couldnt get this to work.  There are 2 NICs in one of the server - am i being sill and missed something?

I configured lan routing and added the rip protocol then added both interfaces....

Who is Participating?
Fred MarshallConnect With a Mentor PrincipalCommented:
The most direct way to do this is with a router.   The function may be provided by your internet gateway routers or it might be separate.  One LAN on one side and one LAN on the other (in Router mode on some).

It helps to always think of this being a 2-way symmetrical arrangement - so whatever is on one LAN should be duplicated on the other LAN.

Here's a typical arrangement:
Add a router with a LAN#1 address on one side and a LAN#2 address on the other side.  Set to run in Router and not Gateway mode so there's no NAT.  Some routers do this by turning off NAT and others do it by setting the mode.

On the LAN #1 internet gateway router add add a route so that packets originating on LAN #1 are directed to the LAN #1 address of the router.  This way, packets originating on LAN #1, destined for LAN #2 will go to their gateway as usual for "foreign" addresses.  The gateway router will send them to the new router as the next hop and the router knows about LAN#2 and will send the packets to its LAN #2 port.

Do the same thing on the LAN #2 internet gateway router - routing packets destined for LAN #1 to the LAN #2 address of the new router.

Packets coming out of the router will be on the LAN they belong on and will go directly to the intended destination computer.  So, there's no extra hop at the receiving end.

Some gateway routers may not want to allow responses due to stateful packet inspection rules.  So, if there are problems with this, it could be there.  For example:

PING a remote computer:
- packet goes to the gateway and is forwarded to the router.
- packet traverses the router and is destined for the target computer
- the target computer responds
- the responding packet goes to the local gateway which has no packet state context for it.  So, it's either forwarded or it isn't.....  If it's forwarded:
- packet is forwarded to the router
- packet traverses the router and is destined for the PING-originating computer

A Traceroute from one LAN to the other should look something like this:

Local gateway
Local port of the interLAN router
Remote computer

You may be able to use the multi-homed server as the "router" here.  Just about any 2-NIC computer would do it by adding:
- a route from LAN #1 subnet to LAN #2 subnet with the LAN #2 NIC as the next hop.
- a route from LAN #2 subnet to LAN #1 subnet with the LAN #1 NIC as the next hop.
... nice and symmetrical.

Access data between various devices or just both networks access data on the one server with the two nics?
infoplsAuthor Commented:
I need access between various devices and both networks...

i got it working with access one way with access just to the routing server...
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

joelsplaceConnect With a Mentor Commented:
Have you tried just connecting the networks and setting up the mask so that they can see each other? would allow them to see anything 192.168.x.x but their gateways would still be the same so they would send data meant for the outside to their own gateway.
If you use VPNs to other networks then that could cause a problem if the other networks use 192.168.x
infoplsAuthor Commented:
One server has 2 NICs with static IP's of both the networks but i should be able to configure a lan route as i can physically run a cable from the switch to the server on the other network which i have done but i was expecting once the lan route with rip was configured i would be able to talk across both networks...
infoplsAuthor Commented:
I need this to be kept internally as requested by the client.  Thats why i thought doing a multihomed server would be a good idea but i just cannot get both networks to speak..
I've got a client with a similar situation that is using my subnet mask solution successfully.
Fred MarshallPrincipalCommented:
I don't know what you mean by "kept internally".  I think everything I mentioned was "internal" pretty much....

Have you set up the routing in the server as described?  Please provide the result from:

route print

Fred MarshallPrincipalCommented:
joelsplace suggests a subnetting approach which could work.

In effect, this creates a single larger subnet with multiple internet gateways.
I think you'd want to be sure that the subnet masks on *all* devices match - including the gateways.
infoplsAuthor Commented:
Is that a route add? Could you give me the correct syntax for this and and will attempt this over the weekend.

With the subnet would I have to change both sites and the dhcp or just the multi homed server?  Sorry about all the questions.
infoplsAuthor Commented:
At the moment both sites are on a subnet
Fred MarshallPrincipalCommented:
I understand that the subnet masks are currently  OK.

Windows route add:

route -p ADD “destination network” MASK “destination subnet mask”  “gateway ip” metric "N"

where everyting in quotes is entered without the quotes as ip addresses and N an integer.


route [-f] [-p] [Command [Destination] [mask Netmask] [Gateway] [metric Metric]] [if Interface]]

infoplsAuthor Commented:
Okay, I shall have a go in the next day when I am back in the office and will report back
infoplsAuthor Commented:
Sorry i am still a little confused, do i do the route add on the server of the client workstations that are trying to connect to the other network?
Fred MarshallPrincipalCommented:
I think I'd mentioned this before:

You can either do this on *all* the computers OR you can do it once, on a router.
The notation is for a computer.
Router setting methods will vary but the ideas are the same.
infoplsAuthor Commented:
Managed to do it via the router, thanks for your input guys.  Much appreciated
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.