Traffic going through single interface.

Discussion in 'Linux Networking' started by Rodrigo A B Freire, Jun 8, 2005.

  1. Hello,

    I have a server with two Tigon3 network cards.

    I want them to have distinct IP addresses, in the same subnet.

    But, the traffic is incoming/outgoing only through one interface card.

    See:

    FO[/etc]#netstat -i
    Kernel Interface table
    Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP
    TX-OVR Flg
    eth1 1500 0 104689 0 0 0 0 0 0
    0 BMRU
    eth2 1500 0 105319 0 0 0 409 0 0
    0 BMRU
    lo 16436 0 39 0 0 0 39 0 0
    0 LRU

    FO[/etc]#netstat -rn
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window
    irtt Iface
    161.148.173.0 10.0.0.3 255.255.255.0 UG 0 0
    0 eth2
    10.0.0.0 0.0.0.0 255.255.240.0 U 0 0
    0 eth2
    10.0.0.0 0.0.0.0 255.255.240.0 U 0 0
    0 eth1
    0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0
    0 eth1
    0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0
    0 eth2


    FO[/etc]#ifconfig
    eth1 Link encap:Ethernet HWaddr 00:0F:1F:6E:DC:5E
    inet addr:10.0.3.245 Bcast:10.0.15.255 Mask:255.255.240.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:105399 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:11616629 (11.0 MiB) TX bytes:0 (0.0 b)
    Interrupt:233

    eth2 Link encap:Ethernet HWaddr 00:0F:1F:6E:DC:5F
    inet addr:10.0.3.250 Bcast:10.0.15.255 Mask:255.255.240.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:106073 errors:0 dropped:0 overruns:0 frame:0
    TX packets:445 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:11674467 (11.1 MiB) TX bytes:53389 (52.1 KiB)
    Interrupt:50

    Any suggestions? Debian 3.0, Kernel 2.6.11.10, SMP.

    Rod.
     
    Rodrigo A B Freire, Jun 8, 2005
    #1
    1. Advertisements

  2. Rodrigo A B Freire

    Unruh Guest

    Yes. Traffic goes through the interface that the routing table tells the
    system to send traffic through.
    What are you trying to do? If you want load sharing, then the system is not
    set up to do that.
    Only the last default route is operative. Remove one or the other of these.
    Similarly only one of the specific routes is operative.

    Again what did you think you wanted to do?



     
    Unruh, Jun 8, 2005
    #2
    1. Advertisements

  3. Unruh,
    Yes, I wanted kind of load balance the traffic between the interfaces.

    I've set a round-robin in the DNS table, the machine has two squid
    instances running and, of course, each instance is bonded to a IP
    address.
     
    Rodrigo A B Freire, Jun 8, 2005
    #3
  4. What are using for this load balancing?
     
    Raqueeb Hassan, Jun 9, 2005
    #4
  5. Raqueeb,
    A few background.

    Squid isn't a multi-threaded process, so it can't take advantage of a
    SMP system.
    The solution that I've found: Run two squid processes in the machine,
    each one bond to a different IP address.

    The 'load balancing' is provided by the round-robin in the DNS (each
    resolution points to a different IP address).

    I also wanted to distribute the load between the two NICs of the
    machine. But, the problem is, ALL the traffic is going through a single
    interface. And I ask the group members: what can I do to each interface
    handle its IP address?

    Rod.
     
    Rodrigo A B Freire, Jun 9, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.