例如:
$ifconfig dummy0 up $ifconfig dummy0 "192.168.1.190 netmask 255.255.255.0"
dummy0 Link encap:Ethernet HWaddr b6:1f:f3:92:6d:20 inet addr:192.168.1.190 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::b41f:f3ff:fe92:6d20/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:15 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:1050 (1.0 KiB)
> ifconfig
> ifconfig -a
> ifconfig dummy0
无
rmmod假人
因为虚拟仅用于示例目的.
如果没有办法做到这一点,我可以设置什么“扔掉”的IP并且可以避免任何麻烦?
喜欢
$ifconfig dummy0 down $ifconfig dummy0 0.0.0.0
解决方法
冲洗ip:
root@foo:~# ifconfig dummy0 192.168.55.1 netmask 255.255.255.0 root@foo:~# ifconfig dummy0 dummy0 Link encap:Ethernet HWaddr 5b:72:32:4f:92:c8 inet addr:192.168.55.1 Bcast:192.168.55.255 Mask:255.255.255.0 UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@foo:~# ip address flush dev dummy0 root@foo:~# ifconfig dummy0 down root@foo:~# ifconfig dummy0 dummy0 Link encap:Ethernet HWaddr 5b:72:32:4f:92:c8 BROADCAST NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)