大家都知道小凡可以模拟路由器,当然它也是可以模拟交换机的,在此本人将小凡中交换机的基本使用做一些简单的介绍。

一、             创建交换机

在创建的时候,选择模块的时候选择NM-16ESW而不是通常使用路由器时选择的NM-4E/T,其它的都跟创建路由器是一样的。

二、             vlan的配置

进入配置模式:

SW1#vlan database

SW1(vlan)#

配置vtp

SW1(vlan)#vtp ?

  client       Set the device to client mode.

  domain       Set the name of the VTP administrative domain.

  password     Set the password for the VTP administrative domain.

  pruning      Set the administrative domain to permit pruning.

  server       Set the device to server mode.

  transparent  Set the device to transparent mode.

  v2-mode      Set the administrative domain to V2 mode.

SW1(vlan)#vlan ?

  <1-1005>  ISL VLAN index

配置vlan

SW1(vlan)#vlan 2 ?

  are        Maximum number of All Route Explorer hops for this VLAN

  backupcrf  Backup CRF mode of the VLAN

  bridge     Bridging characteristics of the VLAN

  media      Media type of the VLAN

  mtu        VLAN Maximum Transmission Unit

  name       Ascii name of the VLAN

  parent     ID number of the Parent VLAN of FDDI or Token Ring type VLANs

  ring       Ring number of FDDI or Token Ring type VLANs

  said       IEEE 802.10 SAID

  state      Operational state of the VLAN

  ste        Maximum number of Spanning Tree Explorer hops for this VLAN

  stp        Spanning tree characteristics of the VLAN

  tb-vlan1   ID number of the first translational VLAN for this VLAN (or zero

             if none)

  tb-vlan2   ID number of the second translational VLAN for this VLAN (or zero

             if none)

  <cr>

退出配置模式:

SW1(vlan)#exit

三、             查看vlan信息

SW1#sh vtp ?

  counters  VTP statistics

  status    VTP domain status

SW1#sh vlan?

vlan-range  vlan-switch  vlans 

其余的跟真机上配置是相同的,这里不作详细介绍。

注意:在模拟环境中做单臂路由的实验时,交换机和路由器间不能启用native,否则两者无法通信。