LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-06-2008, 12:52 PM   #1
shinystuffrox
LQ Newbie
 
Registered: Jan 2005
Posts: 25

Rep: Reputation: 15
dual wan questions


I have 2 nics
eth0 is 192.168.1.100 connected to modem0
eth1 is 192.168.254.2 connected to modem1

Azureus, the java bittorent client, has a feature that allows a user to bind azureus traffic to a specific ethernet device.

in azureus I have it set to bind to eth1(i use tcp 6666 and udp 6667 in azureus)...

netstat -an | grep 666:
Code:
netstat -an | grep 6667
tcp        0      0 192.168.1.100:45678     208.100.23.31:6667      ESTABLISHED 
tcp        0     32 192.168.1.100:33468     70.85.129.210:6667      ESTABLISHED 
tcp        0      0 192.168.1.100:48351     85.17.111.117:6667      ESTABLISHED 
tcp        0      0 192.168.1.100:49091     212.178.133.174:6667    ESTABLISHED 
udp        0      0 192.168.254.2:6667      0.0.0.0:*
notice the bottom one where 0.0.0.0 is, that it is indeed bound to eth1, so why is there bittorrent traffic on eth0/1.100?

route produces:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
192.168.254.0   *               255.255.255.0   U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
default         192.168.254.254 0.0.0.0         UG    1      0        0 eth1
--thanks in advance
 
Old 02-07-2008, 08:23 AM   #2
centauricw
Member
 
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
You can really only have one default gateway. A default gateway is used whenever there is no specific route to a remote address in the routing table. In your case, you have chosen to add two default routes (never recommended). The default route for eth0 is listed in the routing table first, so this will be be default route that is actually used. The default route for eth1 will never be used since it is listed in the routing table second. Once the networking stack finds a route through the default route on eth0, it stops looking in the routing table and the default route on eth1 is never found.
 
Old 02-07-2008, 08:35 PM   #3
shinystuffrox
LQ Newbie
 
Registered: Jan 2005
Posts: 25

Original Poster
Rep: Reputation: 15
are you sure it's going through eth0 because it's the first default on the list or because the matric is 0, which means it's a higher priority than eth1 which has a metric of 1. what if I made the metric of both cards the same?
 
Old 02-09-2008, 12:02 AM   #4
centauricw
Member
 
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
Your right about the metric. I didn't notice that. I don't have a dual Internet connection, so I can't say exactly what would happen, but I think if they're the same metric, what I said before about the first one in the routing table should apply.
 
  


Reply

Tags
binding


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual WAN failover kool_kid Linux - Networking 3 07-16-2010 09:26 AM
Useful Dual WAN script Antimatter Linux - Networking 5 06-25-2010 02:08 AM
dual wan linux router basilwt Linux - Networking 5 05-25-2007 08:01 AM
FreeS/Wan Vs. OpenS/Wan Vs. StrongS/Wan bkankur Linux - Security 1 03-01-2005 10:27 AM
Dual WAN Config Problem h8trix Linux - Networking 1 10-03-2004 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration