zoukankan      html  css  js  c++  java
  • 交换机配置——跨交换机划分VLAN配置

    一、实验要求:实现跨交换地划分vlan的配置任务,使同一vlan下的主机能相互通讯

    二、拓扑图如下;

    三、具体实验步骤:

    S1交换机配置:

    S1>enable  --进入特权模式
    S1#config terminal  --进入全局配置模式
    Enter configuration commands, one per line. End with CNTL/Z.
    S1(config)#hostname S1  --修改交换机名为S1
    S1(config)#vlan 2  --创建并进入vlan 2端口,开启
    S1(config-vlan)#vlan 3  --创建并进入vlan 3 端口,开启
    S1(config-vlan)#exit  --返回上一级
    S1(config)#interface f0/1  进入f0/1端口
    S1(config-if)#switchport mode access  --端口模式改为access模式
    S1(config-if)#switchport access vlan 2  --将f0/1端口划入到vlan 2 下
    S1(config-if)#interface f0/2   --进入f0/2端口
    S1(config-if)#switchport mode access   --端口模式改为access模式
    S1(config-if)#switchport access vlan 3  --将f0/2端口划入到vlan 3 下
    S1(config-if)#interface f0/3  --进入f0/3端口
    S1(config-if)#switchport mode trunk  --将f0/3改为trunk模式,这是实现跨交换机vlan通讯最重要的一部

    S1(config-if)#end  --返回到特权模式
    S1#copy running-config startup-config  --保存配置
    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up

    %SYS-5-CONFIG_I: Configured from console by console

    Destination filename [startup-config]?
    Building configuration...
    [OK]  --保存成功

    S2交换机配置:

    Switch>enable  --进入特权模式
    Switch#config terminal  --进入全局配置模式
    Enter configuration commands, one per line. End with CNTL/Z.
    Switch(config)#hostname S2  --修改交换机名为S2
    S2(config)#vlan 2  --创建并进入vlan 2端口,开启
    S2(config-vlan)#vlan 3  --创建并进入vlan 3端口,开启
    S2(config-vlan)#exit  --返回上一级
    S2(config)#interface f0/1  --进入f0/1端口
    S2(config-if)#switchport mode access  --将端口模式改为access模式
    S2(config-if)#switchport access vlan 2  --将f0/1端口划入到vlan 2
    S2(config-if)#interface f0/2   --进入f0/2端口
    S2(config-if)#switchport mode access  --将端口模式改为access模式
    S2(config-if)#switchport access vlan 3  --将f0/2端口划入到vlan 2
    S2(config-if)#interface f0/3  --进入f0/3端口
    S2(config-if)#switchport mode trunk  --将端口模式改为trunk模式,这是跨交换机vlan通讯最重要的一部
    S2(config-if)#end  --返回特权模式
    S2#copy running-config startup-config  --保存配置
    %SYS-5-CONFIG_I: Configured from console by console

    Destination filename [startup-config]?
    Building configuration...
    [OK]  --保存成功

    四、验证同vlan下的两台主机是否互通,

    vlan 2下的PC1PC3

    vlan 3下的PC2PC4

  • 相关阅读:
    创建SSIS包—ETL中典型的数据清洗
    SSIS中的容器和数据流—数据转换(Transformations)
    创建SSIS包—循环和动态package
    SSIS中的容器和数据流—数据转换(Transformations)续
    创建SSIS包—建立端到端的package
    SQL点滴9—SQL Server中的事务处理以及SSIS中的内建事务
    SSIS中的容器和数据流—调试工具数据视图
    SQL点滴11—重置win7登录密码影响SQL登录
    SQL点滴10—使用with语句来写一个稍微复杂sql语句,附加和子查询的性能对比
    SSIS中的容器和数据流—举例说明数据转换任务
  • 原文地址:https://www.cnblogs.com/evolve/p/9177986.html
Copyright © 2011-2022 走看看