Sample Header Ad - 728x90

VLAN over VxLAN tunnel problem

0 votes
0 answers
106 views
I m trying to extend a layer 2 network (Vlans) over a layer 3 network using vxlan tunnels ... i set up a lab where i have two VMs where, - I created a vxlan tunnel between the 2 main interfaces of the VMs - I created 2 vlan sub-interfaces under the second interface for each machine - I linked each vlan sub interface with the vxlan sub interface in separate bridges for each machine - I assigned an ip to every bridge (10.1.100.1/24 , 10.1.100.2/24 and 10.1.100.3/24 , 10.1.100.4/24) ===> now when itry to ping from one bridge to another in (same vlan tag) it doesn t work
[root@Asguard ~]# ping 192.168.100.1 -I 192.168.100.3
PING 192.168.100.1 (192.168.100.1) from 192.168.100.3 : 56(84) bytes of data.
From 192.168.100.3 icmp_seq=10 Destination Host Unreachable
ping: sendmsg: No route to host
From 192.168.100.3 icmp_seq=11 Destination Host Unreachable
From 192.168.100.3 icmp_seq=12 Destination Host Unreachable
From 192.168.100.3 icmp_seq=14 Destination Host Unreachable
From 192.168.100.3 icmp_seq=15 Destination Host Unreachable
From 192.168.100.3 icmp_seq=16 Destination Host Unreachable
From 192.168.100.3 icmp_seq=17 Destination Host Unreachable
this is the script i run in each VM VM1 :
#!/bin/bash

# Bridge and interface setup
ip link add br10 type bridge
ip link add br20 type bridge

ip link set br10 up
ip link set br20 up

# VLAN 10 on bridge br10
ip link add link enp0s9 name enp0s9.10 type vlan id 10
ip link set enp0s9.10 master br10
ip link set enp0s9.10 up

# VLAN 20 on bridge br20
ip link add link enp0s9 name enp0s9.20 type vlan id 20
ip link set enp0s9.20 master br20
ip link set enp0s9.20 up

# VXLAN on both bridges
ip link set vxlan1000 master br10
ip link set vxlan1000 up

#ip link add vxlan1000_2 type vxlan id 1000 dev enp0s3 remote 10.1.25.235 dstport 4789
ip link set vxlan1000 master br20
ip link set vxlan1000 up

ip addr add 192.168.100.1/24 dev br10
ip addr add 192.168.100.2/24 dev br20
VM2
#!/bin/bash

# Bridge and interface setup
ip link add br11 type bridge
ip link add br22 type bridge

ip link set br11 up
ip link set br22 up

# VLAN 10 on bridge br10
ip link add link enp0s8 name enp0s8.10 type vlan id 10
ip link set enp0s8.10 master br11
ip link set enp0s8.10 up

# VLAN 20 on bridge br20
ip link add link enp0s8 name enp0s8.20 type vlan id 20
ip link set enp0s8.20 master br22
ip link set enp0s8.20 up

# VXLAN on both bridges
ip link add vxlan1001 type vxlan id 1000 dev enp0s3 remote 10.1.25.31 dstport 4789
ip link set vxlan1001 master br11
ip link set vxlan1001 up

#ip link add vxlan1000_2 type vxlan id 1000 dev enp0s3 remote 10.1.25.235 dstport 4789
ip link set vxlan1001 master br22
ip link set vxlan1001 up

ip addr add 192.168.100.3/24 dev br11
ip addr add 192.168.100.4/24 dev br22
!!! i want to know how linux handle the tagging and encapsulation to make them work together to make the vxlan extention
Asked by GStaim (1 rep)
Oct 25, 2024, 09:57 AM
Last activity: Oct 25, 2024, 10:56 AM