PVE双网卡桥接虚拟网络
原创2025年10月10日大约 3 分钟
PVE双网卡桥接虚拟网络
当前现状:PVE中有两个网卡,目前只使用其中一个网卡,供上网是试用,内部有个虚拟网络。现在想让另外一个网络卡也使用这个虚拟网络,并且可以正常上网,分配到虚拟网络的IP断。
环境信息
PVE版本信息
root@:~# pveversion -v
proxmox-ve: 8.3.0 (running kernel: 6.8.12-8-pve)
pve-manager: 8.3.4 (running version: 8.3.4/65224a0f9cd294a3)
proxmox-kernel-helper: 8.1.1
proxmox-kernel-6.8: 6.8.12-8当前网络配置
IP 和 网口匿名化处理了
root@:~# cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
iface wlpXXXs0 inet manual
iface enpXX0s0 inet manual
iface enpXX1s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.XXX.X.XXX/24
gateway 192.XXX.X.1
bridge-ports enpXX0s0
bridge-stp off
bridge-fd 0
auto vmbr1
iface vmbr1 inet static
address 10.XXX.x.XXX/24
bridge-ports none
bridge-stp off
bridge-fd 0
root@mac-pro:~#要把 网口 enpXX1s0 当虚拟网络 vmbr1 也即 10.XXX.x.XXX/24使用 , 修改下面行配置
# bridge-ports none 改为
bridge-ports enpXX1s0
# 重启网络
systemctl restart networking.service注意事项,问题的解决方法
- 如果不能正确获取IP地址,请 重启
vmbr1网段中的openWrt虚拟机 - 如果不能上网,请移除,再加入
vmbr1网段中的openWrt虚拟机的硬件网卡vmbr1并再加入, 再重启openWrt虚拟机 - 如果其他虚拟机无法上网,请移除对应虚拟网卡
vmbr1,再加入, 再重启虚拟机 - 如果还不能上网,请重启PVE
最终的网络拓扑
展示不了请copy代码到能解析
mermaid的工具中查看