How to have two gateways running in one network

Posted on 2009-04-16
Last Modified: 2012-05-06
OK so bascially here is my setup 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. is a router on the network, it handles DHCP and ALSO acts as a modem to connect to an external network (

The problem I have is that on any given computer in the LAN if the default gateway is set to, I can see the external network but cannot go on the internet. If the default gateway is set to 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?
Question by:hubfub
    LVL 10

    Accepted Solution

    You either set to be your default gateway and add a route on that to point to for
    route add -p mask
    the mask may be wrong - it depends on your remote subnet
    the opposite and set the default gateway on the router to point to with a route on IT to
    The problem with the latter is that you'll have traffic pinging between the two 'routers' if they are internet bound.
    LVL 1

    Author Comment


    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
    LVL 10

    Expert Comment

    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
    LVL 16

    Assisted Solution

    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.


    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.


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    There are two basic ways to configure a static route for Cisco IOS devices. I've written this article to highlight a case study comparing the configuration of a static route using the next-hop IP and the configuration of a static route using an outg…
    Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now