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
    • 最新
    • 标签
主页 / server / 问题 / 441367
Accepted
Eric Leschinski
Eric Leschinski
Asked: 2012-10-24 06:17:01 +0800 CST2012-10-24 06:17:01 +0800 CST 2012-10-24 06:17:01 +0800 CST

Fedora 17 ifconfig eth0 返回错误信息,为什么linux把eth0改成了em1?

  • 772

我全新安装了 Fedora 17,64 位。一切正常,当我插入互联网电缆时,它会自动连接到互联网。

所以当我发出这个命令时我有点困惑:

el@defiant ~ $ ifconfig eth0

我得到了错误:

eth0: error fetching interface information: Device not found

未找到设备?这是ifconfig:

ifconfig

我明白了:

em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.102  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 fe80::ea40:f2ff:fee1:58c  prefixlen 64  scopeid 0x20<link>
    ether e8:40:f2:e1:05:8c  txqueuelen 1000  (Ethernet)
    RX packets 44753  bytes 51284267 (48.9 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 34222  bytes 4294174 (4.0 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 20  memory 0xf7d00000-f7d20000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 16436
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 0  (Local Loopback)
    RX packets 5152  bytes 1263744 (1.2 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 5152  bytes 1263744 (1.2 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

因此,似乎有人将旧版更改eth0为em1自早期版本的 Fedora(Fedora 8 是我所知道的最后一个使用的版本eth0)。如果我执行命令: ifconfig em1那么我会得到类似于旧的ifconfig eth0. 但是为什么要改名字呢?

我的问题是为什么eth0更改为以及fromem1到底是什么意思?emem1

linux
  • 2 2 个回答
  • 4828 Views

2 个回答

  • Voted
  1. Best Answer
    Michael Hampton
    2012-10-24T06:21:28+08:002012-10-24T06:21:28+08:00

    它是一致的网络设备命名。

    具有多个网络端口的系统,尤其是服务器,以不确定的顺序命名端口 ethX,因此对系统管理员没有用处。

    然后系统管理员可以使用 BIOS 提供的名称,这些名称是一致的,而不是任意命名的,用于他们的网络端口。这消除了非确定性命名带来的混乱,并消除了使用基于 MAC 地址的硬编码端口重命名,a) 活泼且容易出错,b) 将状态引入否则为无状态的系统。

    此更改会影响大多数台式机、笔记本电脑和服务器级系统。

    这em意味着接口em嵌入到主板上。其他名称适用于附加卡:p#p#名称指的是 PCI(及其现代衍生物)扩展卡,其中第一个数字是它们插入的主板上的插槽,第二个数字是卡上的端口(a卡可能包含多个端口),第三个数字(如果存在)是一个虚拟功能编号。

    如果它真的困扰您,您可以将界面重命名为您想要的任何名称。

    • 5
  2. Eric Leschinski
    2012-10-24T06:36:51+08:002012-10-24T06:36:51+08:00

    Fedora 15 通过采用名为Consistent Network Device Naming.

    只要系统只有一个以太网端口,旧的 ethX 命名方案就可以正常工作。

    但是,如果有多个以太网端口,则每次系统启动时都会出现一种竞争条件,并且端口可能会以任意顺序获得它们的名称。名称将被任意分配。这在个人计算机中通常不是问题,因为只有一个端口。然而,一些服务器有多个以太网端口,这种命名方案在这种情况下会产生问题。

    新的命名方案如下:

    em[1-N] for on-board (embedded) NICs (# matches chassis labels)
    
    pci<slot>#<port> for cards in PCI slots, port 1..N
    
    NPAR & SR-IOV devices add a suffix of _<vf>, from 0..N depending on the 
        number of Partitions or Virtual Functions exposed on each port.
    
    Other Linux conventions, such as .<vlan> and :<alias> suffixes remain 
        unchanged and are still applicable.
    

    新的命名方案无疑比 ethX 方案更复杂。但这对大多数个人计算机没有任何影响,因为它们通常只有一个以太网端口。此更改不会影响无线和 USB 设备。

    照明链接:

    以太网设备命名变更,茶杯里的风暴:

    http://digitizor.com/2011/01/25/fedora-15-network-device-naming/

    http://docs.fedoraproject.org/zh-CN/Fedora/16/html/System_Administrators_Guide/appe-Consistent_Network_Device_Naming.html

    http://arachnoid.com/linux/network_names/index.html

    • 0

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

Sidebar

Stats

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

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve