Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

One Network Adapter Two Diferent Gateways

Posted on 2004-11-03
7
Medium Priority
?
201 Views
Last Modified: 2013-11-09
In windows XP this is possible but sometimes it doesn't work right, what's the right configuration when using two diferent networks. One is for our Intranet the other for Internet Access.

Kind regards
0
Comment
Question by:cuadrag_oscar
4 Comments
 
LVL 4

Accepted Solution

by:
tmcguiness earned 100 total points
ID: 12488993
You should just use a single default gateway and let the routers do their jobs. I've not looked at it on XP but you can set up routing  specifications on *nix boxes. With these you can specify routes to networks and hosts. You'll just create yourself an unnecessary headache by doing something like this when there are changes to the network infrastructure. Routers use dynamic routing protocols and have people who's job it is to babysit them. Let them do their jobs and you worry about something else.
0
 
LVL 5

Assisted Solution

by:Anthony_E
Anthony_E earned 100 total points
ID: 12489156
you can use the route command from the command line.

C:\>route /?

Manipulates network routing tables.

ROUTE [-f] [-p] [command [destination]
                  [MASK netmask]  [gateway] [METRIC metric]  [IF interface]

  -f           Clears the routing tables of all gateway entries.  If this is
               used in conjunction with one of the commands, the tables are
               cleared prior to running the command.
  -p           When used with the ADD command, makes a route persistent across
               boots of the system. By default, routes are not preserved
               when the system is restarted. Ignored for all other commands,
               which always affect the appropriate persistent routes. This
               option is not supported in Windows 95.
  command      One of these:
                 PRINT     Prints  a route
                 ADD       Adds    a route
                 DELETE    Deletes a route
                 CHANGE    Modifies an existing route
  destination  Specifies the host.
  MASK         Specifies that the next parameter is the 'netmask' value.
  netmask      Specifies a subnet mask value for this route entry.
               If not specified, it defaults to 255.255.255.255.
  gateway      Specifies gateway.
  interface    the interface number for the specified route.
  METRIC       specifies the metric, ie. cost for the destination.

All symbolic names used for destination are looked up in the network database
file NETWORKS. The symbolic names for gateway are looked up in the host name
database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard,
(wildcard is specified as a star '*'), or the gateway argument may be omitted.

If Dest contains a * or ?, it is treated as a shell pattern, and only
matching destination routes are printed. The '*' matches any string,
and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*.
Diagnostic Notes:
    Invalid MASK generates an error, that is when (DEST & MASK) != DEST.
    Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1
             The route addition failed: The specified mask parameter is invalid.
 (Destination & Mask) != Destination.

Examples:

    > route PRINT
    > route ADD 157.0.0.0 MASK 255.0.0.0  157.55.80.1 METRIC 3 IF 2
             destination^      ^mask      ^gateway     metric^    ^
                                                         Interface^
      If IF is not given, it tries to find the best interface for a given
      gateway.
    > route PRINT
    > route PRINT 157*          .... Only prints those matching 157*
    > route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

      CHANGE is used to modify gateway and/or metric only.
    > route PRINT
    > route DELETE 157.0.0.0
    > route PRINT

you can keep adding gateways to whatevr network you want to go to but whats the point, as tmcguiness said use a router..
0
 
LVL 15

Expert Comment

by:adamdrayer
ID: 12493828
tmcguiness is correct.  A gateway is just a catch-all for routes not specified.  There should be only one.  Much like the highlander.
0
 
LVL 5

Expert Comment

by:muhalok
ID: 12540642
First regarding gateways and static routs:

1. Gateway is an essential part of any route.
2. The amount of gateways is not limited.
3. For internal access, in case u have only 1 subnet - you don't need a gateway, since you are in the same subnet.
4. "Default Gateway" says go through me in case u didn't find any appropriate route in a routing table. But you can have more tha 1 default gateway, since you have another parameter called "metric" which can be assigned to a default gateway or a static route: The machine will try to use gateways in the table according to the metric: 1 first, 2 second, etc.

5.NOTE: u can also use metric for regular static routes.

I think accoring to the question, you'll need only 1 default route - the one that will help u access the Inet.
For internal, no need - or just define a static route. (Don't forget to add "-p" to make it persistent).
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to fix a SonicWall Gateway Anti-Virus firewall blocking automatic updates to apps like Windows, Adobe, Symantec, etc.
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

564 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