![具有多个网卡的 Azure VM](https://linux22.com/image/1188359/%E5%85%B7%E6%9C%89%E5%A4%9A%E4%B8%AA%E7%BD%91%E5%8D%A1%E7%9A%84%20Azure%20VM.png)
我正在尝试按照此文档构建一个具有两个网卡的 Ubuntu Server 20.04 服务器 -https://docs.microsoft.com/en-us/azure/virtual-machines/linux/multiple-nics。
VM 部署在前端子网中一个网卡,在后端部署一个网卡,我具有以下 netplan 配置和路由:
network:
ethernets:
eth0:
dhcp4: true
dhcp4-overrides:
route-metric: 100
dhcp6: false
match:
driver: hv_netvsc
macaddress: 00:00:00:00:00:00
set-name: eth0
eth1:
dhcp4: true
dhcp4-overrides:
route-metric: 200
dhcp6: false
match:
driver: hv_netvsc
macaddress: 00:00:00:00:00:00
set-name: eth1
routes:
- to: 0.0.0.0/0
via: 172.22.40.65
version: 2
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.22.40.65 255.255.255.255 UGH 0 0 0 eth1
0.0.0.0 172.22.40.1 0.0.0.0 UG 100 0 0 eth0
168.63.129.16 172.22.40.1 255.255.255.255 UGH 100 0 0 eth0
169.254.169.254 172.22.40.1 255.255.255.255 UGH 100 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
172.22.40.0 0.0.0.0 255.255.255.192 U 0 0 0 eth0
172.22.40.64 0.0.0.0 255.255.255.192 U 0 0 0 eth1
172.22.40.65 是后端子网的网关地址,我已将 MAC 地址匿名化。
从 eth0 上,我可以访问互联网并在对等虚拟网络中 ping 防火墙,但是从 eth1 上,我却无法执行任何操作。我是否遗漏了某些明显的步骤来使它正常工作?
任何建议都是非常感谢的