配置并检验 S1 上的安全功能

来源:互联网 发布:虎牙直播app下载mac版 编辑:程序博客网 时间:2024/06/06 11:42
配置并检验 S1 上的安全功能
您将关闭未使用的端口,关闭交换机上运行的某些服务,并根据 MAC 地址配置端口安全。交换机可能会受到 MAC 地址表溢出攻击、 MAC 欺骗攻击和与交换机端口的未经授权连接。 您将会配置端口安全,限制可以在交换机端口上获知的 MAC 地址的数量,并在超出最大数量时禁用端口

第 1 步: 在 S1 上配置常规安全功能
a. 在 S1 上使用适当的安全警告消息配置当日消息 (MOTD) 标语
b. 在 S1 上发出 show ip interface brief 命令。 哪些物理端口是 up 状态?
端口 F0/5 和 F0/6
c. 关闭交换机上所有未使用的物理端口。 使用 interface range 命令
S1(config)# interface range f0/1 – 4
S1(config-if-range)# shutdown
S1(config-if-range)# interface range f0/7 – 24
S1(config-if-range)# shutdown
S1(config-if-range)# interface range g0/1 – 2
S1(config-if-range)# shutdown
d. 在 S1 上输入 show ip interface brief 命令。 端口 F0/1 到 F0/4 是什么状态?
管理性关闭
e. 发出 show ip http server status 命令
S1# show ip http server status
HTTP server status: Enabled
HTTP server port: 80
HTTP server authentication method: enable
HTTP server access class: 0
HTTP server base path: flash:html
HTTP server help root:
Maximum number of concurrent server connections allowed: 16
Server idle time-out: 180 seconds
Server life time-out: 180 seconds
Maximum number of requests allowed on a connection: 25
HTTP server active session modules: ALL
HTTP secure server capability: Present
HTTP secure server status: Enabled
HTTP secure server port: 443
HTTP secure server ciphersuite: 3des-ede-cbc-sha des-cbc-sha rc4-128-md5 rc4-128-sha
HTTP secure server client authentication: Disabled
HTTP secure server trustpoint:
HTTP secure server active session modules: ALL
HTTP 服务器状态是什么? _____ 启用
它使用了哪个服务器端口? ______ 80
HTTP 安全服务器状态是什么? ______ 启用
它使用了哪个安全服务器端口? ______ 443
f. HTTP 会话以明文形式发送所有信息。 您将禁用 S1 上运行的 HTTP 服务
S1(config)# no ip http server
g. 在 PC-A 上,打开与 http://172.16.99.11 的 Web 浏览器会话。 结果是什么?
网页无法打开。 现在 S1 拒绝 HTTP 连接
h. 从 PC-A,打开与 https://172.16.99.11 的安全 Web 浏览器会话。 接受证书。 不输入用户名,使用密码class 登录。 结果是什么?
安全 Web 会话成功

第 2 步: 配置并检验 S1 上的端口安全
a. 记录 R1 G0/1 的 MAC 地址。 从 R1 的 CLI,使用 show interface g0/1 命令并记录接口的 MAC 地址
R1# show interface g0/1
GigabitEthernet0/1 is up, line protocol is up
Hardware is CN Gigabit Ethernet, address is 30f7.0da3.1821 (bia3047.0da3.1821)
R1 G0/1 接口的 MAC 地址是什么?
在上述示例中, 它是 30f7.0da3.1821
b. 从 S1 的 CLI, 在特权 EXEC 模式下发出 show mac address-table 命令。 查找端口 F0/5 和 F0/6 的动态条目。 在下面记录这些条目
F0/5 MAC 地址: ___ 30f7.0da3.1821
F0/6 MAC 地址: ___ 00e0.b857.1ccd
c. 配置基本端口安全
注意:通常会在交换机的所有接入端口上执行此步骤。 此处的 F0/5 是一个示例
1 ) 从 S1 的 CLI,进入与 R1 连接的端口的接口配置模式
S1(config)# interface f0/5
2) 关闭端口
S1(config-if)# shutdown
3) 在 F0/5 上启用端口安全
S1(config-if)# switchport port-security
注意:输入 switchport port-security 命令,将最大 MAC 地址数量设置为 1 ,违规操作设置为“关闭” 
switchport port-security maximumswitchport port-security violation 命令可用于更改默认行为
4) 为第 2a 步中记录的 R1 G0/1 接口的 MAC 地址配置一个静态条目
S1(config-if)# switchport port-security mac-address xxxx.xxxx.xxxx(xxxx.xxxx.xxxx 是路由器 G0/1 接口的实际 MAC 地址)
注意:您还可以使用 switchport port-security mac-address sticky 命令将在端口上动态获知的所有安全 MAC 地址(直到达到设置的最大数量)添加到交换机的运行配置
5) 启用交换机端口
S1(config-if)# no shutdown
d. 通过发出 show port-security interface 命令检验 S1 F0/5 上的端口安全
S1# show port-security interface f0/5
Port Security : Enabled
Port Status : Secure-up
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses : 1
Total MAC Addresses : 1
Configured MAC Addresses : 1
Sticky MAC Addresses : 0
Last Source Address:Vlan : 0000.0000.0000:0
Security Violation Count : 0
F0/5 的端口状态是什么?
状态为“Secure-up”,表明此端口是安全的,但是状态和协议都为 up 状态
e. 在 R1 的命令提示符下,对 PC-A 执行 ping 操作以检验连接
R1# ping 172.16.99.3
f. 现在,您将通过更改路由器接口的 MAC 地址产生安全违规。 进入 G0/1 的接口配置模式并将其关闭
R1(config)# interface g0/1
R1(config-if)# shutdown
g. 使用地址 aaaa.bbbb.cccc,为接口配置一个新的 MAC 地址
R1(config-if)# mac-address aaaa.bbbb.cccc
h. 如果可能,在您执行此步骤的同时,在 S1 上打开一个控制台连接。 您将会看到在与 S1 的控制台连接上显示的各种消息,表示出现安全违规。 启用 R1 的 G0/1 接口
R1(config-if)# no shutdown
i. 在 R1 的特权 EXEC 模式下,对 PC-A 执行 ping 操作。 ping 是否成功? 原因是什么?
ping 操作失败,因为 S1 的 F0/5 端口因安全违规而关闭
j. 在交换机上,使用如下所示命令检验端口安全
S1# show port-security
k. 在路由器上关闭 G0/1 接口,从路由器上删除硬编码的 MAC 地址,并重新启用 G0/1 接口
R1(config-if)# shutdown
R1(config-if)# no mac-address aaaa.bbbb.cccc
R1(config-if)# no shutdown
l. 从 R1 ,再次对位于 172.16.99.3 的 PC-A 执行 ping 操作。 ping 是否成功? ____ 否
m. 发出 show interface f0/5 命令确定 ping 操作失败的原因。 记录您的调查结果
S1 的 F0/5 端口仍处于错误禁用状态
S1# show interface f0/5
FastEthernet0/5 is down, line protocol is down (err-disabled)
n. 清除 S1 F0/5 的错误禁用状态
S1(config)# interface f0/5
S1(config-if)# shutdown
S1(config-if)# no shutdown
注意: 当端口状态收敛时,可能会发生延迟
o.在S1上发出show interface f0/5命令以检验F0/5是否不再处于错误禁用模式
S1#show interface f0/5
FastEthernet0/5 is up, line protocol is up (connected)
p.在R1命令提示符下,再次对PC-A执行ping操作。您应该会成功。
0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 全切双眼皮伤口长包怎么办 鼻综合修复眼中心修太宽怎么办 fgo的id忘了怎么办 电脑下载模拟器显示内存不够怎么办 安逍遥模拟器运行一段时间卡怎么办 pos机微信支付签到失败怎么办 逆水寒fps过低怎么办 电脑卡怎么办怎么清理磁盘 苹果手机设置找不到了怎么办 苹果手机自动拨出电话怎么办 机械键盘灯坏了怎么办 黄金塔花叶子卷怎么办 办的宽带不用了怎么办 取卵后3天还出血怎么办 取卵后腹水怎么办9天了 取卵后第三天肚子涨第天移植怎么办 取卵移植后肚子涨怎么办 没有成熟的卵泡不排卵怎么办 产后9年妊娠纹痒怎么办 手机屏幕锁了忘记密码怎么办 电脑被黑客锁屏怎么办 r9解锁密码忘了怎么办 oppor9开机密码忘了怎么办 vivo手机忘记解锁图案怎么办 oppor9s解锁图案忘了怎么办 oppor9图案解锁忘记了怎么办 oppor9解锁图案忘了怎么办 oppor9s锁屏密码忘了怎么办 oppor9s忘记锁屏图案怎么办 oppor9忘记锁屏图案怎么办 电脑锁屏卡住了怎么办 dell电脑密码忘了怎么办 dell电脑密码忘记了怎么办 手机锁屏为什么打不开怎么办 手机图形解锁忘记了怎么办 华硕电脑锁屏了怎么办 5s忘记解锁密码怎么办 苹果手机密码忘记了怎么办 苹果手机iphone已停用怎么办 手机被停用怎么办不用电脑 激活锁是别人的怎么办