proxmox网络

root@t1:~# 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

auto enp50s0f0
iface enp50s0f0 inet static
address 192.168.1.53
netmask 255.255.255.0

iface enp46s0f1 inet manual

iface enp0s20f0u1u6 inet manual

iface enp50s0f1 inet manual

iface enp50s0f2 inet manual

iface enp50s0f3 inet manual

iface enp28s0f0 inet manual

iface enp28s0f1 inet manual

iface enp46s0f0 inet manual

auto bond0
iface bond0 inet manual
bond-slaves enp28s0f0 enp46s0f0
bond-miimon 100
bond-mode balance-rr

auto bond0.7
iface bond0.7 inet manual

auto bond0.8
iface bond0.8 inet manual

auto bond1
iface bond1 inet static
address 192.168.3.53
netmask 255.255.255.0
bond-slaves enp28s0f1 enp46s0f1
bond-miimon 100
bond-mode balance-rr

auto vmbr8
iface vmbr8 inet manual
bridge-ports bond0.8
bridge-stp off
bridge-fd 0

auto vmbr7
iface vmbr7 inet manual
bridge-ports bond0.7
bridge-stp off
bridge-fd 0

root@t1:~#

如果想让pve主机上网,加一条默认路由即可

ip route add default via 192.168.3.254

ip route add default via 192.168.1.254

虚拟机配网关就能上网

pve主机其实什么地址也不用配,但是为了管理它,所以配了两个地址,一个管理地址192.168.1.53,另外一个存储地址192.168.3.53,这两个地址在防火墙上控制它们能不能上网即可,分内网通信与外网通信,虚拟机需要外网通信。存储网络与管理网络不需要。

猜你喜欢

转载自www.cnblogs.com/createyuan/p/10724519.html