Cisco 路由交换练习VLAN与设置汇聚链路

有两个2900系列交换机,其中f0/1均 留作连上层,f0/2口互联,已知1号交 换机中,创建自定义vlan,分别为 vlan 21fe 0/3 - 5, vlan 22fe 0/6 - 8),vlan 23fe 0/9 - 10

现对1号和2号交换机进行配置,

要求:(1)把f0/2互联线路设置为汇聚链路

2)在1号交换 机中配置vlan2号交换 机通过学习获得vlan配置

          (注: 再次提示,学习不能学得端口,只能学到vlan

    

1、写出1号交 换机配置命令:

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname SW1

SW1(config)#end

SW1#vlan database

SW1(vlan)#vtp domain sg

Changing VTP domain from NULL to sg

SW1(vlan)#vtp server

SW1(vlan)#vlan 21 name no21

VLAN 21 added:

    Name:no21

SW1(vlan)#vlan 22 name no22

VLAN 22 added:

    Name:no22

SW1(vlan)#vlan 23 name no23

VLAN 23 added:

    Name:no23

SW1(vlan)#int range fa 0/3 - 5

SW1(config-if)#switchport access vlan 21

SW1(config-if)#int range fa 0/6 - 8

SW1(config-if)#switchport access vlan 22

SW1(config-if)#int range fa 0/9 - 10

SW1(config-if)#switchport access vlan 23

SW1(config-if)#end

SW1#conf t

SW1(config)#int fa 0/2

SW1(config-if)#shutdown

SW1(config-if)#switchport trunk encapsulation dot1q

SW1(config-if)#switchport mode trunk

SW1(config-if)#no shutdown

2、写出2号交 换机配置命令:

Switch>en

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname SW2

SW2(config)#end

SW2#vlan database

SW2(vlan)#vtp domain sg

Changing VTP domain from NULL to sg

SW2(vlan)#vtp client

SW2(vlan)#vlan 21 name no21

VLAN 21 added:

    Name:no21

SW2(vlan)#vlan 22 name no22

VLAN 22 added:

    Name:no22

SW2(vlan)#vlan 23 name no23

VLAN 23 added:

    Name:no23

SW2(vlan)#int range fa 0/3 - 5

SW2(config-if)#switchport access vlan 21

SW2(config-if)#int range fa 0/6 - 8

SW2(config-if)#switchport access vlan 22

SW2(config-if)#int range fa 0/9 - 10

SW2(config-if)#switchport access vlan 23

SW2(config-if)#end

SW2#conf t

SW2(config)#int fa 0/2

SW2(config-if)#shutdown

SW2(config-if)#switchport trunk encapsulation dot1q

SW2(config-if)#switchport mode trunk

SW2(config-if)#no shutdown

你可能感兴趣的:(Cisco)