我有一个系统,我正在使用 Netplan 提供网络连接,并且在配置方面遇到了一些问题。
当我启动盒子时,没有网络。当我尝试跑步netplan apply
时,我得到
Error in network definition //etc/netplan/01-netcfg.yaml line 26 column 18: expected sequence
这没有意义,因为第 26 行第 18 列是“管理 br0”之后的“:”:
bridges:
managementbro:
为什么那里需要一个序列?这是我完整的 01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
eth1:
dhcp4: no
ib0:
addresses: [ x.x.x.x/24 ]
mtu: 65520
bonds:
bond0:
interfaces: [ eth0, eth1 ]
parameters:
mode: active-backup
mii-monitor-interval: 100
vlans:
bond0.229:
id: 229
link: bond0
bond0.228:
id: 228
link: bond0
bridges:
managementbr0:
interfaces: bond0
addresses: [ x.x.x.x/22 ]
nameservers:
search: [ foobar.net ]
addresses: [ x.x.x.x, x.x.x.x ]
parameters:
forward-delay: 9
hello-time: 2
max-age: 12
stp: false
routes:
- to: x.x.x.x/8
via: x.x.x.x
br0:
addresses: [ x.x.x.x/22 ]
interfaces: bond0.229
gateway4: x.x.x.x
nameservers:
search: [ foobar.net ]
addresses: [ x.x.x.x, x.x.x.x ]
parameters:
forward-delay: 9
hello-time: 2
max-age: 12
stp: false
br1:
interfaces: bond0.228
parameters:
forward-delay: 9
hello-time: 2
max-age: 12
stp: false
奇怪的是,在具有类似硬件的类似系统上,此配置在启动时有效,但是在启动时有效的同一系统上,如果我运行netplan generate
or netplan apply
,我会得到同样的错误Error in network definition //etc/netplan/01-netcfg.yaml line 26 column 18: expected sequence
提前感谢您的帮助。
从OP的编辑: