基于cisco

    xiaoxiao2023-03-24  6

    step1:设计实验环境

            实验环境:6台2950cisco交换机 8台PC。如图:

    swiches' hostnames A,B,C,D,E,F

    vtp:

    Server:Switch1

    Client:Switch0,2,3,4,5,6

    Domain:nashsun.com

    Password:cisco

    Trunk mode:trunk

    VLAN10

    PC0:10.10.1.1/16 fa0/11

    PC2:10.10.2.2/16 fa0/11

    PC6:10.10.3.3/16 fa0/13

    VLAN20

    PC1:10.20.1.1/16 fa0/12

    PC3:10.20.2.2/16 fa0/15

    PC4:10.20.3.3/16 fa0/11

    VLAN30

    PC5:10.30.1.1/16 fa0/13

    PC7:10.30.2.2/16 fa0/15

    STEP2: 配置VTP

        本vlan是基于cisco的vtp(vlan trunk protocol)所以需要先配置vtp,在特权模式 C# 下输入 vlan database 进入vlan 配置模式,键入C(vlan)# vtp domain nashsun.com & vtp password cisco & vtp client 非别配置 域名 域密码 vtp角色。

    STEP3:配置trunk

        分别进入所需配置trunk的接口模式,配置trunk隧道,以保证线路支持多种vlan。

        A(config)#interface fastEthernet 0/1

        A(config-if)#switchport mode trunk

    STEP4:在server交换机配置vlan

        在具有sever角色的switch上配置vlan 配置之后会自动同步各个client角色switch

    查看vtp信息命令:

    A#show vtp status

    VTP Version                     : 2

    Configuration Revision          : 3

    Maximum VLANs supported locally : 255

    Number of existing VLANs        : 8

    VTP Operating Mode              : Client

    VTP Domain Name                 : nashsun.com

    VTP Pruning Mode                : Disabled

    VTP V2 Mode                     : Disabled

    VTP Traps Generation            : Disabled

    MD5 digest                      : 0x7A 0x32 0x57 0x39 0xCB 0x57 0xD9 0x4B

    Configuration last modified by 0.0.0.0 at 3-1-93 00:39:35

    配置vlan方法很简单:(此操在server角色的switch)

    在全局配置模式下直接键入想配置的vlan 然后 exit 即可

    A(config)#vlan 20

    A(config)#exit

    STEP5:配置端口归属vlan

    对交换机相应接口进行配置:

    单个端口配置:A(config-if)#switchport access vlan 10

    多个端口配置:A(config)#interface rang fastEthernet 0/2-4

    A(config-if-range)#switchport access vlan 10

    STEP6:配置PC ipaddr/mask

       

    STEP7:PING TEST

    实验结束

    本文出自 “Fall Forward” 博客,请务必保留此出处http://nashsun.blog.51cto.com/9377291/1846825

    转载请注明原文地址: https://ju.6miu.com/read-1202787.html
    最新回复(0)