Skip to content

Commit b30b0b6

Browse files
authored
Update README with VXLAN setup instructions
Added VXLAN setup instructions for multiple hosts in the README.
1 parent aa1cb43 commit b30b0b6

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,44 @@ exit
7373
../qemu_integration/launch_qemu_cxl1.sh &
7474
```
7575
76+
for multiple hosts, you'll need vxlan
77+
78+
```bash
79+
#!/bin/bash
80+
set -eux
81+
82+
DEV=enp23s0f0np0
83+
BR=br0
84+
VNI=100
85+
MCAST=239.1.1.1
86+
BR_IP_SUFFIX=$(hostname | grep -oE '[0-9]+$' || echo 1) # optional auto-index
87+
# Or set manually:
88+
# BR_IP_SUFFIX=<1..4>
89+
90+
# Clean up
91+
ip link del $BR 2>/dev/null || true
92+
ip link del vxlan$VNI 2>/dev/null || true
93+
94+
# Create bridge
95+
ip link add $BR type bridge
96+
ip link set $BR up
97+
98+
# Create multicast VXLAN (no remote attribute!)
99+
ip link add vxlan$VNI type vxlan id $VNI group $MCAST dev $DEV dstport 4789 ttl 10
100+
ip link set vxlan$VNI up
101+
ip link set vxlan$VNI master $BR
102+
103+
# Assign overlay IP
104+
ip addr add 192.168.100.$BR_IP_SUFFIX/24 dev $BR
105+
106+
# Optional: add local TAPs for QEMU
107+
for i in 0 1; do
108+
ip tuntap add tap$i mode tap
109+
ip link set tap$i up
110+
ip link set tap$i master $BR
111+
done
112+
113+
echo "Bridge $BR ready on host $(hostname)"
114+
```
115+
for every host and edit the qemu's ip with `/usr/local/bin/setup*` and `/etc/hostname`.
116+

0 commit comments

Comments
 (0)