我正在通过程序创建网络接口(interface),以便在模拟网络 (NS-3) 和真实 Linux 主机之间建立桥梁。因此,当“桥接”节点在 NS-3 中收到数据包时,真正的 Linux 主机会收到该数据包。
但是当我再次运行该程序时,它无法“删除”或删除网络接口(interface),因为“设备或资源正忙”。
我尝试关闭接口(interface)(ifconfig <myInterface> down
),重新启动网络服务(service networking restart
),尝试使用 tunctl 删除 TAP 接口(interface)(tunctl -d myInterface
),但即使过了几个小时,我仍然没有能够删除或重新使用此接口(interface)。 “设备或资源正忙”。
能否请您解释一下如何删除、删除或重用界面?
最佳答案
您可以使用 sudo ip link delete tap#
删除接口(interface)本身。
关于Ubuntu,删除网络 TAP 接口(interface),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17529345/