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

  • 相关阅读:
    将字符串数组转换成整形数组
    层的三级联动
    sql
    工作中的感悟
    asp.net如何抓取其他网站的内容
    看不到的SQl
    对数据库中时间为空的处理和数据转换成百分数
    不带查询条件的分页
    svn中出现红色感叹号
    视图的创建(根据已有的表)
  • 原文地址:https://www.cnblogs.com/lsgxeva/p/14192187.html
Copyright © 2011-2022 走看看