Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Simulating NIC fail


    I have setup bonded interfaces but I'm not at the machine to pull a cable - is there a way I can simulate a failure - I've had a look at ip/ipconfig without anything obvious.
    Thanks
    Elaine

  2. #2
    Quote Originally Posted by cmap16 View Post
    I have setup bonded interfaces but I'm not at the machine to pull a cable - is there a way I can simulate a failure - I've had a look at ip/ipconfig without anything obvious.
    According to Bonding Ethernet Interfaces in Linux , interface bonding is handled by the kernel itself, which means that simulating a failure should be an in-kernel feature, too. While such functionality may be brought in by some options in the Kernel Hacking section of the kernel configuration options (I'd doubt that; no time to check thoroughly though), I wouldn't expect it in production kernel builds. Since you don't have physical access to the machine, I'd suppose that you have little to no possibility to change the kernel anyway, so, unfourtunately, my educated guess is that you will not be able to simulate the failure.

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    4,031
    Itīs a bit crude and also needs network switch configuration:
    If your network there has decent switches, you could shutdown one of the ports.


    Also, I am not exactly sure, (as I havent done NIC bonding for a long time):
    But what happens, if you do this:
    Code:
    ifconfig ethX down
    You must always face the curtain with a bow.

  4. $spacer_open
    $spacer_close
  5. #4
    -->
    hi
    taking it down shows it ok in the logs , thanks.

    Jan 21 14:45:52 server1 kernel: [963487.836994] bonding: bond0: link status definitely down for interface eth0, disabling it
    Jan 21 14:45:52 server1 kernel: [963487.836999] bonding: bond0: making interface eth3 the new active one.
    Jan 21 14:46:40 server1 kernel: [963536.000174] bnx2: eth0 NIC SerDes Link is Up, 1000 Mbps full duplex
    Jan 21 14:46:40 server1 kernel: [963536.016024] bonding: bond0: link status definitely up for interface eth0.

Posting Permissions

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