Posted on 2006-04-10
Last Modified: 2008-03-06
Can anyone give me the exact line to add a static route for the following setup

My domain (192.168.16.X) access's the internet through a router withip all users have as there gatway.  I run a website  with a lan address of which is connected to a router which has a second address of (connected back to my existing lan)

Basically I want any requests for to go to for the entire domain.  I believe if I make the change to the server for the domain then the clients will automatically update as the server is set as there primary DNS
Question by:Sid_F
    LVL 8

    Expert Comment

    Can you clarify whether you want to change DNS or you want to change your routing?

    The best way to add a route for all machines on your network to the network would be to add a route on the default gateway router which will direct traffic for the network to the router.

    Making a change in DNS will change what the url resolves to but will not change how the traffic is routed to the server unless you also add a network address translation.
    LVL 25

    Expert Comment

    i agree with saineolai's idea of doing it with proper dns config.

    also you are asking for a 'static route' which will not resolve your issue at all,,, static routes are for routing networks and/or subnets, not individual IPs.  i think what you are asking for is IP forwarding, which is completely different than static routing.  But as mentioned above, your problem can be resoved with proper DNS setup which is the proper way to do it.

    LVL 6

    Accepted Solution

    you mean you want to add a static route via a gpo or something? maybe it would be best if you add the static route in the router .16.4... then every workstation would use the normal gateway, and this gateway would forward the packets to the proper router...

    but, if you want to add a static router to a domain, you could make a .bat file that contains the proper route add command, and then set it to run in a gpo...
    LVL 11

    Expert Comment

    by:Renato Montenegro Rustice
    Sainei is right.

    But, if you really really really want to create the route, you have to do it in all machines that need this access. Open command prompt and type the following:

    route -p add mask

    -p will make the route permanent (even after a restart, it will remain)

    This should work fine. But, again, the best is to configure this route on gateway.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction How to create multiboot configuration with XP\Vista and Windows 7 on it? And most important question - how to do this correctly so not to have any kind of nightmares we get when system gets screwed? First of all one should realize t…
    Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    733 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

    23 Experts available now in Live!

    Get 1:1 Help Now