はじめに
vSphere上で使っていた分散スイッチみたいなのを、
Proxmox上で、Open vSwitch でつくってみたいな
とういことで、VXLANでつないでみるメモ
Google検索しても理解できるレベルの資料がなかったので、ChatGPT先生に教えてもらいました
構成
今回は、以下のメッシュ型の構成で作ってみる。
ループになるのでSTPを有効にしています。
ハブ・アンド・スポーク型の記事はこちら ↓
【2024年08月版】Proxmoxで分散スイッチ構築メモ【vxlan, ハブ・アンド・スポーク型】
GREの記事はこちら ↓
【2024年08月版】Proxmoxで分散スイッチ構築メモ【gre, メッシュ型】
設定方法
Node A
ovs-vsctl add-port vmbr1 vxlanB -- set interface vxlanB type=vxlan options:remote_ip=10.0.254.112 options:key=100
ovs-vsctl add-port vmbr1 vxlanC -- set interface vxlanC type=vxlan options:remote_ip=10.0.254.113 options:key=100
ovs-vsctl add-port vmbr1 vxlanD -- set interface vxlanD type=vxlan options:remote_ip=10.0.254.114 options:key=100
ovs-vsctl set bridge vmbr1 stp_enable=true
Node B
ovs-vsctl add-port vmbr1 vxlanA -- set interface vxlanA type=vxlan options:remote_ip=10.0.254.111 options:key=100
ovs-vsctl add-port vmbr1 vxlanC -- set interface vxlanC type=vxlan options:remote_ip=10.0.254.113 options:key=100
ovs-vsctl add-port vmbr1 vxlanD -- set interface vxlanD type=vxlan options:remote_ip=10.0.254.114 options:key=100
ovs-vsctl set bridge vmbr1 stp_enable=true
Node C
ovs-vsctl add-port vmbr1 vxlanA -- set interface vxlanA type=vxlan options:remote_ip=10.0.254.111 options:key=100
ovs-vsctl add-port vmbr1 vxlanB -- set interface vxlanB type=vxlan options:remote_ip=10.0.254.112 options:key=100
ovs-vsctl add-port vmbr1 vxlanD -- set interface vxlanD type=vxlan options:remote_ip=10.0.254.114 options:key=100
ovs-vsctl set bridge vmbr1 stp_enable=true
Node D
ovs-vsctl add-port vmbr1 vxlanA -- set interface vxlanA type=vxlan options:remote_ip=10.0.254.111 options:key=100
ovs-vsctl add-port vmbr1 vxlanB -- set interface vxlanB type=vxlan options:remote_ip=10.0.254.112 options:key=100
ovs-vsctl add-port vmbr1 vxlanC -- set interface vxlanC type=vxlan options:remote_ip=10.0.254.113 options:key=100
ovs-vsctl set bridge vmbr1 stp_enable=true
確認
設定の確認
Node A
$ ovs-vsctl list-ports vmbr1
vxlanB
vxlanC
vxlanD
Node B
$ ovs-vsctl list-ports vmbr1
vxlanA
vxlanC
vxlanD
Node C
$ ovs-vsctl list-ports vmbr1
vxlanA
vxlanB
vxlanD
Node D
$ ovs-vsctl list-ports vmbr1
vxlanA
vxlanB
vxlanC
疎通の確認
- vmbr1 に直接IPを指定して(たとえば172.16.254.0/24など)、互いにPingで疎通確認
- vmbr1 をVMやLXCで利用して疎通確認
さいごに
かんたんでしたね