設置網卡混雜模式


方法一:

[html] view plaincopy在CODE上查看代碼片派生到我的代碼片
  1. ~$ sudo ifconfig eth1 promisc   # 設置混雜模式  
  2. ~$ sudo ifconfig eth1 -promisc  


方法二:

[html] view plaincopy在CODE上查看代碼片派生到我的代碼片
  1. ~$ sudo ip link set eth1 promisc on  
  2. ~$ sudo ip link set eth1 promisc off  

注意:上面兩種方法系統重啓之後混雜模式會失效



永久設置混雜模式

方法一:加入 /etc/rc.local

[html] view plaincopy在CODE上查看代碼片派生到我的代碼片
  1. ifconfig eth1 promisc  
or

[html] view plaincopy在CODE上查看代碼片派生到我的代碼片
  1. ip link set eth1 promisc on  


方法二:/etc/network/interfaces

[html] view plaincopy在CODE上查看代碼片派生到我的代碼片
  1. iface eth1 inet manual  
  2.   up ifconfig eth1 0.0.0.0 up  

發佈了16 篇原創文章 · 獲贊 2 · 訪問量 13萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章