这是求助的呼声。我没有什么希望,但仍然……与主题一样,升级到 20 LTS 后,我的网络坏了。启动时,某些东西会为每个网络接口启动 dhclient,我不知道是谁启动的,也不知道如何禁用它。尝试打开一个错误但自然没人关心
此处详细信息相同:
- 网络由 ifupdown 管理
- 未安装 Netplan
- 网络管理器已禁用(屏蔽)
然而,在启动时,某些东西会为每个网络接口启动 dhclient。这会带来灾难性的后果 - dhcp 请求在作为基于 vlan 的接口基础的物理接口上成功,导致真正的 dhcp 请求在 vlan 接口上失败。
预期行为 - dhclient 仅为标记为 dhcp 的接口启动/etc/network/interfaces
。
任何建议都值得感激。我不知道如何追踪在启动时启动 dhclient 的实体。日志没有显示任何内容。请帮忙。
/etc/network/interfaces 的相关部分(整个文件有一个 dhcp 条目):
auto lo
iface lo inet loopback
# The primary network interface
auto main0
iface main0 inet dhcp
bridge-ports eno1
mtu 1980
auto enp2s0f0
no-auto-down enp2s0f0
iface enp2s0f0 inet static
address 192.168.251.33
netmask 255.255.255.240
mtu 9000
auto eno1
iface eno1 inet manual
mtu 1980
edit2-ip 输出
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
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,UP,LOWER_UP> mtu 1980 qdisc pfifo_fast master main0 state UP group default qlen 1000
link/ether bc:ee:7b:dc:6d:25 brd ff:ff:ff:ff:ff:ff
altname enp0s25
3: enp2s0f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP group default qlen 1000
link/ether 68:05:ca:22:cb:e4 brd ff:ff:ff:ff:ff:ff
inet 192.168.251.33/28 brd 192.168.251.47 scope global enp2s0f0
valid_lft forever preferred_lft forever
inet6 fe80::6a05:caff:fe22:cbe4/64 scope link
valid_lft forever preferred_lft forever
4: enp2s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc pfifo_fast state UP group default qlen 1000
link/ether 68:05:ca:22:cb:e5 brd ff:ff:ff:ff:ff:ff
inet 192.168.251.49/28 brd 192.168.251.63 scope global enp2s0f1
valid_lft forever preferred_lft forever
inet6 fe80::6a05:caff:fe22:cbe5/64 scope link
valid_lft forever preferred_lft forever
5: main0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1980 qdisc noqueue state UP group default qlen 1000
link/ether bc:ee:7b:dc:6d:25 brd ff:ff:ff:ff:ff:ff
inet 192.168.2.230/24 brd 192.168.2.255 scope global dynamic main0
valid_lft 28437sec preferred_lft 28437sec
inet6 fe80::beee:7bff:fedc:6d25/64 scope link
valid_lft forever preferred_lft forever
accounts-daemon.service loaded active running Accounts Service
acpid.service loaded active running ACPI event daemon
apache2.service loaded active running The Apache HTTP Server
atd.service loaded active running Deferred execution scheduler
avahi-daemon.service loaded active running Avahi mDNS/DNS-SD Stack
bluetooth.service loaded active running Bluetooth service
colord.service loaded active running Manage, Install and Generate Color Profiles
cron.service loaded active running Regular background program processing daemon
cups-browsed.service loaded active running Make remote CUPS printers available locally
cups.service loaded active running CUPS Scheduler
dbus.service loaded active running D-Bus System Message Bus
gdm.service loaded active running GNOME Display Manager
irqbalance.service loaded active running irqbalance daemon
kerneloops.service loaded active running Tool to automatically collect and submit kernel crash signatures
libvirtd.service loaded active running Virtualization daemon
lxcfs.service loaded active running FUSE filesystem for LXC
mdmonitor.service loaded active running MD array monitor
ModemManager.service loaded active running Modem Manager
networkd-dispatcher.service loaded active running Dispatcher daemon for systemd-networkd
nmbd.service loaded active running Samba NMB Daemon
nvidia-persistenced.service loaded active running NVIDIA Persistence Daemon
polkit.service loaded active running Authorization Manager
rinetd.service loaded active running rinetd.service
rsyslog.service loaded active running System Logging Service
rtkit-daemon.service loaded active running RealtimeKit Scheduling Policy Service
smbd.service loaded active running Samba SMB Daemon
ssh.service loaded active running OpenBSD Secure Shell server
switcheroo-control.service loaded active running Switcheroo Control Proxy service
systemd-journald.service loaded active running Journal Service
systemd-logind.service loaded active running Login Service
systemd-machined.service loaded active running Virtual Machine and Container Registration Service
systemd-timesyncd.service loaded active running Network Time Synchronization
systemd-udevd.service loaded active running udev Kernel Device Manager
udisks2.service loaded active running Disk Manager
uml-utilities.service loaded active running LSB: start and stop UML networking services
unattended-upgrades.service loaded active running Unattended Upgrades Shutdown
upower.service loaded active running Daemon for power management
[email protected] loaded active running User Manager for UID 1000
[email protected] loaded active running User Manager for UID 121
vmware-USBArbitrator.service loaded active running LSB: This services starts and stops the USB Arbitrator.
vmware.service loaded active running LSB: This service starts and stops VMware services
whoopsie.service loaded active running crash report submission daemon
wpa_supplicant.service loaded active running WPA supplicant
答案1
这原来是 intitramfs 错误(引用的错误已更新)。在 Focal 中,他们更改了 AOE 脚本以在 functions.sh 中调用 configure_networking。这是一个由网络启动或网络根(nfs、iscsi 和现在的 aoe)触发的超级功能。不幸的是,configure_networking 总是尝试使用网络接口来获取 ip(这对于 aoe 来说不是必需的),并且在没有 ip=/device= 命令行参数的情况下,默认是在每个接口上尝试每种协议(bootp、dhcp)。哎哟。
解决方法是在内核行中添加 ip=none,或者从 local_top/aoe 中注释掉 configure_networking。
附言:这是我的第一个问题。我得到了两个完全不相关的答案和一个反对票。太棒了,谢谢。