Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, I have a requirement in my new project, where each system shall have two Ethernet card interfaces(system means hardware devices, servers, clients in other words any device or host ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85

    Unhappy redundant network problem


    Hi, I have a requirement in my new project, where each system shall have two Ethernet card interfaces(system means hardware devices, servers, clients in other words any device or host used in the project). The IP address of each interface will be of different networks. Bcoz if one of the Ethernet interface is down, respective system should take the other interface that is connected to different network.
    In one of the forums, I have understand NIC bonding, but that works fine when all the systems are in the same network, but I want single to switch between networks.
    I have seen for Multi-homing but that requires the BGP enabled router.. which is so costly solution.
    Can anyone give me some solution in Linux to solve my problem, something like tools, application or linux inbuilt configuration/setting to be enabled.
    Please help me it is very urgent to be solved.

    Thanks in advance..

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,601
    Is this a school project, or a work project?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85
    This is project in our company.. before stepping in the actual work.. we have study whether the redundant network is feasible or not.. If itz feasible we have start our development.

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,601
    Ok. Thanks for the clarification. Terms of use on these forums precludes helping with school assignments and projects, other than in the most general way.

    Doing what you want with Linux is easy I think. The key is in the router tables. This isn't NIC bonding. You can add a default gateway for the second NIC to your router tables so that addresses that can't be resolved in one way, will be routed the other way. Personally I haven't tried this, but from the man page for the "route" command, it should work.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Oct 2009
    Posts
    85
    Thanks for the reply, sorry to say that.. my work has got another turn.
    Here we want the two ethernet cards using in every system. While communicating the data with the other people(they also have two cards) in the network. Sender send all the data through the two ethernet cards to provide 200% data, if one fails other can provide 100% data rate.. I can use some iptables or route command as you said. but at the receiving end, I will face packet duplication from the same host. I cant know which packet has to be taken becoz both packets are from the same host. Can iptables can do this stuff.
    Or do you know anyother tool of command in Linux to perform this activity.

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,601
    I know it can be done. I just have never had to do that. Usually when systems have 2 nics it is because they are either bonded to get double throughput, or because the system needs to communicate with systems on 2 separate networks. However, the QNX real-time operating system (QNX Realtime Operating System (RTOS) software, middleware, development tools and services for superior embedded design) supports what you describe as a fundamental characteristic of the operating system - multiple NIC's will be fully, and redundantly, utilized and on the failure of one the system will automatically fallback to using only the other.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,756
    No, what you are trying to do is not realistic. You are not taking into account the client and rest of the network. When the client makes a request, it and the network decide which "NIC" on the server the request goes to. Without addressing the client and the network, you cannot do this.

    You can:

    A) Bond the NIC's on the *same* network and get both increased bandwidth and redundancy if a NIC fails.

    B) Put the NIC's on different networks. One NIC will be offline/unused. A small script could watch the first NIC/network/gateway and if it goes down, make changes to the routing table so that the 2ND NIC is used. At that point. the network and clients will also need to make requests to the other IP address (maybe via a change to DNS.)

  8. #8
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,392
    C) assign different IPs to the NICs on the same network and place a (redundant) loadbalancer in front of it. Then group the IPs on the loadbalancer into a pool.
    EDIT:
    Same network might actually be tricky, as requests would reach the "second" NIC,
    but the IP stack would create answer packages with the IP of the first, thus confusing the client.
    So: two subnets, one nic in each and both reachable by the loadbalancers would be the setup here.



    But from my pov:
    Too much effort for just a nic.
    Any device in your server can crash, so it would be better to have multiple, redundant servers and place loadbalancers in front of them.
    Last edited by Irithori; 11-10-2010 at 03:10 PM.
    You must always face the curtain with a bow.

Posting Permissions

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