"ifconfig eth0 down" 或 "ip link set eth0 down" 模拟拔出网线的正确方法是

Is it correct way that "ifconfig eth0 down" or "ip link set eth0 down" to simulate unplugged network cable

我正在努力模拟两个虚拟机之间的网络连接失败场景。 "ifconfig eth0 down" 或 "ip link set eth0 down" 模拟拔出的网线是否正确。有没有没有向下接口的替代方案。

是的,它可以模拟拔掉的网线