您的位置:首页 > 其它

交换机端口安全配置

2016-12-14 14:45 441 查看
【实验名称】:交换机的端口安全
【实验目的】:掌握交换机的端口安全功能,控制用户的安全接入
【实验地点】:E1A-406
【实验时间】:11月28日
【需求分析】
针对交换机的所有端口,配置最大连接数为 1,针对 PC1 主机的接口进行 IP+MAC 地
址绑定。
【实验拓扑】



【实验设备】:
交换机一台
PC机一台
直连网线一台
【实验内容】:
第一步: 配置交换机端口的最大连接数限制
S3750#configure terminal
S3750(config)#interface range
fastethernet 0/1-23
S3750(config-if-range)#switchport
port-security
S3750(config-if-range)#switchport
port-secruity maximum 1
S3750(config-if-range)#switchport
port-secruity violation shutdown
第二步:验证 交换机端口的最大连接数限制
S3750#sh port-security
Secure Port
MaxSecureAddr(count) CurrentAddr(count) Security Action
------------------------
-------------------- ------------------ ---------------
FastEthernet 0/1 1 0 Shutdown
FastEthernet 0/2 1 0 Shutdown
FastEthernet 0/3 1 0 Shutdown
FastEthernet 0/4 1 0 Shutdown
FastEthernet 0/5 1 0 Shutdown
FastEthernet 0/6 1 0 Shutdown
FastEthernet 0/7 1 0 Shutdown
FastEthernet 0/8 1 0 Shutdown
FastEthernet 0/9 1 0 Shutdown
FastEthernet 0/10 1 0 Shutdown
FastEthernet 0/11 1 0
Shutdown
FastEthernet 0/12 1 0
Shutdown
FastEthernet 0/13 1 0
Shutdown
FastEthernet 0/14 1 0
Shutdown
FastEthernet 0/15 1 0
Shutdown
FastEthernet 0/16 1 0
Shutdown
FastEthernet 0/17 1 0
Shutdown
FastEthernet 0/18 1 0
Shutdown
FastEthernet 0/19 1 0
Shutdown
FastEthernet 0/20 1 0
Shutdown
FastEthernet 0/21 1 0
Shutdown
FastEthernet 0/22 1 0
Shutdown
FastEthernet 0/23 1 0
Shutdown
S3750#show port-security
interface fastEthernet 0/1
Interface : FastEthernet 0/1
Port Security : Enabled
Port status : up
Violation mode : Shutdown
Maximum MAC Addresses : 1
Total MAC Addresses : 0
Configured MAC Addresses : 0
Aging time : 0 mins
SecureStatic address aging :
Disabled
第三步:配置交换机端口的MAC与IP地址绑定
查看主机的IP和MAC地址信息
在主机上打开CMD命令提示符窗口,执行ipconfig /all命令
配置交换机端口的地址绑定
S3750#configure terminal
S3750(config)#interface
fastethernet 0/3
S3750(config-if)#switchport
port-security
S3750(config-if)#switchport
port-security mac-address 0006.1bde.13b4 ip-address 172.16.1.55
第四步:查看地址安全绑定配置
S3750#sh port-security
address all
Vlan Port Arp-Check Mac
Address IP Address Type Remaining Age(mins)
---- -----------------------
---------- -------------- --------------- ---------- -------------------
1 FastEthernet 0/3 Disabled
0006.1bde.13b4 172.16.1.55 Configured -
S3750#sh port-security
address interface fa0/3
Vlan Mac Address IP Address
Type Port Remaining Age(mins)
---- ---------------
--------------- ---------- ----------------------- -------------------
1 0006.1bde.13b4 172.16.1.55
Configured FastEthernet 0/3 -
第五步:配置交换机端口的IP地址绑定
S3750(config)#int
fastEthernet 0/2
S3750(config-if)#switchport
port-security ip-address 10.1.1.1
S3750#show port-security
address all
Vlan Port Arp-Check Mac
Address IP Address Type Remaining Age(mins)
【实验结果】:
给每个接口设置的最大接口数为4
给0/3接口绑定IP 为172.28.15.6 MAC地址为c89c.dc22.61c6
给0/10接口绑定IP为172.28.15.6
如下图所示:








内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  交换机 count interface