A Default Gateway in most cases is a router, which possibly knows where to route every packet, if it doesn't know where, it will drop the packet.

--->A situation where you might knowingly/unknowingly configure two default gateways:

Using a desktop PC with two NICs or a laptop with a Wireless NIC and a LAN, you try to configure a brand new network device or change already configured network device like a Access point, Switch, Router, Wireless Bridge etc at your work place or at home. You would be on your corp-network/Internet through your primary card i.e. say NIC1. You will connect the device to your laptop/PC using a cross-over cable if a router or a Straight-through cable if a switch to your second NIC, and then you put in IP, Netmask, Gateway info on this card, say NIC2. With this setup you will have network connectivity issues. This is due to fact that, your PC/laptop's routing table has two default routes with two different EXIT INTERFACES causing confusion as to which one to use to send packets. Below is routing table of one such example from a Windows PC.
Here Corp-network is and the Network device is on Subnet.

IPv4 Route Table
Active Routes:
Network Destination               Netmask          Gateway       Interface          Metric
                       30                      On-link          306          On-link          306         On-link          306            On-link    286         On-link    286         On-link    286                      On-link          306                      On-link    286         On-link          306         On-link    286

From the above table we can see that there are two default route entries and so the PC would be confused which interface to use as its exit interface.

Solution to this is to leave out the Default Gateway entry blank on the NICs of the PC, like in this example: -------------------------->

With this setup you wouldn't have any network issues reaching your corp-net/internet. Per the example in picture PC now has only one route entry for Sub-net whereas it had two entries before, one for i.e. "any" and another for "", Notice this as highlighted in the route table above. Now the your PC knows to only send packets destined for Sub-net on NIC2.

If you want to be more granular and tell your PC exactly which NIC to use when sending packets with certain destination subnet, you can do so by manually adding a route entry like below.

C:> ROUTE ADD 192.168.X.0 MASK 192.168.X.1

Description: route ADD “network” MASK “subnet mask”  “gateway ip”
What this is saying is anything with destination IP in 192.168.X.0 subnet send it to gateway 192.168.X.1
With this setup you should have no issues reaching your Corp-Network/Internet as well as the network simultaneously.
Posted by Freeman On 10:33 PM 1 comments
Stumble ThisFav This With TechnoratiAdd To Del.icio.usDigg ThisAdd To RedditAdd To FacebookAdd To Yahoo

Blog Archive

Related Posts with Thumbnails


HTML hit counter - Quick-counter.net
Copyright 2009 - tips .. come on in. Protected by Copyscape plagiarism checker - duplicate content and unique article detection software. Designed by Gaganpreet Singh