Skip to content

HuJK/Sync-Bridge-FDB-to-SR-IOV-PF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Script

This script make VMs under pf bridges be able to communicate with VMs that under VFs in SR-IOV, which allows VM1~VM6 to communicate each other in this diagram
image

It will read mac address learned from bridge and sync to the FDB table.

Run this script periodically.

Inspired by https://github.com/jdlayman/pve-hookscript-sriov

Usage

Usage: ./sync_mac_to_br.sh [write|restore] $bridge_name $parent_interface

Sync every 10 seconds

In this example
vmbr1001 is the bridge name
ens1f1 is the parent interface

Add this to your crontab

* * * * *             /root/sync_mac_to_br.sh write vmbr1001 ens1f1
* * * * * sleep 10 && /root/sync_mac_to_br.sh write vmbr1001 ens1f1
* * * * * sleep 20 && /root/sync_mac_to_br.sh write vmbr1001 ens1f1
* * * * * sleep 30 && /root/sync_mac_to_br.sh write vmbr1001 ens1f1
* * * * * sleep 40 && /root/sync_mac_to_br.sh write vmbr1001 ens1f1
* * * * * sleep 50 && /root/sync_mac_to_br.sh write vmbr1001 ens1f1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages