Home  >  Article  >  Database  >  Cisco3550实现MAC和交换机端口绑定

Cisco3550实现MAC和交换机端口绑定

WBOY
WBOYOriginal
2016-06-07 15:31:251166browse

利用交换机的Port-Security功能实现 以下是一个配置实例: switch#c onfig t switch(config)#int f0/1 switch(config-if)#switchport mode access //设置交换机的端口模式为access模式,注意缺省是dynamic //dynamic模式下是不能使用Port-security功能

利用交换机的Port-Security功能实现

  以下是一个配置实例:

  switch#c onfig t

  switch(config)#int f0/1

  switch(config-if)#switchport mode access

  //设置交换机的端口模式为access模式,注意缺省是dynamic

  //dynamic模式下是不能使用Port-security功能

  switch(config-if)#switchport port-security

  //打开port-security功能

  switch(config-if)#switchport port-security mac-address xxxx.xxxx.xxxx

  //xxxx.xxxx.xxxx就是你要关联的mac地址

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

  //其实缺省就是1

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

  //如果违反规则,就shutdown端口

  //这个时候你show int f0/1的时候就会看到接口是err-disable的

  附:

  switchport port-security命令语法

  Switch(config-if)#switchport port-security ?

  aging        Port-security aging commands

  mac-address  Secure mac address

  //设置安全MAC地址

  maximum      Max secure addresses

  //设置最大的安全MAC地址的数量,缺省是1

  violation    Security violation mode

  //设置违反端口安全规则后的工作,缺省是shutdown

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn