42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx

上传人:b****4 文档编号:17404266 上传时间:2022-12-01 格式:DOCX 页数:8 大小:20.08KB
下载 相关 举报
42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx_第1页
第1页 / 共8页
42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx_第2页
第2页 / 共8页
42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx_第3页
第3页 / 共8页
42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx_第4页
第4页 / 共8页
42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx_第5页
第5页 / 共8页
点击查看更多>>
下载资源
资源描述

42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx

《42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx》由会员分享,可在线阅读,更多相关《42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx(8页珍藏版)》请在冰豆网上搜索。

42端口安全配置 MyPower S4330 V10 系列交换机配置手册Word文件下载.docx

目录

第1章端口安全2

1.1端口安全简介2

1.2端口安全配置3

1.3配置举例5

第1章

端口安全

1.1端口安全简介

端口安全一般应用在接入层。

它能够对通过设备访问网络的主机进行限制,允许某些特定的主机访问网络,而其他主机均不能访问网络。

端口安全功能将用户的MAC地址、IP地址、VLANID以及PORT号四个元素灵活绑定,杜绝非法用户接入网络,从而保证网络数据的安全性,并保证合法用户能够得到足够的带宽。

用户可以通过三种规则来限制可以访问网络的主机,这三种规则分别是MAC规则,IP规则和MAX规则,MAC规则又分为三种绑定方式:

MAC绑定,MAC+IP绑定,MAC+VID绑定;

IP规则可以针对某一IP也可以针对一系列IP;

MAX规则用以限定端口可以学习到的(按顺序)最多MAC地址数目,这个地址数目不包括MAC规则和IP规则产生的合法MAC地址。

在MAX规则下,又有sticky规则。

如果端口仅配置了拒绝规则,没有配置MAX规则,其他报文均不能转发(通过允许规则检查的例外)。

Sticky规则的MAC地址,能够自动地学习,也能够手工地配置,并保存于运行的配置文件中。

如果设备重启前保存运行的配置文件,设备重启后,不需再去配置,这些MAC地址自动生效。

当端口下开启sticky功能,会将MAX规则学到的动态MAC地址添加成sticky规则,并保存到运行的配置的文件中。

在MAX规则未学满的情况下,能允许继续学习新的MAC地址,形成sticky规则,直至sticky规则数达到MAX所配置的最大值。

MAC规则和IP规则可以指定匹配相应规则的报文是否允许通信。

通过MAC规则可以有效的将用户的MAC地址与Vlan,MAC地址与IP地址进行灵活的绑定,由于端口安全是基于软件实现的,规则数不受硬件资源限制,使得配置更加灵活。

端口安全的规则依靠终端设备的ARP报文进行触发,当设备接收到ARP报文时,端口安全从中提取各种报文信息,并与配置的三种规则进行匹配,匹配的顺序为先匹配MAC规则,再匹配IP规则,最后匹配MAX规则,并根据匹配结果控制端口的二层转发表,以控制端口对报文的转发行为。

当端口安全判断报文为非法报文会相应处理,目前有三种处理模式protect、restrict和shutdown。

Protect模式将报文丢弃,restrict模式将报文丢弃和trap告警(收到非法报文两分钟内告警),shutdown模式除restrict模式的动作还会将端口shutdown。

注:

如果一个MAC地址或IP地址是被deny掉的,即使这时未达到MAX的上限,该主机也不能通讯。

端口安全不能与802.1X或者mac认证共同启用。

端口安全不能与防ARP泛洪共同启用。

1.2端口安全配置

表1-1配置端口安全

操作

命令

备注

进入全局配置模式

configureterminal

-

进入端口配置模式

interfaceethernetdevice/slot/port

开启/关闭端口安全

port-security{enable|disable},缺省为disable

必选

配置端口的MAC绑定规则

port-security{permit|denymac-addressmac-address},缺省没有配置

可选

设置端口的MAC+VLAN绑定规则

port-security{permit|denymac-addressmac-addressvlan-idvlanId},缺省没有配置

配置端口的MAC+IP绑定规则

port-security{permit|denymac-addressmac-addressip-addressip-address},缺省没有配置

配置端口的IP规则

port-security{permint|denyip-addressstart-ip-address[toend-ip-address]},缺省没有配置

配置端口的MAX规则

port-securitymaximum{0-4000},缺省为0

打开端口的STICKY功能

port-securitypermitmac-addresssticky,缺省为关闭

配置端口的MACSTICKY规则

port-securitypermitmac-addresssticky{mac-address},缺省没有配置

配置端口的MAC+VLANSTICKY规则

port-securitypermitmac-addresssticky{mac-address}vlan-id{vlanId},缺省没有配置

配置端口的地址老化时间(分钟)

port-securityagingtime{0-1440},缺省为1分钟

启用端口的静态地址老化功能

port-securityagingstatic,缺省没有启用

配置端口收到非法报文(匹配deny规则或者超过MAX最大值)时的处理方式

port-securityviolation{protect|restrict|shutdown},缺省为protect

protect,丢弃非法报文

restrict,丢弃非法报文和trap告警

shutdown,丢弃非法报文和trap告警

并将端口shutdown

配置端口shutown后自动恢复功能

port-securityrecovery,默认为关闭

配置端口shutown后自动恢复时间

port-securityrecoverytime<

value>

,默认为5分钟

删除端口指定的MAC地址

noport-securityactive-address{all|configured|learned}

all,删除所有MAC地址

configured,删除MAX规则外学习到的MAC地址

learned,删除MAX规则学习到的MAC地址

删除端口上所有的端口安全相关的配置

noport-securityall

显示端口的配置情况

showport-security[interfacelist]

显示端口的MAC规则配置情况

showport-securitymac-address[interfacelist]

显示端口的IP规则配置情况

showport-securityip-address[interfacelist]

显示端口当前激活的MAC地址情况

showport-securityactive-address[configured|learned][interfacelist]

显示端口shutdown后自动恢复的配置

showport-securityrecovery[interfacelist]

sticky功能若要生效,需打开端口安全功能及MAX规则数配置不为0。

当打开该功能时,会将打开前MAX规则中学到的动态地址转化为sticky规则,并保存于运行文件中。

当关闭该功能时,会将已学到的sticky规则一同删除。

端口下的sticky规则条目数不能超过配置的MAX规则数。

若设备重启前,将配置文件保存,那么设备启动后,端口下重启前保存的STICKY规则会自动生效。

当端口shutdown后可以通过两种方法恢复,1,将端口shutdown和noshutdown,2,配置shutown后自动恢复。

收到非法报文时trap告警不会马上发生,将在两分钟内发出trap告警。

1.3配置举例

1、开启端口8~10的端口安全功能,配置端口8允许源mac地址为00:

01:

7f:

00:

22:

33的报文通过:

Switch(config)#interfacerangeethernet0/0/8toethernet0/0/10

Switch(config-if-range)#port-securityenable

Switch(config-if-range)#interfaceethernet0/0/8

Switch(config-if-ethernet-0/0/8)#port-securitypermitmac-address00:

0:

33

2、配置端口9允许源mac地址为00:

44:

55:

66,vlan为3的报文通过。

配置端口10丢弃源mac地址为00:

23:

56:

89,源IP为192.168.1.88的报文:

Switch(config-if-ethernet-0/0/8)#interfaceethernet0/0/9

Switch(config-if-ethernet-0/0/9)#port-securitypermitmac-address00:

4

4:

66vlan-id3

Switch(config-if-ethernet-0/0/9)#interfaceethernet0/0/10

Switch(config-if-ethernet-0/0/10)#port-securitydenymac-address00:

23

:

89ip-address192.168.1.88

3、在端口8上,禁止通信源IP从192.168.1.100到192.168.1.200之间的所有报文:

Switch(config-if-ethernet-0/0/10)#interfaceethernet0/0/8

Switch(config-if-ethernet-0/0/8)#port-securitydenyip-address192.168.1.100

to192.168.1.200

4、开启端口9的mac+vlansticky功能:

Switch(config-if-ethernet-0/0/8)interfaceethernet0/0/9

Switch(config-if-ethernet-0/0/9)#port-securitypermitmac-addresssticky

5、开启10端口的静态地址老化功能:

Switch(config-if-ethernet-0/0/9)#ie0/0/10

Switch(config-if-ethernet-0/0/10)#port-securityagingstatic

6、配置端口8,9,10的max规则各500条,老化时间为5分钟,配置丢弃所有匹配deny规则的报文并发送警告和shutdown端口,端口shutdown后3分钟重新开启。

Switch(config-if-ethernet-0/0/10)#interfacerangeethernet0/0/8toethernet

0/0/10

Switch(config-if-range)#port-securitymaximum500

Switch(config-if-range)#port-securityagingtime5

Switch(config-if-range)#port-securityviolationshutdown

Switch(config-if-range)#port-securityrecovery

Switch(config-if-range)#port-securityrecoverytime3

Switch(config-if-range)#exit

Switch(config)#showport-securityinterfaceethernet0/0/8to0/0/10

tips:

ViMode(violationmode)AT(AgingTime)AS(AgingStatic)ST(shutdown)

PortStatusMaxNumUserNumViModeAT(min)ASStickyST

e0/0/8enable5000shutdown5disabledisableFALSE

e0/0/9enable5000shutdown5disableenableFALSE

e0/0/10enable5000shutdown5enabledisableFALSE

Totalentries:

3

7、配置完成后显示相应的配置信息。

Switch(config)#showport-securityip-address

Configurationofrules:

PortActionStartipaddressEndipaddress

e0/0/8deny192.168.1.100192.168.1.200

Totalentries:

1

Switch(config)#showport-securitymac-address

PortActionMacaddressVIDIPAddrConfigType

e0/0/8permit00:

33N/AN/AMAC

e0/0/9permit00:

663N/AMAC+VLAN

e0/0/10deny00:

89N/A192.168.1.88MAC+IP

Switch(config)#showport-securityrecoveryinterfaceethernet0/0/8

to0/0/10

Autorecoveryconfigurations:

PortAutorecoveryTime(min)

e0/0/8enable3

e0/0/9enable3

e0/0/10enable3

Switch(config)#showrunning-configinterfaceethernet0/0/8

Buildingconfiguration...

!

[ethernet0/0/8]

port-securityenable

port-securitymaximum500

port-securityagingtime5

port-securityviolationshutdown

port-securityrecovery

port-securityrecoverytime3

port-securitypermitmac-address00:

33

port-securitydenyip-address192.168.1.100to192.168.1.200

end

Switch(config)#showrunning-configinterfaceethernet0/0/9

[ethernet0/0/9]

port-securitypermitmac-addresssticky

Switch(config)#showrunning-configinterfaceethernet0/0/10

[ethernet0/0/10]

port-securityagingstatic

port-securitydenymac-address00:

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 语文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1