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,這兩個地址在防火牆上控制它們能不能上網即可,分內網通信與外網通信,虛擬機需要外網通信。存儲網絡與管理網絡不需要上網。
在debian中如果永久添加靜態路由,就要在bond0.7上配ip,並加路由
auto eth0
iface eth0 inet static
address 192.168.7.2
netmask 255.255.255.0
up ip route add 192.168.7.0/24 via 192.168.7.254
down ip route add 192.168.7.0/24 via 192.168.7.254
up ip route add 192.168.8.0/24 via 192.168.8.254
down ip route add 192.168.8.0/24 via 192.168.8.254
=================================================
EtherChannel支持基於2層MAC,3層IP,4層端口號的源/目的的負載均衡,高效地使用現有鏈路
鏈路聚合技術亦稱主干技術(Trunking)或捆綁技術(Bonding)
強烈建議把Proxmox的集群網絡、存儲網絡、虛擬機通信網絡分開。網絡規划上為這三者分別划分獨立網段