zoukankan      html  css  js  c++  java
  • Linux下网卡混杂模式设置和取消

    工作中发现一个网卡工作状态不对了,查看了一下,发现这个网卡和正常工作的网卡  信息不一样,它显示的居然是混杂模式,而正常工作的是  running 模式 ,所以来了解下混杂模式怎么取消...

    下文来自  linux社区

    Linux下网卡混杂模式设置和取消

    [日期:2016-07-04] 来源:Linux社区  作者:molewan [字体:  ]
     
    1、Linux下网卡常用的几种模式说明:

    广播方式:该模式下的网卡能够接收网络中的广播信息。
    组播方式:设置在该模式下的网卡能够接收组播数据。
    直接方式:在这种模式下,只有目的网卡才能接收该数据。
    混杂模式:在这种模式下的网卡能够接收一切通过它的数据,而不管该数据是否

    2、查看、添加和取消混杂模式
    a、查看网卡模式 
    [root@zabbix ~]# ifconfig -a 
    ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 
            inet 10.203.12.88  netmask 255.255.255.0  broadcast 10.203.12.255 
            inet6 fe80::250:56ff:feb3:2253  prefixlen 64  scopeid 0x20<link> 
            ether 00:50:56:b3:22:53  txqueuelen 1000  (Ethernet) 
            RX packets 2800921171  bytes 2087772292594 (1.8 TiB) 
            RX errors 0  dropped 61583  overruns 0  frame 0 
            TX packets 2328391024  bytes 1651122431491 (1.5 TiB) 
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536 
            inet 127.0.0.1  netmask 255.0.0.0 
            inet6 ::1  prefixlen 128  scopeid 0x10<host> 
            loop  txqueuelen 0  (Local Loopback) 
            RX packets 287928092  bytes 25694088025 (23.9 GiB) 
            RX errors 0  dropped 0  overruns 0  frame 0 
            TX packets 287928092  bytes 25694088025 (23.9 GiB) 
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 
              
    b、添加ens32网卡的混杂模式 
    [root@zabbix ~]# ifconfig ens32 promisc 
    [root@zabbix ~]# ifconfig -a 
    ens32: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500 
            inet 10.203.12.88  netmask 255.255.255.0  broadcast 10.203.12.255 
            inet6 fe80::250:56ff:feb3:2253  prefixlen 64  scopeid 0x20<link> 
            ether 00:50:56:b3:22:53  txqueuelen 1000  (Ethernet) 
            RX packets 2800927421  bytes 2087779226027 (1.8 TiB) 
            RX errors 0  dropped 61585  overruns 0  frame 0 
            TX packets 2328394266  bytes 1651123460792 (1.5 TiB) 
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536 
            inet 127.0.0.1  netmask 255.0.0.0 
            inet6 ::1  prefixlen 128  scopeid 0x10<host> 
            loop  txqueuelen 0  (Local Loopback) 
            RX packets 287929365  bytes 25694221536 (23.9 GiB) 
            RX errors 0  dropped 0  overruns 0  frame 0 
            TX packets 287929365  bytes 25694221536 (23.9 GiB) 
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 
              
    c、除去ens32网卡的混杂模式 
    [root@zabbix ~]# ifconfig ens32 -promisc 
    [root@zabbix ~]# ifconfig -a 
    ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 
            inet 10.203.12.88  netmask 255.255.255.0  broadcast 10.203.12.255 
            inet6 fe80::250:56ff:feb3:2253  prefixlen 64  scopeid 0x20<link> 
            ether 00:50:56:b3:22:53  txqueuelen 1000  (Ethernet) 
            RX packets 2800929338  bytes 2087779370583 (1.8 TiB) 
            RX errors 0  dropped 61607  overruns 0  frame 0 
            TX packets 2328396280  bytes 1651123608090 (1.5 TiB) 
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0 
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536 
            inet 127.0.0.1  netmask 255.0.0.0 
            inet6 ::1  prefixlen 128  scopeid 0x10<host> 
            loop  txqueuelen 0  (Local Loopback) 
            RX packets 287931015  bytes 25694392926 (23.9 GiB) 
            RX errors 0  dropped 0  overruns 0  frame 0 
            TX packets 287931015  bytes 25694392926 (23.9 GiB) 
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    本文永久更新链接地址http://www.linuxidc.com/Linux/2016-07/132890.htm

     
  • 相关阅读:
    mysql 新建的%用户无法本地(localhost)登录
    MySQL Change root Password
    Linux装机环境配置记录
    linux 服务配置(synergy)
    shell特殊字符
    pdf中有道不能够整句划词的解决方法
    shell 注释
    VC AddFilesToProject 不能使用
    CFLoatEdit
    ln 命令
  • 原文地址:https://www.cnblogs.com/the-tops/p/6269808.html
Copyright © 2011-2022 走看看