Saya menjalankan CentOS 7. Saya tidak menjalankan NetworkManager, dan saya benar-benar menghapusnya.
Sistem saya seharusnya mendapatkan alamat IPv4 melalui DHCP pada br0
saat boot. Namun, ketika saya masuk, tidak ada alamat.
Konfigurasi saya:
# pwd
/etc/sysconfig/network-scripts
# cat ifcfg-enp5s0
DEVICE=enp5s0
ONBOOT="yes"
BRIDGE=br0
# cat ifcfg-br0
DEVICE=br0
ONBOOT=yes
TYPE=Bridge
BOOTPROTO=dhcp
STP=on
DELAY=0
Perhatikan bahwa saya tidak mengkonfigurasi jembatan ini secara manual; virt-manager
melakukannya ketika saya menambahkan br0
pada dialog ini:
Relevan journalctl --boot | grep '\(\<br0\>\|enp5s0\)'
dan konteks:
Jan 08 21:04:32 jonathon-centos7 kernel: r8169 0000:05:00.0 enp5s0: link down
Jan 08 21:04:32 jonathon-centos7 kernel: IPv6: ADDRCONF(NETDEV_UP): enp5s0: link is not ready
Jan 08 21:04:32 jonathon-centos7 kernel: r8169 0000:05:00.0 enp5s0: link down
Jan 08 21:04:32 jonathon-centos7 kernel: device enp5s0 entered promiscuous mode
Jan 08 21:04:32 jonathon-centos7 network[947]: Bringing up interface enp5s0: [ OK ]
...
Jan 08 21:04:32 jonathon-centos7 network[947]: Bringing up interface br0:
Jan 08 21:04:32 jonathon-centos7 kernel: IPv6: ADDRCONF(NETDEV_UP): br0: link is not ready
...
Jan 08 21:04:34 jonathon-centos7 kernel: r8169 0000:05:00.0 enp5s0: link up
Jan 08 21:04:34 jonathon-centos7 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): enp5s0: link becomes ready
Jan 08 21:04:34 jonathon-centos7 kernel: br0: port 1(enp5s0) entered listening state
Jan 08 21:04:34 jonathon-centos7 kernel: br0: port 1(enp5s0) entered listening state
//// (Note: 2 second delay here, with no other events)
Jan 08 21:04:36 jonathon-centos7 avahi-daemon[957]: Registering new address record for fe80::f66d:4ff:fe3b:c24e on enp5s0.*.
Jan 08 21:04:36 jonathon-centos7 kernel: br0: port 1(enp5s0) entered learning state
///// (Too soon!)
Jan 08 21:04:38 jonathon-centos7 network[947]: Determining IP information for br0... failed; no link present. Check cable?
Jan 08 21:04:38 jonathon-centos7 network[947]: [FAILED]
Jan 08 21:04:38 jonathon-centos7 systemd[1]: network.service: control process exited, code=exited status=1
Jan 08 21:04:38 jonathon-centos7 systemd[1]: Failed to start LSB: Bring up/down networking.
Jan 08 21:04:38 jonathon-centos7 systemd[1]: Unit network.service entered failed state.
...
Jan 08 21:04:38 jonathon-centos7 kernel: br0: topology change detected, propagating
Jan 08 21:04:38 jonathon-centos7 kernel: br0: port 1(enp5s0) entered forwarding state
Jan 08 21:04:38 jonathon-centos7 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): br0: link becomes ready
Jan 08 21:04:39 jonathon-centos7 avahi-daemon[957]: Registering new address record for fe80::f66d:4ff:fe3b:c24e on br0.*.
Jan 08 21:04:41 jonathon-centos7 avahi-daemon[957]: Registering new address record for 2605:a000:1315:8119:f66d:4ff:fe3b:c24e on br0.*.
Jan 08 21:04:41 jonathon-centos7 avahi-daemon[957]: Withdrawing address record for fe80::f66d:4ff:fe3b:c24e on br0.
///// (Here's where I entered `ifup br0`)
Jan 08 22:43:30 jonathon-centos7 dhclient[5009]: DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 6 (xid=0x25f649b7)
Jan 08 22:43:31 jonathon-centos7 dhclient[5009]: DHCPREQUEST on br0 to 255.255.255.255 port 67 (xid=0x25f649b7)
Jan 08 22:43:34 jonathon-centos7 avahi-daemon[957]: Joining mDNS multicast group on interface br0.IPv4 with address 10.0.1.128.
Jan 08 22:43:34 jonathon-centos7 avahi-daemon[957]: New relevant interface br0.IPv4 for mDNS.
Jan 08 22:43:34 jonathon-centos7 avahi-daemon[957]: Registering new address record for 10.0.1.128 on br0.IPv4.
Jan 08 23:43:17 jonathon-centos7 dhclient[5124]: DHCPREQUEST on br0 to 10.0.1.1 port 67 (xid=0x25f649b7)
Setelah sistem melakukan boot, dan saya masuk, saya bisa membuka terminal, dan:
# ifup br0
set forward delay failed: Numerical result out of range
Determining IP information for br0... done.
Dan kemudian saya terhubung ke jaringan saya.
Mengapa saya tidak bisa mendapatkan IP br0
saat boot?
Terkait:
- Jembatan Ethernet dengan dhcp [CentOS form]
Catatan:
brctl showstp br0
menunjukkan bahwa penundaan maju diatur ke 2.00.brctl setfd br0 0
menunjukkan kesalahan yang sama denganifup br0
. Tampaknya virt-manager menentukan tidak validDELAY=0
untukbr0
.- Setelah menemukan entri penting dalam log, tampaknya
systemd
sedang mencoba untuk mendapatkan IPbr0
sebelum memasuki kondisi penerusan. - Saya telah membuka bug 8086 pada bugtracker CentOS.
STP=yes
dari konfigurasi saya memungkinkan saya memenangkan kondisi balapan ini.