您的位置:首页 > 其它

Packet Tracer 5.0建构CCNA实验——配置Cisco交换机

2011-01-14 18:57 543 查看
Switch>en

Switch#conf t

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

Switch(config)#interface fa0/1

Switch(config-if)#description link routerA

Switch(config-if)#int vlan1

Switch(config-if)#ip add 192.168.1.2 255.255.255.0

Switch(config-if)#exit

Switch(config)#host 2960

2960(config)#ip default-gateway 192.168.1.1

2960(config)#interface fa0/2

2960(config-if)#description link pc0

2960(config-if)#int fa0/3

2960(config-if)#description link pc1

2960(config-if)#switchport mode access

2960(config-if)#switchport port-security

2960(config-if)#switchport port-security maximum 1

2960(config-if)#switchport port-security violation shutdown

**switchport port-security maximum :可以使用这个选项答应多个MAC地址。例如,假如用户有一个12端口的集线器连接到交换机的此端口,就需要12个MAC:switchport port-security maximum 12 /答应此端口通过的最大MAC地址数目为12

switchport port-security violation [protect|restrict|shutdown]:此命令告诉交换机当端口上MAC地址数超过了最大数量之后交换机应该怎么做,一共三个参数:protect,restrict和shutdown,默认是关闭端口(shutdown)。我们可以选择使用restrict来警告网络治理员,也可以选择protect来答应通过安全端口通信并丢弃来自其它MAC地址的数据包。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: