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

  • 相关阅读:
    Windows server 2008设置远程桌面
    .NET高级开发工程师 南通红创软件科技有限公司
    silverlight获取浏览器信息交互数据的方法
    silverlight元素FrameworkElement.LayoutUpdated布局变化事件
    Nicholas C. Zakas如何面试前端工程师
    asp.net自动完成控件在用户控件上失效的解决方法
    构建高性能可扩展ASP.NET网站
    关闭sql server 2005远程连接
    使用asp.net实现单点登陆(SSO)功能
    微软首次展示Windows 8:开始界面类似WP7
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/14106634.html
Copyright © 2011-2022 走看看