we have two router in our office lan,one for accessing internet and other one for accessing our own office sites
(intranet).Is it possible that we can access both internet and our own office sites by adding double default gateways. Internet(default gateway 10.133.14.1) and own local sites default gateway (10.133.14.10).how can we access both simultaneously

Recommended Answers

All 12 Replies

It would be easier to redesign your network layout, but to answer your question, you would have to add static routes in the local routing tables for all of the computers on the 10.133.14.x subnet so they know which gateway to use to get to the correct remote subnet.

My 2 cents:

You can't have more than 1 gateway. You should opt to use the gateway that will be used for the 'catch-all', this is usually the one that leads to the public internet. On that gateway, you should add in static routes for other internal subnets and the ip's used to access those subnets (the other gateways).

This is much much easier than adding static routes to every PC.

It would be easier to redesign your network layout

Just to clarify my earlier post.... I'm not suggesting that you maintain this design. It can be technically done with two gateways...you can have as many gateways as you desire on a subnet although a subnet with multiple gateways is rarely implemented. If there are multiple gateways on a subnet, the hosts on that subnet would need to have information in their local routing tables to know where to send packets to.

I also recommend CimmerianX's approach.

Thanks jorgeM and cimmerianX for your replies.i am trying to add static routes to the local routing table of the computer but all the local intranet sites are not opening.I think i am doing somewhere mistake.I give default gateway as the router of internet and add intranet router as secondary default gateway
on particular PC i gave command (route add (ip particular site) mask 255.255.255.255 10.133.14.10)
it takes the command but not able to open that site
we are connected through lease line to our another office, there resides the server of all our loacal intranet sides and that office is in another city
.its a WAN.pleae tell as detail as possible

give default gateway as the router of internet and add intranet router as secondary default gateway

You can't do that. You can only have 1 default gateway.

Even if you add a 2nd gateway, the metric will determine which gets the traffic.
Even if both metrics are the same, then the binding order determines which gets the traffic.

You need to add static routes. How you do this is depent upon the OS you are running.

give default gateway as the router of internet and add intranet router as secondary default gateway

Agree that solution is not going to work.

It would be much easier if your hosts only have one default gateway, no use of static routes and connect the routers together if needed. You would then only have to configure the routing table(s) on the routers themselves. Preferrably, this should be done with one router instead of two. However, I understand that certain scenarios may require two because of the fact that you already have the gear and each router may have certain interfaces, software running, etc...

configuring router again is risk prone .Only 5 or 6 pc's need both the routing.we are using XP,window 7 OS.I want to know does i need to add every route to that particular sites in the routing table of the pc's.

I want to know does i need to add every route to that particular sites in the routing table of the pc's

Yes, of course, the PCs' local routing tables would have to know about routes that are on remote subntes.

You have to first understand how the default gateway (DG) works. This introduces a route of 0.0.0.0 into the PCs routing table. There are other entries including information about the subnet the PC is on. Basically what happens is that for every packet the PC has to send out, if there is no match in the routing table, send the packet to the DG.

Well, now you have a problem. There are two ways to get out of the network so this route is not going to be able to handle all packets. You can still have one default gateway and assign that IP to the interface of the router that is connected to the internet.

For all other remote subnets that are on the second router, you would have to include those in the local routing table for each PC.

Ok, so it may help to refer to a diagram. Here is an example of a subnet with two gateways (diagram by JorgeM).

205258bd87e7584c84368e79292cca6c

In this example, for PCs A, B, and C -- to get to the 192.168.1.x subnet, you would need to specifically include a route in the routing table for each PC and send those packets to 192.168.0.253 instead of the default gateway.

Here is a more detailed explanation: Using the Windows Route Command

This article may help you as well. How IP Packets are Routed on a Local Area Network

configuring router again is risk prone

And why is that? Configure routing once on the router an you are done.... No static routes on PCs, new devices will route correctly.... PC moved to new subnets won't run the risk of not routing traffic correctly....

thanks jorgeM for your valuable support,my problem is very much solve now .i have access to both routes.i am able to access both internet as well as intranet sites.but there is still little problem.as i shutdown pc all the added static routing wash away.i have add 6 static routes to the routing table of pc.i am agree with cimmerianX also but our main issue is routing in individual pc

i shutdown pc all the added static routing wash away.i have add 6 static routes to the routing table of pc.i am agree with cimmerianX also but our main issue is routing in individual pc

you would have to make the routes persistent.
http://technet.microsoft.com/en-us/library/cc757323(v=ws.10).aspx

very very thanks for your valuble support.now by using -p command all routes are permanent.thanks once again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.