操作方法
首先找出一台2811类的路由器和一台2960类的交换机和3台pc,利用直通线使各个设备相互连接起来,如下图所示:
为交换机配置主机名,命令为: Switch>enable Switch#conf terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#hostname S1 如下图所示:
为交换机配置密码,命令为: S1(config)#enable secret cisco S1(config)#line vty 0 15 S1(config-line)#password cisco S1(config-line)#login 如下图所示
配置交换机端口安全,配置命令是: S1(config)#int f0/1 S1(config-if)#shutdown S1(config-if)#switch mode access S1(config-if)#switch port-securitiy 如下图所示
检查交换机的Mac地址表,命令是: S1#show mac-address-table,如下图所示:
查看端口安全的设置情况,用命令为:show port-security,如下图所示: