我有一个系统,我正在使用Netplan提供网络,并遇到了一些问题的配置。
当我启动这个盒子时,就没有网络了。当我尝试运行netplan apply
时,我得到
Error in network definition //etc/netplan/01-netcfg.yaml line 26 column 18: expected sequence
这没有道理,因为第26行第18列是“managementbr0”之后的":“:
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
或netplan apply
,就会得到相同的错误Error in network definition //etc/netplan/01-netcfg.yaml line 26 column 18: expected sequence
提前感谢您的帮助。
发布于 2018-12-05 19:51:10
来自OP的编辑:
我通过将接口封装在括号"“”“中修复了这个问题。
https://askubuntu.com/questions/1098742
复制相似问题