Find the answer to your Linux question:
Results 1 to 8 of 8
Hi there, I'm new to linux in general, and I've just started using debian as a desktop Os. In my desktop setup I have two network cards on the same ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    10

    behaviour with two network cards


    Hi there, I'm new to linux in general, and I've just started using debian as a desktop Os.
    In my desktop setup I have two network cards on the same subnet (i'm going to be using it as a router with NetEm for my 4rth year project).
    What surprised me was the behavior of these cards. It seems as though one interface handles internal traffic, while the other handles external, internet traffic. AS i mentioned they're on the same subnet so I'm surprised. I've attached a screenshot (outlined in true mspaint style).
    *ttp://i680.photobucket.com/albums/vv167/neilrw/Screenshot-1.png

    Am I just imagining this or is this the default behavior of linux?

  2. #2
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    848
    You've not read the details properly. If you look at the information you will see:

    Code:
    eth0 has:
    
    9595 kb/s up
    204 kb/s down
    Code:
    and eth1(?) has:
    
    2kb/s up
    0kb/s down
    So you can gather from that eth1 (if that's the device name - you drew over it) isn't being used, all your traffic goes through eth0

    I think your confusion is coming from the size of the graphs not being relative.
    Linux User #453176

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    10
    so it is
    is there anyway to split the traffic coming in? either by aggregation or otherwise? i guess the obvious answer is to add a second subnet, but that would mean a lot of hassle in reconfiguration.

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,746

  5. #5
    Linux Newbie framp's Avatar
    Join Date
    Jul 2006
    Location
    Stuttgart, Germany
    Posts
    240
    Quote Originally Posted by Neilrw View Post
    ... In my desktop setup I have two network cards on the same subnet ...
    Are you sure they are on the same subnet? I suspect they are on different subnets: One is you internal subnet and the other one is your external internet connection. It' easy to verify this with the output of
    Code:
    ifconfig
    and
    Code:
    route -n
    .
    "Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect." Linus Benedict Torvalds

  6. #6
    Just Joined!
    Join Date
    Dec 2009
    Posts
    10
    hi there,
    They're both on the 192.168.1.x subnet, with 192.168.1.1 as a default root.
    route -n :
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1
    0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

    I've taken done a short tcpdump (sounds odd to say) from each interface at the same moment whille viewing web pages and watching a film from my smb mount, and while and while eth1 does have more info in it , eth0 is still showing SMB blocks trasnferring.

    Is there a page defining the default behavior of the kernel with dual cards ?

    tcpdump output :
    eth0
    03:44:25.458736 IP Server0.local.microsoft-ds > project.local.46945: P 25553:26009(456) ack 4867 win 64960 <nop,nop,timestamp 60555745 31790453>
    .......SMB2................

    eth1
    03:44:25.518250 IP project.local.43577 > host81-155-247-133.range81-155.btcentralplus.com.40674: . 680841:682249(140 ack 97089 win 1002 <nop,nop,timestamp 31790468 616864839>

  7. #7
    Just Joined!
    Join Date
    Jan 2005
    Posts
    17
    Quote Originally Posted by framp View Post
    Are you sure they are on the same subnet? I suspect they are on different subnets: One is you internal subnet and the other one is your external internet connection. It' easy to verify this with the output of
    Code:
    ifconfig
    and
    Code:
    route -n
    .
    Can you paste the output of "ifconfig' as pointed out by framp?

  8. #8
    Just Joined!
    Join Date
    Dec 2009
    Posts
    10
    eth0 Link encap:Ethernet HWaddr 00:1a:92:2d:8a:e9
    inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::21a:92ff:fe2d:8ae9/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:13540390 errors:0 dropped:0 overruns:0 frame:0
    TX packets:7412977 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:2316019397 (2.1 GiB) TX bytes:612308005 (583.9 MiB)
    Interrupt:19

    eth1 Link encap:Ethernet HWaddr 00:19:66:78:2b:ce
    inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::219:66ff:fe78:2bce/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1608419 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1567679 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1206573774 (1.1 GiB) TX bytes:986784740 (941.0 MiB)
    Interrupt:23

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:88 errors:0 dropped:0 overruns:0 frame:0
    TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:5168 (5.0 KiB) TX bytes:5168 (5.0 KiB)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •