美文网首页
ethtool -p 确认网卡

ethtool -p 确认网卡

作者: 卫彬TM | 来源:发表于2019-07-25 15:20 被阅读0次

Linux下经常会遇到这种场景,服务器上多个网卡,我网线连接的是哪一个,对应的ifcfg-ens*配置文件是否正确?很多人不清楚如何处理
1.拔网线
2.ethtool -p eth0/ens0等,右侧网卡等闪烁,的就是对用的配置文件和网卡。

ethtool version 4.15
Usage:
        ethtool DEVNAME Display standard information about device
        ethtool -s|--change DEVNAME     Change generic options
                [ speed %d ]
                [ duplex half|full ]
                [ port tp|aui|bnc|mii|fibre ]
                [ mdix auto|on|off ]
                [ autoneg on|off ]
                [ advertise %x ]
                [ phyad %d ]
                [ xcvr internal|external ]
                [ wol p|u|m|b|a|g|s|d... ]
                [ sopass %x:%x:%x:%x:%x:%x ]
                [ msglvl %d | msglvl type on|off ... ]
        ethtool -a|--show-pause DEVNAME Show pause options
        ethtool -A|--pause DEVNAME      Set pause options
                [ autoneg on|off ]
                [ rx on|off ]
                [ tx on|off ]
        ethtool -c|--show-coalesce DEVNAME      Show coalesce options
        ethtool -C|--coalesce DEVNAME   Set coalesce options
                [adaptive-rx on|off]
                [adaptive-tx on|off]
                [rx-usecs N]
                [rx-frames N]
                [rx-usecs-irq N]
                [rx-frames-irq N]
                [tx-usecs N]
                [tx-frames N]
                [tx-usecs-irq N]
                [tx-frames-irq N]
                [stats-block-usecs N]
                [pkt-rate-low N]
                [rx-usecs-low N]
                [rx-frames-low N]
                [tx-usecs-low N]
                [tx-frames-low N]
                [pkt-rate-high N]
                [rx-usecs-high N]
                [rx-frames-high N]
                [tx-usecs-high N]
                [tx-frames-high N]
                [sample-interval N]
        ethtool -g|--show-ring DEVNAME  Query RX/TX ring parameters
        ethtool -G|--set-ring DEVNAME   Set RX/TX ring parameters
                [ rx N ]
                [ rx-mini N ]
                [ rx-jumbo N ]
                [ tx N ]
        ethtool -k|--show-features|--show-offload DEVNAME       Get state of protocol offload and other features
        ethtool -K|--features|--offload DEVNAME Set protocol offload and other features
                FEATURE on|off ...
        ethtool -i|--driver DEVNAME     Show driver information
        ethtool -d|--register-dump DEVNAME      Do a register dump
                [ raw on|off ]
                [ file FILENAME ]
        ethtool -e|--eeprom-dump DEVNAME        Do a EEPROM dump
                [ raw on|off ]
                [ offset N ]
                [ length N ]
        ethtool -E|--change-eeprom DEVNAME      Change bytes in device EEPROM
                [ magic N ]
                [ offset N ]
                [ length N ]
                [ value N ]
        ethtool -r|--negotiate DEVNAME  Restart N-WAY negotiation
        ethtool -p|--identify DEVNAME   Show visible port identification (e.g. blinking)
               [ TIME-IN-SECONDS ]
        ethtool -t|--test DEVNAME       Execute adapter self test
               [ online | offline | external_lb ]
        ethtool -S|--statistics DEVNAME Show adapter statistics
        ethtool --phy-statistics DEVNAME        Show phy statistics
        ethtool -n|-u|--show-nfc|--show-ntuple DEVNAME  Show Rx network flow classification options or rules
                [ rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 |
                  rule %d ]
        ethtool -N|-U|--config-nfc|--config-ntuple DEVNAME      Configure Rx network flow classification options or rules
                rx-flow-hash tcp4|udp4|ah4|esp4|sctp4|tcp6|udp6|ah6|esp6|sctp6 m|v|t|s|d|f|n|r... |
                flow-type ether|ip4|tcp4|udp4|sctp4|ah4|esp4|ip6|tcp6|udp6|ah6|esp6|sctp6
                        [ src %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
                        [ dst %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
                        [ proto %d [m %x] ]
                        [ src-ip IP-ADDRESS [m IP-ADDRESS] ]
                        [ dst-ip IP-ADDRESS [m IP-ADDRESS] ]
                        [ tos %d [m %x] ]
                        [ tclass %d [m %x] ]
                        [ l4proto %d [m %x] ]
                        [ src-port %d [m %x] ]
                        [ dst-port %d [m %x] ]
                        [ spi %d [m %x] ]
                        [ vlan-etype %x [m %x] ]
                        [ vlan %x [m %x] ]
                        [ user-def %x [m %x] ]
                        [ dst-mac %x:%x:%x:%x:%x:%x [m %x:%x:%x:%x:%x:%x] ]
                        [ action %d ]
                        [ loc %d]] |
                delete %d
        ethtool -T|--show-time-stamping DEVNAME Show time stamping capabilities
        ethtool -x|--show-rxfh-indir|--show-rxfh DEVNAME        Show Rx flow hash indirection table and/or RSS hash key
        ethtool -X|--set-rxfh-indir|--rxfh DEVNAME      Set Rx flow hash indirection table and/or RSS hash key
                [ equal N | weight W0 W1 ... | default ]
                [ hkey %x:%x:%x:%x:%x:.... ]
                [ hfunc FUNC ]
        ethtool -f|--flash DEVNAME      Flash firmware image from the specified file to a region on the device
               FILENAME [ REGION-NUMBER-TO-FLASH ]
        ethtool -P|--show-permaddr DEVNAME      Show permanent hardware address
        ethtool -w|--get-dump DEVNAME   Get dump flag, data
                [ data FILENAME ]
        ethtool -W|--set-dump DEVNAME   Set dump flag of the device
                N
        ethtool -l|--show-channels DEVNAME      Query Channels
        ethtool -L|--set-channels DEVNAME       Set Channels
               [ rx N ]
               [ tx N ]
               [ other N ]
               [ combined N ]
        ethtool --show-priv-flags DEVNAME       Query private flags
        ethtool --set-priv-flags DEVNAME        Set private flags
                FLAG on|off ...
        ethtool -m|--dump-module-eeprom|--module-info DEVNAME   Query/Decode Module EEPROM information and optical diagnostics if available
                [ raw on|off ]
                [ hex on|off ]
                [ offset N ]
                [ length N ]
        ethtool --show-eee DEVNAME      Show EEE settings
        ethtool --set-eee DEVNAME       Set EEE settings
                [ eee on|off ]
                [ advertise %x ]
                [ tx-lpi on|off ]
                [ tx-timer %d ]
        ethtool --set-phy-tunable DEVNAME       Set PHY tunable
                [ downshift on|off [count N] ]
        ethtool --get-phy-tunable DEVNAME       Get PHY tunable
                [ downshift ]
        ethtool --reset DEVNAME Reset components
                [ flags %x ]
                [ mgmt ]
                [ mgmt-shared ]
                [ irq ]
                [ irq-shared ]
                [ dma ]
                [ dma-shared ]
                [ filter ]
                [ filter-shared ]
                [ offload ]
                [ offload-shared ]
                [ mac ]
                [ mac-shared ]
                [ phy ]
                [ phy-shared ]
                [ ram ]
                [ ram-shared ]
                [ ap ]
                [ ap-shared ]
                [ dedicated ]
                [ all ]
        ethtool --show-fec DEVNAME      Show FEC settings
        ethtool --set-fec DEVNAME       Set FEC settings
                [ encoding auto|off|rs|baser ]
        ethtool -h|--help               Show this help
        ethtool --version               Show version number

相关文章

  • ethtool -p 确认网卡

    Linux下经常会遇到这种场景,服务器上多个网卡,我网线连接的是哪一个,对应的ifcfg-ens*配置文件是否正确...

  • linux接口相关命令

    ethtool eth0 查看网卡物理信息ethtool -i eth0 查看网卡驱动信息ethtool -S e...

  • 修改mac出厂地址

    通过ethtool工具修改eeprom值 查看 ethtool -e 网卡名 查看eeprom里面的值 修改 et...

  • Linux命令--ethtool

    ethtool命令 一、 简介   ethtool命令用于获取以太网卡的配置信息,或者修改这些配置。 二、 命...

  • 网卡ifconfig出现drop包

    1、ethtool -S eth0(网卡名)|grep flow查看网卡上是否有因为网卡处理不了而丢包。 2、ca...

  • Linux 笔记 | 查看网卡带宽

    先使用ifconfig命令,查看当前所需ip对应的网卡名; 命令:ethtool eth1(网卡名) 这个就是千兆...

  • ubuntu22.04网络唤醒

    安装 ethtool 2.查看网卡名,使用 ip a 命令,看到自己的IP地址那一行的最后一个就是网卡名,这边显示...

  • linux系统如何查看网卡的带宽大小

    通过ethtool工具可以查看1、先执行ip a命令查看网卡名称。 2、例如我要查看eth0网卡的带宽,只需要执行...

  • Linux性能优化(网络)

    1、mii-tool -v eth0查看物理网卡的协商方式,相关信息 2、ethtool ens33

  • linux 网卡状态命令mii-tool 和 ethtool

    linux下用mii-tool和ethtool 查看网线是否正确连接到网卡输入mii-tool可以查看网线是否连接...

网友评论

      本文标题:ethtool -p 确认网卡

      本文链接:https://www.haomeiwen.com/subject/qeyhrctx.html