Find the answer to your Linux question:
Results 1 to 4 of 4
Please help! I have two ethernet interface (eth0 and eth1) on my server system and I have two linux client system. These three systems are inter connected through a switch. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3

    Only one of the two ethernet interface is used


    Please help!

    I have two ethernet interface (eth0 and eth1) on my server system and I have two linux client system. These three systems are inter connected through a switch. To dedicate one ethernet interface of the server to each of the client for better performance, I have configured them statically as shown below:

    Server:
    eth0 inet addr:192.168.221.1 Bcast:192.168.221.255 Mask:255.255.255.0
    eth1 inet addr:192.168.231.1 Bcast:192.168.231.255 Mask:255.255.255.0

    Client1:
    eth0 inet addr:192.168.221.2 Bcast:192.168.221.255 Mask:255.255.255.0

    Client2:
    eth0 inet addr:192.168.231.2 Bcast:192.168.231.255 Mask:255.255.255.0

    Ping and file transfer works fine. When I use Client2 to copy file from Server, eth1 of Server is used. However when I use Client1, to copy file from Server, eth1 of Server is used and not eth0. The same happens (only eth1 of server is used) when I copy file simultaneously from Client1 and Client2 thus eth1 is the bottleneck and I get only one ethernet interface performance.

    Below is the ifconfig output of the server eth0 and eth1 before and after I copy 2G files simultaneously totaling 4G from each of the two clients:

    Before:
    eth0: RX bytes:14776137955 (13.7 GiB) TX bytes:381798147 (364.1 MiB)
    eth1: RX bytes:20943165129 (19.5 GiB) TX bytes:383402896 (365.6 MiB)

    After:
    eth0: RX bytes:14776146890 (13.7 GiB) TX bytes:396688679 (378.3 MiB)
    eth1: RX bytes:25083190376 (23.3 GiB) TX bytes:440061868 (419.6 MiB)

    Looking, only eth1 of the server is used to transfer 4G.

    I do not want to do bonding and I want to dedicate eth0 of the interface on the server to Client1 and dedicate eth1 of the interface on the server to Client2. Please help me configure on this.

    Thanks for any help from experts on this.

    Jeff

  2. #2
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3
    Below is what is found so far

    >> Server:
    >> eth0 inet addr:192.168.221.1 Bcast:192.168.221.255 Mask:255.255.255.0
    >> eth1 inet addr:192.168.231.1 Bcast:192.168.231.255 Mask:255.255.255.0

    >> Client1:
    >> eth0 inet addr:192.168.221.2 Bcast:192.168.221.255 Mask:255.255.255.0

    >> Client2:
    >> eth0 inet addr:192.168.231.2 Bcast:192.168.231.255 Mask:255.255.255.0

    Doing arp -a on Client1, eth0 of Client1 point to 192.168.231.1, which is eth1 of Server.
    Doing arp -a on Client2, eth0 of Client2 point to 192.168.231.1, which is eth1 of Server.

    This explains why eth1 of Server is used from both Client1 and Client2.
    However if after a reboot of the server, some times it is noticed that arp shows the correct connection which is Client1 eth0 points to 192.168.221.1 and Client2 eth0 points to 192.168.231.1. When this happen, copying file takes the right path and the performance is good as both eth0 and eth1 of Server is used.

    Is there something on ip route tables or some other place I need to configure correct? I am new to networking and any suggestions is welcome.

    Thanks
    Jeff

  3. #3
    Just Joined!
    Join Date
    Jun 2011
    Posts
    3
    With further findings, with the below settings look like the issue has been resolved:

    echo 1 > /proc/sys/net/ipv4/conf/all/arp_ignore
    echo 2 > /proc/sys/net/ipv4/conf/all/arp_announce

    To modify this permanently, add them to the /etc/sysclt.conf file. The above is for
    Linux 2.6.x. For 2.4 or 2.2, the interface to set them are different.

    The above settings will make sure that the corresponding eth interface will respond to the arp query. If the above settings are not done (which is the default), any eth interface can respond to an arp query.

    The issue or the limitation I was facing is called ARP Flux. Below are few excellent technical articles and discussion on this issue:

    http @ wiki.openvz.org/Multiple_network_interfaces_and_ARP_flux
    http @ linux-ip.net/linux-ip.pdf
    http @ kerneltrap.org/mailarchive/linux-netdev/2010/4/12/6274489/thread

    The best authoritative place to look for more details is Documentation/networking/ip-sysctl.txt located in your kernel source folder.

    Also a search for (ARP AND Flux) on your favorite search engine will yield many results.

    Thanks
    Jeff

  4. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    586
    Quote Originally Posted by jeffhaltter View Post
    Below is what is found so far

    >> Server:
    >> eth0 inet addr:192.168.221.1 Bcast:192.168.221.255 Mask:255.255.255.0
    >> eth1 inet addr:192.168.231.1 Bcast:192.168.231.255 Mask:255.255.255.0

    >> Client1:
    >> eth0 inet addr:192.168.221.2 Bcast:192.168.221.255 Mask:255.255.255.0

    >> Client2:
    >> eth0 inet addr:192.168.231.2 Bcast:192.168.231.255 Mask:255.255.255.0

    Doing arp -a on Client1, eth0 of Client1 point to 192.168.231.1, which is eth1 of Server.
    Doing arp -a on Client2, eth0 of Client2 point to 192.168.231.1, which is eth1 of Server.

    This explains why eth1 of Server is used from both Client1 and Client2.
    However if after a reboot of the server, some times it is noticed that arp shows the correct connection which is Client1 eth0 points to 192.168.221.1 and Client2 eth0 points to 192.168.231.1. When this happen, copying file takes the right path and the performance is good as both eth0 and eth1 of Server is used.

    Is there something on ip route tables or some other place I need to configure correct? I am new to networking and any suggestions is welcome.

    Thanks
    Jeff
    Your are attempting to put two subnetworks on the same switch. A router needs to connect those networks. Your networking would work with each having its own switch. But you will need to make sure that the server's daemons are listing on both NICs.

Posting Permissions

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