我想为网桥配置br-mgmt
VLAN。我创建了 VLAN 和网桥,然后为网桥分配了 IP 地址,但ping
不起作用。
我的网络规划配置如下所示:
服务器1
root@server1:~# cat /etc/netplan/02-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
enp5s0:
dhcp4: no
vlans:
vlan.50:
id: 50
link: enp5s0
bridges:
br-mgmt:
interfaces: [vlan.50]
addresses: [ 192.168.50.194/24 ]
服务器2
root@server2:~# cat /etc/netplan/02-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
enp5s0:
dhcp4: no
vlans:
vlan.50:
id: 50
link: enp5s0
bridges:
br-mgmt:
interfaces: [vlan.50]
addresses: [ 192.168.50.195/24 ]
ping 测试
root@server1:~# ping 192.168.50.195
PING 192.168.50.195 (192.168.50.195) 56(84) bytes of data.
From 192.168.50.194 icmp_seq=1 Destination Host Unreachable
From 192.168.50.194 icmp_seq=2 Destination Host Unreachable
我错过了什么吗?
- ubuntu:22.02服务器
- 内核版本:5.15.0-75-generic
- netplan 的 systemd-networkd 守护进程