AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 508384
Accepted
Tim
Tim
Asked: 2019-03-25 13:41:16 +0800 CST2019-03-25 13:41:16 +0800 CST 2019-03-25 13:41:16 +0800 CST

`ifconfig` 是否显示了 `ether` 后面的网络接口的 MAC 地址?

  • 772

是否ifconfig显示以下网络接口的 MAC 地址ether?

ether是指以太网吗?Mac地址是什么意思?

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:b1:aa:1f  txqueuelen 1000  (Ethernet)
        RX packets 451  bytes 43572 (43.5 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 108  bytes 28182 (28.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlx8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.97  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 xx:xx:xx  prefixlen 64  scopeid 0x20<link>
        ether 80:1f:02:b5:c3:89  txqueuelen 1000  (Ethernet)
        RX packets 697657  bytes 564556036 (564.5 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 374913  bytes 60332457 (60.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
ifconfig mac-address
  • 2 2 个回答
  • 8025 Views

2 个回答

  • Voted
  1. Stephen Harris
    2019-03-25T14:09:10+08:002019-03-25T14:09:10+08:00

    注意ifconfig报告数据的不同实现方式不同。

    对于 Linux 上常见的 net-tools 版本,这个词ether是硬件类,后面的值是硬件地址。可以使用以下ifconfig hw命令更改这两者:

       hw class address
              Set the hardware address of this interface, if the device driver
              supports  this  operation.   The keyword must be followed by the
              name of the hardware class and the printable ASCII equivalent of
              the  hardware  address.   Hardware  classes  currently supported
              include ether (Ethernet), ax25 (AMPR AX.25), ARCnet  and  netrom
              (AMPR NET/ROM).
    

    对于“以太网”硬件类,地址是卡的 MAC 地址。

    • 3
  2. Best Answer
    Stephen Kitt
    2019-03-25T14:07:36+08:002019-03-25T14:07:36+08:00

    如手册中所述ifconfig,在设置选项部分中,

    如果设备驱动支持该操作,则设置该接口的硬件地址。关键字后面必须跟硬件类的名称和硬件地址的可打印 ASCII 等价物。当前支持的硬件类别包括ether(Ethernet)、ax25(AMPR AX.25)ARCnet和netrom(AMPR NET/ROM)。

    这也解释了输出,即 ifconfig显示接口的当前硬件地址及其硬件类。对于以太网接口,类是ether,硬件地址是 MAC 地址。

    • 2

相关问题

  • 什么是'wlo1'?

  • 链接循环时的 FreeBSD 静态 ARP 条目

  • ifconfig中未显示Mac地址[关闭]

  • 接口状态是否可以在没有分配 IP 地址的情况下处于活动状态?

  • 更新了 GNU/Linux 系统中 ifconfig 的手册页。

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve