zoukankan      html  css  js  c++  java
  • 配置hybird接口

    实验内容

    本实验模拟某公司网络场景。公司规模较大,员工200余名,内部网络是一个大的局域网。公司放置了多台交换机(如S1和S2)负责员工的网络接入。接入交换机之间通过汇聚交换机S3相连。公司通过划分VLAN来隔离广播域,由于员工较多,相同部门的员工通过不同交换机接入。为了保证在不同交换机下相同部门的员工能互相通信,需要配置交换机之间链路为干道模式,以实现相同的VLAN跨交换机通信。

    1. ping连通性 PC1pc2345都可以ping

     

       

    2.查看接口的默认类型    display  port  vlan,默认接口都是hybrid,默认PVID都是1

     

    display vlan 查看接口和所属的vlan对应类型,默认都属于vlan1,所以所有主机都可以访问到。

     

    2.配置接口

    实现组内通讯,组间隔离

    交换机的接口类型可以是accesstrunkhybrid

    Access:仅属于一个vlan、只能接收、和转发

    Trunk:默认属于所有vlan、任何tagged帧都能经过trunk接收和转发

    Hybird介于二者之间,可以自由定义端口接收和转发哪些vlan tag的帧,并且可以决定是否携带和剥离

    S1E0/0/2S2E0/0/2 配置成access接口类型,并且将相应的接口加入到vlan20.同理,将S1E0/0/3S2E0/0/3 配置成access接口类型,并且将相应的接口加入到vlan10.

    交换机之间的互连链路俩个E0/0/1接口配置成trunk接口。

    [guohuzihis1-Ethernet0/0/3]interface ethernet 0/0/2

    [guohuzihis1-Ethernet0/0/2]port link-type access

    [guohuzihis1-Ethernet0/0/2]port default vlan 20

    [guohuzihis1-Ethernet0/0/2]interface ethernet 0/0/1

    [guohuzihis1-Ethernet0/0/1]port link-type trunk

    [guohuzihis1-Ethernet0/0/1]port trunk allow-pass vlan all

     

    Dispaly vlan  

     

    4.ping   pc1pc3  通       pc1pc2  丢失

      

    以上使用的是trunkaccess接口 接下来使用hybird接口

    要使用undo port default vlan用其回复vlan的默认属性,

    配置port link-type hybrid

    配置port hybrid untagged vlan 20  使得交换机在该接口转发vlan20帧时,剥离掉该相应的vlan tag20、以untagged方式发送给PC

    配置port hybrid PVID vlan 20设置HYbird接口默认的ID ,即使得到该端口上接收到pc发来的未带vlan tag帧时,加上vlan tag20,,并且转发到vlan20.

     

    设置s1E0/0/1接口类型为hybridport hybird tagged vlan10 20设置该链路仅接受的带有vlan tag 1020的帧,交换机也仅转发vlan 10vlan20的帧到该该链路。

     

    S2S1做同样的配置

     

    Dispaly  vlan

     

    ping pc1pc3  通   pc1pc2  丢失

         

    S1

    [guohuizhis1]vlan 30

    [guohuizhis1-vlan30]interface ethernet 0/0/4

    [guohuizhis1-Ethernet0/0/4]port hybrid pvid vlan 30

    [guohuizhis1-Ethernet0/0/4]

    [guohuizhis1-Ethernet0/0/4]port  hybird untagged vlan 10 20 30

                                     ^

    Error: Unrecognized command found at '^' position.

    [guohuizhis1-Ethernet0/0/4]port hy

    [guohuizhis1-Ethernet0/0/4]port hybrid un

    [guohuizhis1-Ethernet0/0/4]port hybrid untagged vlan 10 20 30

    [guohuizhis1-Ethernet0/0/4]

    [guohuizhis1-Ethernet0/0/4]inte

    [guohuizhis1-Ethernet0/0/4]interface ethernet 0/0/2

    [guohuizhis1-Ethernet0/0/2]port hybrid untagged vlan 20 30

    [guohuizhis1-Ethernet0/0/2]interface ethernet 0/0/3

    [guohuizhis1-Ethernet0/0/3]port hybrid untagged vlan 10  30

    [guohuizhis1-Ethernet0/0/3]interface ethernet 0/0/1

    [guohuizhis1-Ethernet0/0/1]port hybrid untagged vlan 10  20 30

    [guohuizhis1-Ethernet0/0/1]

     

    S2

    [Huawei]interface ethernet 0/0/1

    [Huawei-Ethernet0/0/1]port hybrid tagged vlan 10 20 30

    [Huawei-Ethernet0/0/1]interface ethernet 0/0/2

    [Huawei-Ethernet0/0/2]port hybrid tagged vlan 20 30

    [Huawei-Ethernet0/0/2]interface ethernet 0/0/3

    [Huawei-Ethernet0/0/3]port hybrid tagged vlan 10 30

     

    PC5所在的vlan30 ,可以正常访问到其他部门的所有终端

    PC1IT部门PC5也可以ping通,

        

  • 相关阅读:
    JMeter发送get请求并分析返回结果
    在Linux CentOS上搭建Jmeter压测环境
    Jmeter对数据库批量增删改查
    adb下载安装
    JMeter循环读取CSV文件实现接口批量测试
    Jmeter接口测试-MD5加密-请求验签(完整流程)
    fiddler 手机抓包(含https) 完整流程
    火狐兼容selenium版本解决
    selenium启动IE失败,并报错:Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones
    基于pywinauto的Windows平台上自动化测试实践(2)
  • 原文地址:https://www.cnblogs.com/xingyuner/p/11911695.html
Copyright © 2011-2022 走看看