How to have two gateways running in one network

OK so bascially here is my setup

192.168.0.1 is a computer running windows XP. It has 2 network cards, 1 in on the LAN and uses the IP address just mentioned. The other is connected to a modem which is shared with the network so we can access the internet.

192.168.0.254 is a router on the network, it handles DHCP and ALSO acts as a modem to connect to an external network (172.16.7.2)

The problem I have is that on any given computer in the LAN if the default gateway is set to 192.168.0.254, I can see the external network but cannot go on the internet. If the default gateway is set to 192.168.0.1 I can go on the internet by cannot see the external network,.

How can I change this set up so both can be viewed at the same time?
LVL 1
hubfubAsked:
Who is Participating?
 
Kieran_BurnsCommented:
You either set 192.168.0.1 to be your default gateway and add a route on that to point to 192.168.0.254 for 172.16.7.2
route add -p 172.16.7.2 mask 255.255.255.0 192.168.0.254
the mask may be wrong - it depends on your remote subnet
OR
the opposite and set the default gateway on the router 192.168.0.254 to point to 192.168.0.1 with a route on IT to 172.16.7.2
The problem with the latter is that you'll have traffic pinging between the two 'routers' if they are internet bound.
 
0
 
hubfubAuthor Commented:
Keiran,

Thanks for this.

do I just put that command in cmd?

also how would i go about doing it through the GUI if it wasn;t just a command
0
 
Kieran_BurnsCommented:
yep - the route add is just done through the command prompt
if you wanted to use a GUI you would have to be running Routing and Remote access and add the Static Route in there
don't forget the -p - that makes the route permanent, otherwise you lose it when you reboot
0
 
ccomleyCommented:
One trick is to enable a routing protocol between the gateway devices. That way they should share routing information and once that's done you should be able to send a packet to either one and it'll end up where it should.  Most routers at least support RIP.

Or

If that's too much hassle, you need to break it down.

Your Default Gateway setting on all the PCs should point to the router which is the INTERNET connection, as this will be the correct destination for most traffic.

THAT router needs to have a STATIC ROUTE for the network(s) that is/are to be found via the Second router. The "next hop" for these routes should be the local IP address of the second router.

The SECOND router should have a DEFAULT ROUTE pointing at the INTERNET router so IT knows what to do with any traffic it doesn't have an explicit route for.

PCs on the network(s) beyond the second router should have as their default gateway the router on THEIR local network which connects back to your second router.

0
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.