zoukankan      html  css  js  c++  java
  • VyOS和cisco交换机如何配置trunk

    VyOS和cisco交换机如何配置trunk

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

    参考 https://docs.vyos.io/en/latest/configuration/interfaces/ethernet.html?highlight=vlan#vlan

    VyOS

    set system host-name 'SW1'
    
    set interfaces ethernet eth0 address '192.168.1.1/24'
    
    set interfaces ethernet eth0 vif 10 address '192.168.10.1/24'
    set interfaces ethernet eth0 vif 10 description 'vlan 10'

    SW2

    hostname SW2
    
    vlan 1
    vlan 10
    
    interface Ethernet0/0
     switchport trunk encapsulation dot1q
     switchport mode trunk
    
    interface Vlan1
     ip address 192.168.1.2 255.255.255.0
    
    interface Vlan10
     ip address 192.168.10.2 255.255.255.0

    测试native vlan

    vyos@SW1:~$ ping 192.168.1.2
    PING 192.168.1.2 (192.168.1.2): 56 data bytes
    64 bytes from 192.168.1.2: icmp_seq=0 ttl=255 time=0.507 ms
    64 bytes from 192.168.1.2: icmp_seq=1 ttl=255 time=0.449 ms
    • native vlan 不打tag

    测试vlan10

    vyos@SW1:~$ ping 192.168.10.2
    PING 192.168.10.2 (192.168.10.2): 56 data bytes
    64 bytes from 192.168.10.2: icmp_seq=0 ttl=255 time=0.416 ms
    64 bytes from 192.168.10.2: icmp_seq=1 ttl=255 time=0.391 ms
    • vlan 10,打tag10

    ======== End

  • 相关阅读:
    【css】怎么让Chrome支持小于12px 的文字
    java操作linux,调用shell命令
    20个非常有用的Java程序片段
    Java集合详解
    SVN使用指南
    利用SQL语句查询数据库中所有表
    HttpClient-03Http状态管理
    HttpClient-02连接管理
    HttpClient-01基本概念
    IDEA安装插件
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/14192187.html
Copyright © 2011-2022 走看看