Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi all, Can anyone tell me the solution for the network server installation. In our project work, we will have two servers in the LAN. Each server will have two ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85

    Unhappy Server two ethernet cards


    Hi all, Can anyone tell me the solution for the network server installation.
    In our project work, we will have two servers in the LAN. Each server will have two Ethernet cards installed in them. Reason for putting two Ethernet cards is that if one of the interface is down, then clients should be able to connect to server using the other interface. But the neither the client nor the server should know the interface that is being used.
    Can anyone please tell me how to achieve this. Is it possible to put same IP Address for the two ethernet cards, is there any option to do this in the linux kernel.
    I need to know this stuff very badly. Thanks in advance

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,356
    Use NIC bonding.

    This is for debian, but principle applies to all linuxes:
    NIC Bonding On Debian Lenny | HowtoForge - Linux Howtos and Tutorials
    You must always face the curtain with a bow.

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,356
    Although, if you look for redundancy, then it might be better to plan for system failure in general.
    Not only NICs can dail, but also ram, raids, etc.

    The exact implementation depends on the services you want to protect,
    but in general a bunch of machines with identical setup is a good start
    You must always face the curtain with a bow.

  4. #4
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85
    I have used the bonding technique for my system. I have created the interface bond0 with IP Address 192.168.174.3. I tried to ping from the client pc to the server, but Im not able to ping to the server. Even Im not able to ping from the server to any PC in the network.
    Following are the settings that I have used for the bond0 interface. Please help if Im missing something.. itz very urgent for my project

    /etc/sysconfig/network-scripts/ifcfg-bond0
    DEVICE=bond0
    IPADDR= 192.168.174.3
    NETMASK=255.255.255.0
    NETWORK= 192.168.174.0
    BROADCAST=192.168.174.255
    ONBOOT=yes
    BOOTPROTO=none
    USERCTL=no


    /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none

    /etc/sysconfig/network-scripts/ifcfg-eth1
    DEVICE=eth1
    USERCTL=no
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none

    In the modprobe.conf I have added the following statements
    alias bond0 bonding
    options bonding mode=5 miimon=100

    Then I have restarted the Servers, once the server is UP I have given the ifconfig command to see the interfaces
    bond0 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4
    inet addr:192.168.174.3 Bcast:192.168.174.255 Mask:255.255.252.0
    UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:44 errors:0 dropped:0 overruns:1 carrier:0
    collisions:0 txqueuelen:0

    eth0 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:44 errors:0 dropped:0 overruns:1 carrier:0
    collisions:0 txqueuelen:100
    Interrupt:10 Base address:0x1080

    eth1 Link encap:Ethernet HWaddr 00:C0:F0:1F:37:B4
    UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:1 carrier:0
    collisions:0 txqueuelen:100
    Interrupt:9 Base address:0x1400


    Im not able to get the IP address for the eth0 and eth1 interfaces.

  5. #5
    Just Joined!
    Join Date
    Nov 2006
    Posts
    9

    Use DNS server

    Yous should use DNS server, which returns ipaddress of machine which is up and you can specify single Domain name for bunch of machines(interfaces). It works just like when you type google.com in browser and browser contacts DNS server, and it returns available IP address for google.com

  6. #6
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85
    I cant use the DNS method, because every system in my should have two ethernet cards. Your method is fine if I have my server with two ethernet cards, I have some devices which will again have the two ethernet cards. These devices are identified by IP Address only. So I want a single method for server and devices. So I have tried for bonding method.

  7. #7
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    630
    Another term for bonding is "bridged". The package for this is "bridge-utils" within "net-misc".

  8. #8
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Your ifcfg files look about right, but that mode=5 you're using requires switch-side configuration, I think. Try mode=2 which is a little less sophisticated, but doesn't require any cooperation from the switch while providing load balancing and redundancy.

  9. #9
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,754
    1) Bridging and bonding are nothing alike.

    2) Mode 5 does not require any special switch support. But mode 1 would be a better place to start with basic troubleshooting.

    3) Why does the OP have the EXACT same MAC as the examples on this page?

    Code:
    bond0     Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4  
              inet addr:XXX.XXX.XXX.YYY  Bcast:XXX.XXX.XXX.255  Mask:255.255.252.0
              UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
              RX packets:7224794 errors:0 dropped:0 overruns:0 frame:0
              TX packets:3286647 errors:1 dropped:0 overruns:1 carrier:0
              collisions:0 txqueuelen:0 
    
    eth0      Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4  
              inet addr:XXX.XXX.XXX.YYY  Bcast:XXX.XXX.XXX.255  Mask:255.255.252.0
              UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
              RX packets:3573025 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1643167 errors:1 dropped:0 overruns:1 carrier:0
              collisions:0 txqueuelen:100 
              Interrupt:10 Base address:0x1080 
    
    eth1      Link encap:Ethernet  HWaddr 00:C0:F0:1F:37:B4  
              inet addr:XXX.XXX.XXX.YYY  Bcast:XXX.XXX.XXX.255  Mask:255.255.252.0
              UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
              RX packets:3651769 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1643480 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:100 
              Interrupt:9 Base address:0x1400

  10. #10
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    664
    Oops, guess I mismapped my memory, thinking of mode 4.

    Mode 1 may be a start for basic troubleshooting of the driver, but is failover only, won't be testing load-balancing (or whether there are any issues with both cards being active in the bond).

    Interesting catch on the MACs. Makes you wonder.....

Page 1 of 2 1 2 LastLast

Posting Permissions

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