LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-14-2005, 08:49 PM   #1
TBKDan
Member
 
Registered: Dec 2005
Location: NY, USA
Distribution: Ubuntu
Posts: 44

Rep: Reputation: 16
Debian Woody weird network issue w/2 NIC


First off, I want to point out that I am pretty new to linux.. I can find my way around but some specifics are a little blurry. Now, with that said, onto the problem. I recently migrated my Windows gameserver over to Debian linux, since a test run of it ran MUCH better than Windows. After getting everything setup, it seemed to be running pretty well. Recently I've been noticing some weird lag issues, but didn't get to look into the server as much as I would have liked. While I was checking into another problem, I noticed something strange in ifconfig:
Code:
eth0      Link encap:Ethernet  HWaddr xxx
          inet addr:xxx  Bcast:xxx  Mask:255.255.255.128
          inet6 addr: xxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2428157 errors:0 dropped:0 overruns:242 frame:0
          TX packets:2629440 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:237436666 (226.4 MiB)  TX bytes:398740965 (380.2 MiB)
          Interrupt:177 Base address:0xc000

eth1      Link encap:Ethernet  HWaddr xxx
          inet addr:xxx  Bcast:xxx  Mask:255.255.255.128
          inet6 addr: xxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8851 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1089968 (1.0 MiB)  TX bytes:1062 (1.0 KiB)
          Interrupt:185 Base address:0xc400
Albeit this is just after a server restart, you can still catch the drift of the problem: receiving traffic is fine (the gameservers get all the traffic incoming onto the correct IP's) but outgoing traffic is ALL going through eth0! I uninstalled firestarter and tried to flush the iptables, but that did nothing. I looked around at several different iptables scripts, but they were almost all directed at NAT or masquerading, as this seems to be a common issue. But I have two cards, no NAT at all. I just want to allow a few ports to both cards and have them transmit on their respective cards! Can anyone help me out on this? I'm really quite stumped at this point as to why it's transmitting only on eth0.

Last edited by TBKDan; 12-14-2005 at 09:16 PM.
 
Old 12-15-2005, 04:10 AM   #2
dylants
Member
 
Registered: Oct 2003
Location: Bath UK
Distribution: RedHat 7,9 RHEL 2.1-4 Suse 9.1, 9.2, Ubuntu, Centos 3-4, Fedora 3-5
Posts: 44

Rep: Reputation: 15
Hi TBKDan,

can you dump your routing table (try route -n at the command line)

Dylan
 
Old 12-15-2005, 08:15 AM   #3
TBKDan
Member
 
Registered: Dec 2005
Location: NY, USA
Distribution: Ubuntu
Posts: 44

Original Poster
Rep: Reputation: 16
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
129.21.112.0    0.0.0.0         255.255.255.128 U     0      0        0 eth0
129.21.112.0    0.0.0.0         255.255.255.128 U     0      0        0 eth1
129.21.112.0    0.0.0.0         255.255.255.128 U     0      0        0 eth2
0.0.0.0         129.21.112.126  0.0.0.0         UG    0      0        0 eth0
*yawns and then runs to take a shower to make class*
 
Old 12-15-2005, 08:23 AM   #4
dylants
Member
 
Registered: Oct 2003
Location: Bath UK
Distribution: RedHat 7,9 RHEL 2.1-4 Suse 9.1, 9.2, Ubuntu, Centos 3-4, Fedora 3-5
Posts: 44

Rep: Reputation: 15
Hi TBKDan,

The routing table tells me that your default route is out through eth0 via the gateway 129.21.112.126.

This means that all traffic not for the local network will be sent out through eth0, regardless of which interface it came in on, unless you can find a way to bind a process to a specific interface.



It also looks to me like all three of your network interfaces are on the same network - is there any reason for this?

Dylan
 
Old 12-15-2005, 08:35 AM   #5
TBKDan
Member
 
Registered: Dec 2005
Location: NY, USA
Distribution: Ubuntu
Posts: 44

Original Poster
Rep: Reputation: 16
Yeah, I was just looking at it now that I woke up and saw that it was all going through eth0. I'm on a college network and the more network cards, the more bandwidth Is there any way I can get it to receive and send on their respective interfaces?
 
Old 12-15-2005, 08:48 AM   #6
dylants
Member
 
Registered: Oct 2003
Location: Bath UK
Distribution: RedHat 7,9 RHEL 2.1-4 Suse 9.1, 9.2, Ubuntu, Centos 3-4, Fedora 3-5
Posts: 44

Rep: Reputation: 15
Am I right in thinking you're in college accomodation, and you've plugged all three network interfaces into an ethernet switch that is plugged into a single wall port for the college network? Or do you have multiple wall ports in your room?
If the former is the case then the bandwidth will be limited to that supplied to the wall port (I'd estimate that at 100Mb/s).
Also worth knowing is the speed of the backbone in the switch (if you have one), and what is the speed of the link that the college supplies to your building?

Usually the way to achieve more bandwidth is to bond (or aggregate) multiple interfaces together - but that has to be done at both ends, and I doubt the IT staff at the college will agree to bonding, or even if your network cards will support it! (usually an advanced feature).

Also worth asking is - can your pc handle the bandwidth? A lot of machines don't utilise all the bandwidth simply because either the server or client of the ethernet link is slower than the network.

Have you checked your network traffic to see if you're even using what you've got? Try running MRTG or Cacti and look at the graphs to see how busy your network interfaces are.

If you've got a 100-Base-Tx card then that is usually enough for all but the most powerful servers.

Saying all that, there may be a project for load balancing network traffic available for linux - try freshmeat or sourceforge.

HTH

Dylan
 
Old 12-15-2005, 09:10 AM   #7
TBKDan
Member
 
Registered: Dec 2005
Location: NY, USA
Distribution: Ubuntu
Posts: 44

Original Poster
Rep: Reputation: 16
My college, although it has assloads of bandwidth, only gives roughly 100kb/s per IP, hence why I have the multiple NIC. I'm nowhere near the card nor switches capacity (12 port into one wall jack), but I'm probably pushing the limit that the school allows me I need to get out of the residence halls... WiFi and other places I've uploaded at 3mb/s lol. But that's why I have so many NIC though. Mainly two are used at this time, used to be more but I changed things around.
 
Old 12-15-2005, 10:59 AM   #8
TBKDan
Member
 
Registered: Dec 2005
Location: NY, USA
Distribution: Ubuntu
Posts: 44

Original Poster
Rep: Reputation: 16
Ok, I understand what is happening (the traffic is coming in on the right addresses, but it is leaving through one because route tells it to. And the fact that they are both connected to the same gateway is probably going to be a bitch So.. are there any ways to tell route to route it so that, say if it came in on eth1 it will leave on eth1?
 
Old 12-15-2005, 02:00 PM   #9
TBKDan
Member
 
Registered: Dec 2005
Location: NY, USA
Distribution: Ubuntu
Posts: 44

Original Poster
Rep: Reputation: 16
Maybe this would be better off being moved to the Networking section? I started out thinking that it was going to be a firewall/iptables issue, now it seems like routing :P

EDIT: I made a new topic in the networking section so it will get the exposure it needs http://www.linuxquestions.org/questi...60#post2001160 Thanks for the help you have given me so far.

Last edited by TBKDan; 12-15-2005 at 04:39 PM.
 
  


Reply



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
Debian Woody slows down when network is down Maidros Debian 4 08-08-2004 07:38 AM
installing nic on Debian woody blakeless Linux - Hardware 0 05-05-2004 06:07 PM
Debian Woody 3.02 wont recognize RealTech8139 NIC - 8139too BillBlalock Linux - Networking 17 03-15-2004 08:23 PM
multiple IP addresses, 1 NIC: debian woody mix_master_mike Linux - Networking 1 01-11-2004 03:19 AM
nforce 2 nic not working in debian woody elpipetuanis Debian 5 12-16-2003 11:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:08 AM.

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