二层Port-security实验


实验一:Port-security1.SW1和SW2创建VLAN10,R1-R4划分到VLAN10,静态分配IP2. SW之间的Fa0/24
shutdown;Fa0/23指定成access,并且划分到VLAN10
3.在SW2的Fa0/23接口开启Port-security,指定接口最多可以学习3个MAC地址.观察SW2
Fa0/23的状态
4.实验port-security的三种违规动作5.实验port-security的三种mac-address的学习方式6.设置port-security动态学习到的MAC地址的aging
time为1min
实验完成,还原配置R1的配置R1(config)#int f0/0R1(config-if)#ip add 10.10.1.1 255.255.255.0R1(config-if)#no shR1(config)#sh int f0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is 0002.4b1e.efe0 (bia 0002.4b1e.efe0)R2的配置R2(config)#int f0/0R2(config-if)#ip add 10.10.1.2 255.255.255.0R2(config-if)#no shR2(config)#sh int f0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is 0013.8046.8e40 (bia 0013.8046.8e40)R3的配置R3(config)#int f0/0R3(config-if)#ip add 10.10.1.3 255.255.255.0R3(config-if)#no shR2(config)#sh int f0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is000c.ce3a.b7e0 (bia 000c.ce3a.b7e0)R4的配置R4(config)#int e0/0R4(config-if)#ip add 10.10.1.4 255.255.255.0R4(config-if)#no shSW1的配置SW1(config)# vlan 10SW1(config)#int range f0/1 – 3SW1(config-if)#switchport mode accessSW1(config-if)#switchport access vlan 10SW2的配置SW2(config)# vlan 10SW2(config)#int range f0/4SW2(config-if)#switchport mode accessSW2(config-if)#switchport access vlan 10SW2(config)#
interface fastethernet0/23SW2(config-if)#
switchport mode accessSW2(config-if)#
switchport port-securitySW2(config-if)#
switchport port-security maximum 3SW2(config-if)# switchport port-security aging time 1 // 改老化时间1minSW2(config-if)# switchport port-security aging type {absolute | inactivity} // 缺省老化时间300sSW2#sh port-security int f0/23 Port Security : Enabled Port Status : Secure-shutdown Violation Mode : Shutdown Aging Time : 1 mins Aging Type : Absolute SecureStatic Address Aging : Disabled Maximum MAC Addresses : 3 Total MAC Addresses : 2 Configured MAC Addresses : 2 Sticky MAC Addresses : 0 Last Source Address:Vlan : 0013.8046.8e40:10 Security Violation Count : 1SW2(config-if)#
switchport port-security mac-address stickySW2(config-if)#
switchport port-security mac-address 0002.免费云主机域名4b1e.efe0SW2(config-if)# switchport port-security mac-address0013.8046.8e40 *Mar 1 02:30:49.277: %PM-4-ERR_DISABLE: psecure-violation error detected on Fa0/23, putting Fa0/23 in err-disable stateSW2#sh int f0/23 status err-disabled Port Name StatusReason Err-disabled Vlans Fa0/23 err-disabled psecure-violationSW2(config-if)# switchport port-securityviolation restrict // 违反行为改成restrict,接口不会关闭,弹出log,多余的帧丢弃SW2(config-if)#sh SW2(config-if)#no sh *Mar 1 02:16:28.422: %PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0002.4b1e.efe0 on port FastEthernet0/23.SW2(config-if)# switchport port-securityviolation protected // 违反行为改成protected,接口不会关闭,多余的帧丢弃SW2(config-if)#sh SW2(config-if)#no sh

相关推荐: Linux系统调用如何实现

本文小编为大家详细介绍“Linux系统调用如何实现”,内容详细,步骤清晰,细节处理妥当,希望这篇“Linux系统调用如何实现”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。一、通过 glibc 提供的库函数glibc 是 linux …

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 01/26 12:43
Next 01/26 12:43