1

One of my testing script is eth0 status related, when eth0 goes down(cable unplugged), the script exit, and i need to unplug and plug cable many times due to test needs.

is there anyway can fake linux the eth0 still 'up' even cable is unplugged? sort of Cisco 'no-keepalive' command?

Thank you.

K. C
  • 163
  • 1
  • 1
  • 5
  • How about hooking a (dumb) switch between the host and the network? Then you can disconnect the cable on the other side of that switch. The host won't lose the link, but it will experience 100% packet loss. – kasperd Sep 14 '14 at 12:20
  • @kasperd, thanks, this is a good solution for normal stream. However, if that eth0 works in promiscuous mode and purpose for receiving mirrored data from other source, a (dumb)switch won't work :-( – K. C Sep 15 '14 at 03:56
  • Then why are you asking for a setting that could make your script think the link is still up when the cable is physically unplugged? – kasperd Sep 15 '14 at 06:09

0 Answers0