如何配置Proxmox VE主备Trunk线上联思科交换机?
- By : Will
- Category : Virtualization

Virtualization
1 前言
一个问题,一篇文章,一出故事。
本章将总结Proxmox VE的网卡以Trunk模式上联思科交换机。
由于Trunk允许多个VLAN通讯,因此Trunk是一种适合虚拟机灵活横跨多个网段的方案。
2 最佳实践
2.1 节点上联交换机设置
Switch(config)# interface range GigabitEthernet0/1 - 2 Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# switchport mode trunk
2.2 Proxmox VE虚拟服务设置
2.2.1 配置端口聚合
vim /etc/network/interfaces
修改如下配置,
auto enp5s1f0 iface enp5s1f0 inet manual auto enp5s1f1 iface enp5s1f1 inet manual auto bond0 iface bond0 inet manual bond-slaves enp5s1f0 enp5s1f1 bond-miimon 100 bond-mode active-backup bond-primary enp5s1f0
界面设置参考,
Proxmox PE中的节点单击【系统】->【网络】->【创建】->【Linux Bond】,并参考下图设置参数,
单击【应用配置】完成配置
2.2.2 配置虚拟机所需的桥接端口
vim /etc/network/interfaces
修改如下配置,
auto vmbr0 iface vmbr0 inet manual bridge-ports bond0 bridge-stp off bridge-fd 0 bridge-vlan-aware yes bridge-vids 2-4094
界面设置参考,
Proxmox PE中的节点单击【系统】->【网络】->【创建】->【Linux Bridge】,并参考下图设置参数,
单击【应用配置】完成配置
稍微提示,虚拟机按如下配置即可设置对应VLan段的IP地址并成功通讯,非本章重点不详细讲解,
2.2.4 配置服务器管理IP地址
vim /etc/network/interfaces
修改如下配置,
auto vlan10 iface vlan10 inet static address 10.168.0.229/24 gateway 10.168.0.1 vlan-raw-device bond0
界面设置参考,
Proxmox PE中的节点单击【系统】->【网络】->【创建】->【Linux VLAN】,并参考下图设置参数,
单击【应用配置】完成配置
注:这里默认你的VLan 10已经存在并已经设置网关。
2.2.5 重启服务使配置生效
systemctl restart networking.service
如果是界面设置,请点击【应用设置】则有同等效果。
没有评论