我使用以下命令禁用 eth0 接口的多播模式,但我不起作用:
sudo ifconfig eth0 -multicast
当这样做时,eth0 的配置是这样的:
ifconfig -v eth0
eth0 Link encap:Ethernet HWaddr 00:16:3E:E8:43:01
inet addr:10.232.67.1 Bcast:10.232.67.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:46728751 errors:0 dropped:0 overruns:0 frame:0
TX packets:15981372 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8005709841 (7.4 GiB) TX bytes:3372203819 (3.1 GiB)
然后,我在主机 10.232.67.2 中执行 icmp echo_request:
ping 224.0.0.1
并 tcpdump 主机 10.232.67.1 上的包:
tcpdump -i eth0 host 224.0.0.1 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
21:11:03.182813 IP 10.232.67.2 > 224.0.0.1: ICMP echo request, id 3639, seq 324, length 64
21:11:04.184667 IP 10.232.67.2 > 224.0.0.1: ICMP echo request, id 3639, seq 325, length 64
21:11:05.186781 IP 10.232.67.2 > 224.0.0.1: ICMP echo request, id 3639, seq 326, length 64
那么,如何禁用多播模式?
顺便说一句,当我禁用广播时:
sudo ifconfig eth0 -broadcast
错误信息是:
警告:接口 eth0 仍处于广播模式。
那么,为什么不能停止广播模式?