lfjigu 发表于 2018-7-21 13:55:32

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

  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 :此命令告诉交换机当端口上MAC地址数超过了最大数量之后交换机应该怎么做,一共三个参数:protect,restrict和shutdown,默认是关闭端口(shutdown)。我们可以选择使用restrict来警告网络治理员,也可以选择protect来答应通过安全端口通信并丢弃来自其它MAC地址的数据包。
页: [1]
查看完整版本: Packet Tracer 5.0建构CCNA实验——配置Cisco交换机