zoukankan      html  css  js  c++  java
  • VyOS Unicast VXLAN

    VyOS Unicast VXLAN

    来源 https://zhuanlan.zhihu.com/p/101812773

    利用 VyOS 我们可以快速的配置出一种没有灵魂的 VXLAN (没有 control plane),简洁的配置可以帮助我们测试 VXLAN 流量或者是帮助初学者学习 VXLAN。新版本的 VyOS 命令行有一些变化,官网的配置示例没有更新,所以这里记录一下我使用的配置命令。

    测试的 VyOS 版本为 vyos-1.2-rolling-201912010217-amd64

    VPC 1 和 VPC 2 之间虽然跨越了三层网络,但是我们利用 VXLAN 对数据包进行封装就可以使它们处于同一个二层网络。

    Cisco 的配置

    Router(config)#int e0/0
    Router(config-if)#no sh
    Router(config-if)#ip add 10.1.2.1 255.255.255.0
    
    Router(config-if)#int e0/1
    Router(config-if)#no sh
    Router(config-if)#ip add 10.1.3.1 255.255.255.0
    

    VyOS1 的配置

    vyos@VyOS1# set interfaces ethernet eth0 address 10.1.2.2/24
    
    vyos@VyOS1# set interfaces ethernet eth1 vif 10
    
    vyos@VyOS1# set protocols static route 0.0.0.0/0 next-hop 10.1.2.1
    
    vyos@VyOS1# set interfaces vxlan vxlan101 remote '10.1.3.3'
    
    vyos@VyOS1# set interfaces vxlan vxlan101 port '4789'
    
    vyos@VyOS1# set interfaces vxlan vxlan101 link 'eth0'
    
    vyos@VyOS1# set interfaces vxlan vxlan101 vni '101'
    
    vyos@VyOS1# set interfaces bridge br10
    
    vyos@VyOS1# set interfaces bridge br10 member interface eth1
    
    vyos@VyOS1# set interfaces bridge br10 member interface vxlan101
    

    VyOS2 的配置

    vyos@VyOS2# set interfaces ethernet eth0 add 10.1.3.3/24
    
    vyos@VyOS2# set interfaces ethernet eth1 vif 10
    
    vyos@VyOS2# set protocols static route 0.0.0.0/0 next-hop 10.1.3.1
    vyos@VyOS2# set interfaces vxlan vxlan101 remote '10.1.2.2'
    
    vyos@VyOS2# set interfaces vxlan vxlan101 port '4789'
    
    vyos@VyOS2# set interfaces vxlan vxlan101 link 'eth0'
    
    vyos@VyOS2# set interfaces vxlan vxlan101 vni '101'
    
    vyos@VyOS2# set interfaces bridge br10
    
    vyos@VyOS2# set interfaces bridge br10 member interface eth1
    
    vyos@VyOS2# set interfaces bridge br10 member interface vxlan101

    VPC1 ping VPC2 测试

    VPCS> ping 192.168.1.2
    
    84 bytes from 192.168.1.2 icmp_seq=1 ttl=64 time=3.372 ms
    84 bytes from 192.168.1.2 icmp_seq=2 ttl=64 time=4.520 ms
    84 bytes from 192.168.1.2 icmp_seq=3 ttl=64 time=4.519 ms
    84 bytes from 192.168.1.2 icmp_seq=4 ttl=64 time=4.370 ms
    84 bytes from 192.168.1.2 icmp_seq=5 ttl=64 time=4.977 ms

    ============ End

  • 相关阅读:
    C++ 引用与常量
    树的三种存储方法
    二叉树 基本运算
    Win10阻止电脑关机时弹出正在关闭应用的方法及恢复
    使用spring+quartz配置多个定时任务(包括项目启动先执行一次,之后再间隔时间执行)
    MySQL为某数据库中所有的表添加相同的字段
    Mysql定时任务详情
    MYSQL存储过程即常用逻辑
    后台发送请求,HttpClient的post,get各种请求,带header的请求
    java后台发送请求获取数据,并解析json数据
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/14106634.html
Copyright © 2011-2022 走看看