Fedora 24 启动时桥接以太网适配器未启动

Fedora 24 启动时桥接以太网适配器未启动

我有一个以太网桥,配置如下:

$ cat /etc/sysconfig/network-scripts/ifcfg-eno1
DEVICE=eno1
TYPE=Ethernet
HWADDR=98:90:96:9D:64:02
ONBOOT=yes
BOOTPROTO=none
NM_CONTROLLED=no
BRIDGE=br0

$ cat /etc/sysconfig/network-scripts/ifcfg-br0 
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
ONBOOT=yes
NM_CONTROLLED=no
DELAY=0
IPADDR=10.167.193.222
NETMASK=255.255.240.0
GATEWAY=10.167.192.1
DNS1=10.167.162.36
DNS2=192.135.82.44
DNS3=192.135.82.60

两个设备在启动时都未启动:

$ ip addr    
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eno1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
        link/ether 98:90:96:9d:64:02 brd ff:ff:ff:ff:ff:ff
    3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
        link/ether 52:54:00:f1:90:98 brd ff:ff:ff:ff:ff:ff
        inet 192.168.124.1/24 brd 192.168.124.255 scope global virbr0
           valid_lft forever preferred_lft forever
    4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc fq_codel master virbr0 state DOWN group default qlen 1000
        link/ether 52:54:00:f1:90:98 brd ff:ff:ff:ff:ff:ff

运行ifup br0 && ifup eno1成功启动设备。

我的配置有什么问题?

答案1

以下解决了我的问题:

BOOTPROTO=static不支持。应更改为BOOTPROTO=none

删除NM_CONTROLLED=no语句并通过 systemctl 启用 NetworkManager。

相关内容