linux vxlan实现2台机器的通往段ip互通

[svc]linux上vxlan实战

- 在n1上
ip l a vxlan0 type vxlan id 42 dstport 4789 remote 192.168.1.12 local 192.168.1.11 dev eth0
ip -d l show dev vxlan0
ip a a 12.1.1.1/24 dev vxlan0
ip l s vxlan0 up
ip route   # 去12.1.1.0/24的数据丢给了vxlan0口


- 在n2上
ip l a vxlan0 type vxlan id 42 dstport 4789 remote 192.168.1.11 local 192.168.1.12 dev eth0
ip -d l show dev vxlan0
ip a a 12.1.1.2/24 dev vxlan0
ip l s vxlan0 up
ip route
[root@n1 ~]# bridge fdb
00:00:00:00:00:00 dev vxlan0 dst 192.168.1.12 via eth0 self permanent

https://github.com/lannyMa/scripts/blob/master/pkgs/vxlan.pcap
[svc]linux上vxlan实战

vxlan多播实现多台互通

[svc]linux上vxlan实战

- n1
ip link add vxlan0 type vxlan \
    id 42 \
    dstport 4789 \
    group 239.1.1.1 \
    dev eth0

ip addr add 12.1.1.1/24 dev vxlan0
ip link set vxlan0 up



-n2
ip link add vxlan0 type vxlan \
    id 42 \
    dstport 4789 \
    group 239.1.1.1 \
    dev eth0

ip addr add 12.1.1.2/24 dev vxlan0
ip link set vxlan0 up


-n3
ip link add vxlan0 type vxlan \
    id 42 \
    dstport 4789 \
    group 239.1.1.1 \
    dev eth0

ip addr add 12.1.1.3/24 dev vxlan0
ip link set vxlan0 up

相关文章:

  • 2022-01-17
  • 2022-01-01
  • 2022-12-23
  • 2021-05-11
  • 2021-12-05
  • 2021-06-04
  • 2021-09-04
  • 2021-10-29
猜你喜欢
  • 2021-12-03
  • 2021-12-10
  • 2021-11-11
  • 2021-12-08
  • 2022-01-24
  • 2021-11-10
相关资源
相似解决方案