zoukankan      html  css  js  c++  java
  • 跨交换机划分vlan

    拓扑图

    如图所示,四台交换机的IP地址网段相同,划分vlan后,只有相同vlan的主机才能通信

    因为是跨交换机的vlan划分,所以两台交换机都要配置相同的vlan

    switch 1 配置内容

    Switch>en

    Switch#

    Switch#conf t

    Switch(config)# vlan 10

    Switch(config-vlan)#exit

    Switch(config)#vlan 20

    Switch(config-vlan)#exit

    Switch(config)#int f0/1

    Switch(config-if)#switchport mode access

    Switch(config-if)#switchport access vlan 10

    Switch(config-if)#exit

    Switch(config)#int f0/2

    Switch(config-if)#switchport mode access

    Switch(config-if)#switchport access vlan 20

    Switch(config-if)#exit

    switch 0与switch1的配置内容一致

    划分好vlan后,还需要将两台交换机间的端口设置为trunk模式,不然无法传输除vlan1以外vlan的信息

    使用switchport mode trunk来设置trunk模式

    Switch(config)#int f0/24

    Switch(config-if)#switchport mode trunk

    Switch(config-if)#
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to down
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/24, changed state to up
    Switch(config-if)#
    Switch(config-if)#exit
     
    设置结束后,用ping命令来测试网络连通性
    pc1 ping  pc2

    无法连通

    pc1 ping pc3

    可以通信

  • 相关阅读:
    TensorFlow 简单实例
    $nextTick 宏任务 微任务 macrotasks microtasks
    FIS3 构建 工程化
    axios 请求参数配置说明
    js 垃圾回收机制与内存管理
    Async Await
    webpack 生命周期
    高阶函数 实现sum(2)(3) 柯里化
    JavaScript和JQuery的区别
    Javascript --常用技巧
  • 原文地址:https://www.cnblogs.com/knightysa/p/9177011.html
Copyright © 2011-2022 走看看