Networking Forums

Networking Forums > Network Hardware > Network Routers > Which LAN gets priority?

Reply
Thread Tools Display Modes

Which LAN gets priority?

 
 
Jon Danniken
Guest
Posts: n/a

 
      12-01-2011, 01:33 AM
If a PC has two LAN cards, each connected to a DSL router/modem, which one
does the computer go to for the connection?

The reason I ask:

I currently have a DSL modem connected to my computer via a LAN card
(LAN01). I bought a router to play with (not connected to any WAN), and
when I connect it to another LAN card (LAN02), the internet goes out on the
computer for awhile, before eventually reconnecting back to LAN01.

Even when the internet is working fine on LAN01, any request sent out shows
momentary activity on LAN02.

So I am wondering why the router on LAN02 seems to be affecting the internet
connection on LAN01.

Any ideas appreciated,

Jon


 
Reply With Quote
 
 
 
 
Char Jackson
Guest
Posts: n/a

 
      12-01-2011, 02:52 AM
On Wed, 30 Nov 2011 18:33:49 -0800, "Jon Danniken"
<(E-Mail Removed)> wrote:

>If a PC has two LAN cards, each connected to a DSL router/modem, which one
>does the computer go to for the connection?
>
>The reason I ask:
>
>I currently have a DSL modem connected to my computer via a LAN card
>(LAN01). I bought a router to play with (not connected to any WAN), and
>when I connect it to another LAN card (LAN02), the internet goes out on the
>computer for awhile, before eventually reconnecting back to LAN01.
>
>Even when the internet is working fine on LAN01, any request sent out shows
>momentary activity on LAN02.
>
>So I am wondering why the router on LAN02 seems to be affecting the internet
>connection on LAN01.
>
>Any ideas appreciated,


You don't specifically mention which Operating System you're using, so
I'll assume a recent flavor of Windows.

From a Command Prompt, check the output of "ipconfig /all" and "route
print". The first will show you the local interface IP address and
Gateway IP address of each NIC, among other things, while the second
command will show you the current routing table, including the IP
address of the Default Gateway and the metric of each interface.

Using the output of those two commands, you should see what's
happening.

I have 2 NICs in my main PC that are members of 3 different subnets.
The primary NIC has a single IP address while the secondary NIC has
two IP addresses. I see no slowdowns and no weird traffic activity
regardless of which NIC or which subnet I'm accessing.

 
Reply With Quote
 
Jon Danniken
Guest
Posts: n/a

 
      12-01-2011, 06:27 AM
Char Jackson wrote:
> You don't specifically mention which Operating System you're using, so
> I'll assume a recent flavor of Windows.


Hi Char, sorry, WinXP sp3. The router is an old Linksys BEFSR41 r4.2.

> From a Command Prompt, check the output of "ipconfig /all" and "route
> print". The first will show you the local interface IP address and
> Gateway IP address of each NIC, among other things, while the second
> command will show you the current routing table, including the IP
> address of the Default Gateway and the metric of each interface.
>
> Using the output of those two commands, you should see what's
> happening.


Ah, thanks, I didn't know about the "route" command. Lots of stuff there.

What stands out is the bottom-most line from the "route print" command, the
"Default Gateway" IP. Normally, this is the IP of my main NIC, the NIC
which connects to my DSL modem.

When I plug in the router (with no WAN connected) to a different NIC, the
"Default Gateway" switches to the IP of the NIC that the router is on.
Since the router isn't connected to the internet, the computer has no
internet access.

If I wait a minute and use a browser window to call a website, it will first
come up as unavailable, but after a few tries it will finally work.
Checking the "route print" once more shows that the "Default Gateway" has
once again returned to the IP of the NIC connected to the DSL modem, which
gives the computer internet access.

So what is it in Windows that is changing the Default Gateway for the
computer from the DSL modem to the router?

> I have 2 NICs in my main PC that are members of 3 different subnets.
> The primary NIC has a single IP address while the secondary NIC has
> two IP addresses. I see no slowdowns and no weird traffic activity
> regardless of which NIC or which subnet I'm accessing.


Hopefully I can figure this all out so I can function at that level.

Thanks,

Jon


 
Reply With Quote
 
Char Jackson
Guest
Posts: n/a

 
      12-01-2011, 02:42 PM
On Wed, 30 Nov 2011 23:27:46 -0800, "Jon Danniken"
<(E-Mail Removed)> wrote:

>Char Jackson wrote:
>> You don't specifically mention which Operating System you're using, so
>> I'll assume a recent flavor of Windows.

>
>Hi Char, sorry, WinXP sp3. The router is an old Linksys BEFSR41 r4.2.


Cool, thanks. I'm using the same OS, so that makes it easier.

>> From a Command Prompt, check the output of "ipconfig /all" and "route
>> print". The first will show you the local interface IP address and
>> Gateway IP address of each NIC, among other things, while the second
>> command will show you the current routing table, including the IP
>> address of the Default Gateway and the metric of each interface.
>>
>> Using the output of those two commands, you should see what's
>> happening.

>
>Ah, thanks, I didn't know about the "route" command. Lots of stuff there.
>
>What stands out is the bottom-most line from the "route print" command, the
>"Default Gateway" IP. Normally, this is the IP of my main NIC, the NIC
>which connects to my DSL modem.
>
>When I plug in the router (with no WAN connected) to a different NIC, the
>"Default Gateway" switches to the IP of the NIC that the router is on.
>Since the router isn't connected to the internet, the computer has no
>internet access.
>
>If I wait a minute and use a browser window to call a website, it will first
>come up as unavailable, but after a few tries it will finally work.
>Checking the "route print" once more shows that the "Default Gateway" has
>once again returned to the IP of the NIC connected to the DSL modem, which
>gives the computer internet access.
>
>So what is it in Windows that is changing the Default Gateway for the
>computer from the DSL modem to the router?


Take a look in Start - Settings - Network Connections (right-click on
Network Connections so that it opens as a window or locate it in
Control Panel). In the Network Connections window, click on the
Advanced menu and select Advanced Settings. In the dialog that comes
up, see if the new LAN connection is listed as a higher priority than
the old (DSL) LAN connection. If so, you can click the arrow to change
their relative priorities. They'll probably be called Local Area
Connection 1 (and 2 for the second one). You want the DSL connection
to be a higher priority than the other connection.

I think that might give you what you want, but I do a couple more
things here. My second and third network connections don't have a
Default Gateway configured at all, so only traffic that's supposed to
use those interfaces can actually use them. When I want to use either
of those connections I create a specific route by opening a Command
Prompt and using the "route add blah blah" statement. In addition, my
second and third network connections are on different subnets from
each other, and both are different from my primary connection. That's
mostly to help me keep everything straight, but it's not a strict
requirement. The route command will allow you to specify which
interface to use to reach a specific destination, but in your case the
biggest thing seems to be the assignment of the Default Gateway, and I
think the Advanced Settings mentioned above will do that for you.

 
Reply With Quote
 
Jon Danniken
Guest
Posts: n/a

 
      12-02-2011, 02:00 AM
Char Jackson wrote:
> Take a look in Start - Settings - Network Connections (right-click on
> Network Connections so that it opens as a window or locate it in
> Control Panel). In the Network Connections window, click on the
> Advanced menu and select Advanced Settings. In the dialog that comes
> up, see if the new LAN connection is listed as a higher priority than
> the old (DSL) LAN connection. If so, you can click the arrow to change
> their relative priorities. They'll probably be called Local Area
> Connection 1 (and 2 for the second one). You want the DSL connection
> to be a higher priority than the other connection.


Thanks Char, I didn't know about that one. Unfortunately, it doesn't have
an effect on this behavior. When I plug in the router, the "Default
Gateway" stated from "route print" is given as the IP of the router. It is
only after a few attempts to call up a website in a browser that the Default
Gateway changes back to the IP for the DSL modem.

This works for awhile, until I go to whatever page triggers what I suspect
to be a timeout, at which point the Default Gateway changes back to the
router, and I lose connectivity. (my suspicion is that my hosts file is
causing a timeout with something a webpage tries to load, leading the
computer to try to find a connection on the router).

> I think that might give you what you want, but I do a couple more
> things here. My second and third network connections don't have a
> Default Gateway configured at all, so only traffic that's supposed to
> use those interfaces can actually use them.


Okay, that sounds interesting. Maybe all I need to do is to disable a
Default Gateway on the router, but how?

One piece of information I am observing is on the routing table. The first
two lines are the only listings for Destination 0.0.0.0, and both the IP of
the DSL modem and the IP for the router, respecitvely, are listed as the
interface. The other two NICs I have on this computer (neither of which
assume a default gateway) are listed for that Destination:

Network Destination Netmask Gateway Interface
0.0.0.0 0.0.0.0 192.168.72.1 192.168.72.3
0.0.0.0 0.0.0.0 192.168.75.1 192.168.75.100


This listing is present when the Default Gateway given in "route print" is
either the router or the DSL modem.


Thanks,

Jon

When I want to use either
> of those connections I create a specific route by opening a Command
> Prompt and using the "route add blah blah" statement. In addition, my
> second and third network connections are on different subnets from
> each other, and both are different from my primary connection. That's
> mostly to help me keep everything straight, but it's not a strict
> requirement. The route command will allow you to specify which
> interface to use to reach a specific destination, but in your case the
> biggest thing seems to be the assignment of the Default Gateway, and I
> think the Advanced Settings mentioned above will do that for you.



 
Reply With Quote
 
Char Jackson
Guest
Posts: n/a

 
      12-02-2011, 03:13 AM
On Thu, 1 Dec 2011 19:00:15 -0800, "Jon Danniken"
<(E-Mail Removed)> wrote:

>Char Jackson wrote:
>> Take a look in Start - Settings - Network Connections (right-click on
>> Network Connections so that it opens as a window or locate it in
>> Control Panel). In the Network Connections window, click on the
>> Advanced menu and select Advanced Settings. In the dialog that comes
>> up, see if the new LAN connection is listed as a higher priority than
>> the old (DSL) LAN connection. If so, you can click the arrow to change
>> their relative priorities. They'll probably be called Local Area
>> Connection 1 (and 2 for the second one). You want the DSL connection
>> to be a higher priority than the other connection.

>
>Thanks Char, I didn't know about that one. Unfortunately, it doesn't have
>an effect on this behavior. When I plug in the router, the "Default
>Gateway" stated from "route print" is given as the IP of the router. It is
>only after a few attempts to call up a website in a browser that the Default
>Gateway changes back to the IP for the DSL modem.


Ok, I don't remember it working that way here, but it's been a long
time so thanks for the reminder.

I think your best bet is to simply remove the default gateway from the
second adapter. With only one adapter having a default gateway
assigned, Windows will have no choice but to use that address for all
non-local traffic.

>Okay, that sounds interesting. Maybe all I need to do is to disable a
>Default Gateway on the router, but how?


You do it on the XP PC, not the router. Each network adapter on the PC
has its own configuration, usually including a default gateway.

To remove a default gateway from the second adapter, open Network
Connections, then open Properties for Local Connection 2. Open TCP/IP
Properties and select the option to "Use the following IP address:.
Enter an appropriate IP address and Netmask. Leave the Default Gateway
field blank. Optionally, leave DNS set to Automatic or "Use the
Following..." and either enter the IP of a valid DNS server or simply
leave it blank since you'll only be using this adapter to access a
locally attached device by its IP address, so DNS isn't required.

Let me know how it goes.

 
Reply With Quote
 
Jon Danniken
Guest
Posts: n/a

 
      12-02-2011, 05:25 AM
Char Jackson wrote:
>
> You do it on the XP PC, not the router. Each network adapter on the PC
> has its own configuration, usually including a default gateway.
>
> To remove a default gateway from the second adapter, open Network
> Connections, then open Properties for Local Connection 2. Open TCP/IP
> Properties and select the option to "Use the following IP address:.
> Enter an appropriate IP address and Netmask. Leave the Default Gateway
> field blank. Optionally, leave DNS set to Automatic or "Use the
> Following..." and either enter the IP of a valid DNS server or simply
> leave it blank since you'll only be using this adapter to access a
> locally attached device by its IP address, so DNS isn't required.
>
> Let me know how it goes.


Perfect! Thanks Char, that fixed this issue.

This does bring up another question, probably involving subnets (which I
cannot seem to wrap my head around).

The IP of the router (set in the router itself as "Local IP Address"), is
set to 192.168.75.1. Additionally, when I want to view the configuration
page for the router, I go to 192.168.75.1.

But in order for the NIC to connect to the router, the NIC has to be set to
192.168.75.100. If I set the NIC to 192.168.75.1, it won't connect to the
router.

What gives?

Thanks again for your help,

Jon


 
Reply With Quote
 
Char Jackson
Guest
Posts: n/a

 
      12-02-2011, 07:03 PM
On Thu, 1 Dec 2011 22:25:38 -0800, "Jon Danniken"
<(E-Mail Removed)> wrote:

>Char Jackson wrote:
>>
>> You do it on the XP PC, not the router. Each network adapter on the PC
>> has its own configuration, usually including a default gateway.
>>
>> To remove a default gateway from the second adapter, open Network
>> Connections, then open Properties for Local Connection 2. Open TCP/IP
>> Properties and select the option to "Use the following IP address:.
>> Enter an appropriate IP address and Netmask. Leave the Default Gateway
>> field blank. Optionally, leave DNS set to Automatic or "Use the
>> Following..." and either enter the IP of a valid DNS server or simply
>> leave it blank since you'll only be using this adapter to access a
>> locally attached device by its IP address, so DNS isn't required.
>>
>> Let me know how it goes.

>
>Perfect! Thanks Char, that fixed this issue.


Excellent, thanks for confirming.

>This does bring up another question, probably involving subnets (which I
>cannot seem to wrap my head around).
>
>The IP of the router (set in the router itself as "Local IP Address"), is
>set to 192.168.75.1. Additionally, when I want to view the configuration
>page for the router, I go to 192.168.75.1.
>
>But in order for the NIC to connect to the router, the NIC has to be set to
>192.168.75.100. If I set the NIC to 192.168.75.1, it won't connect to the
>router.
>
>What gives?


Generally, an IP address can only be assigned to one adapter in a
given network. If two adapters are given the same address, a conflict
occurs. It's sort of like giving your house the same number as the
guy's house down the street and the mail carrier doesn't know where to
deliver the mail. Every address needs to be unique.

In the case above, the router's LAN IP is 192.168.75.1 (and the
Netmask is assumed to be 255.255.255.0), so the other valid IP's on
that network are 192.168.75.2 thru 192.168.75.254. Generally, every
network also has two reserved addresses, which in this case are
192.168.75.0 (which refers to the network itself) and 192.168.75.255
(which is the broadcast address for that network).

So if you have a device with an address of 192.168.75.1, it makes
sense that you can't assign that same address to a second device on
that network and expect it to work. In your example above,
192.168.75.100 is a valid IP address for that network and it will
enable you to talk to the router, but any address between 192.168.75.2
thru 192.168.75.254 will work just as well because they all lie within
the Netmask.

>Thanks again for your help,


No problem, I'm glad you made serious progress.

 
Reply With Quote
 
Char Jackson
Guest
Posts: n/a

 
      12-03-2011, 02:38 AM
On Thu, 1 Dec 2011 22:25:38 -0800, "Jon Danniken"
<(E-Mail Removed)> wrote:

>This does bring up another question, probably involving subnets (which I
>cannot seem to wrap my head around).
>
>The IP of the router (set in the router itself as "Local IP Address"), is
>set to 192.168.75.1. Additionally, when I want to view the configuration
>page for the router, I go to 192.168.75.1.
>
>But in order for the NIC to connect to the router, the NIC has to be set to
>192.168.75.100. If I set the NIC to 192.168.75.1, it won't connect to the
>router.
>
>What gives?


Keep in mind that you don't necessarily need multiple NICs to join
multiple networks. You can assign multiple IP addresses to a single
NIC and the OS will automatically use the correct source IP for the
network you're attempting to access. That comes in handy when you want
to be able to access more networks (I mean access directly, not via a
router) than the number of NICs that are available.

 
Reply With Quote
 
Jon Danniken
Guest
Posts: n/a

 
      12-03-2011, 06:55 PM
Char Jackson wrote:
> Generally, an IP address can only be assigned to one adapter in a
> given network. If two adapters are given the same address, a conflict
> occurs. It's sort of like giving your house the same number as the
> guy's house down the street and the mail carrier doesn't know where to
> deliver the mail. Every address needs to be unique.
>
> In the case above, the router's LAN IP is 192.168.75.1 (and the
> Netmask is assumed to be 255.255.255.0), so the other valid IP's on
> that network are 192.168.75.2 thru 192.168.75.254. Generally, every
> network also has two reserved addresses, which in this case are
> 192.168.75.0 (which refers to the network itself) and 192.168.75.255
> (which is the broadcast address for that network).
>
> So if you have a device with an address of 192.168.75.1, it makes
> sense that you can't assign that same address to a second device on
> that network and expect it to work. In your example above,
> 192.168.75.100 is a valid IP address for that network and it will
> enable you to talk to the router, but any address between 192.168.75.2
> thru 192.168.75.254 will work just as well because they all lie within
> the Netmask.


Thanks Char, that makes sense now. Just for fun I changed the static IP of
the NIC from 192.168.75.100 to 192.168.7550, and it still worked, which was
a good confirmation of the concept.

>> Thanks again for your help,

>
> No problem, I'm glad you made serious progress.


Indeed I did, and I also learned a lot more in the process, which will come
in handy when I actually hook the router up to the modem.

Jon


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP Priority blink Windows Networking 6 04-07-2009 03:42 AM
Mark skb priority fields Viks Linux Networking 0 05-19-2008 10:34 AM
Set dhcp server priority? MandG Windows Networking 1 03-20-2007 01:56 AM
Remote authentication priority Peter Hucker Windows Networking 2 01-19-2007 07:19 PM
Setting Network Priority DSL-Dave Windows Networking 0 11-20-2004 12:59 AM



1 2 3 4 5 6 7 8 9 10 11