Linux网卡eno,linux – 为什么我的eth0名为eno16777736?

我见过

http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/,它描述了一致/可预测设备命名的基本原理,然后是

the rules by which device names are generated:

* Two character prefixes based on the type of interface:

* en -- ethernet

* sl -- serial line IP (slip)

* wl -- wlan

* ww -- wwan

*

* Type of names:

* b -- BCMA bus core number

* ccw -- CCW bus group name

* o -- on-board device index number

* s[f][d] -- hotplug slot index number

* x -- MAC address

* [P]ps[f][d]

* -- PCI geographical location

* [P]ps[f][u][..][c][i]

* -- USB port number chain

所以,让我说我有设备eno16777736:为什么叫它?这是一张以太网卡,我知道了.但是我怎么能自己回到这个界面的其余部分呢?

我检查了/ sys / class / net / eno16777736,并看到:

eno16777736 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:01.0/net/eno16777736

不知道如何解释这个,或者我是否可以使用此信息来访问eno16777736.

更新

What: /sys/bus/pci/devices/.../acpi_index

Date: July 2010

Contact: Narendra K ,linux-bugs@dell.com

Description:

Reading this attribute will provide the firmware

given instance (ACPI _DSM instance number) of the PCI device.

The attribute will be created only if the firmware has given

an instance number to the PCI device. ACPI _DSM instance number

will be given priority if the system firmware provides SMBIOS

type 41 device type instance also.

确实:

core@localhost /sys/devices/pci0000:00/0000:00:11.0/0000:02:01.0 $find . -type f | xargs grep 1677 2> /dev/null

./net/eno16777736/uevent:INTERFACE=eno16777736

./acpi_index:16777736

此外,要协调ifconfig或ip link的输出和lspci中的设备:

$ifconfig

eno16777736: flags=4163 mtu 1500

inet 10.0.0.37 netmask 255.255.255.0 broadcast 10.0.0.255

inet6 fe80::20c:29ff:fe70:c039 prefixlen 64 scopeid 0x20

inet6 2601:a:7c0:66:20c:29ff:fe70:c039 prefixlen 64 scopeid 0x0

ether 00:0c:29:70:c0:39 txqueuelen 1000 (Ethernet)

RX packets 326 bytes 37358 (36.4 KiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 172 bytes 45999 (44.9 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

device interrupt 19 base 0x2000

注意“设备中断19”.来自lspci -v,它有“IRQ 19”:

02:01.0 Ethernet controller: Advanced Micro Devices,Inc. [AMD] 79c970 [PCnet32 LANCE] (rev 10)

Subsystem: Advanced Micro Devices,Inc. [AMD] PCnet - Fast 79C971

Physical Slot: 33

Flags: bus master,medium devsel,latency 64,IRQ 19

I/O ports at 2000 [size=128]

[virtual] Expansion ROM at fd500000 [disabled] [size=64K]

Kernel driver in use: pcnet32

在这里,您还可以看到“Phyiscal Slot 33”,实际上,有时VMWare会引导获取ens33作为接口名称的VM.所以,目前还不清楚为什么其他时候选择eno16777736.但是16777736来自acpi_index,而33来自PCI插槽.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值