2

image.png场景

网络管理员要求您配置新交换机。在本练习中,您将使用一系列要求配置新交换机的初始设置、SSH 和端口安全。

要求

· 使用以下初始设置配置 S1 :

  • 主机名
  • 包括词语“警告 ”的标语
  • 控制台端口登录和密码 cisco
  • 加密使能密码 class
  • 加密明文密码
  • 管理接口编址
    · 使用以下设置配置 SSH 保护远程访问:
  • 域名 cisco.com
  • RSA 密钥对参数以支持 SSH 版本 2
  • 设置 SSH 版本 2
  • 用户 admin ,密码为 ccna
  • VTY 线路只接受 SSH 连接,并且使用本地登录进行身份验证
    · 配置端口安全功能以限制网络访问。
  • 禁用所有未使用的端口。
  • 将接口模式设置为接入模式。
  • 启用端口安全,使每个端口仅允许两台主机。
  • 在运行配置中记录 MAC 地址。
  • 确保在发生端口违规时禁用端口。
    -------------------------------------------------------------------------------------------------------------------· 使用以下初始设置配置 S1 :
  • 主机名
(confing)#hostname S1
  • 包括词语“警告 ”的标语
S1(config)#banner motd #Warning,unauthorized access is prohibited#
  • 控制台端口登录和密码 cisco
S1(config)#line vty 0 4
S1(config-line)#password cisco
S1(config-line)#login
S1(config-line)#exit
  • 加密使能密码 class
S1(config)#enable secret class
  • 加密明文密码
S1(config)#service password-encryption
  • 管理接口编址
S1(config)#interface vlan 1
S1(config-if)#ip address 10.10.10.2 255.255.255.0
S1(config-if)#no shutdown

· 使用以下设置配置 SSH 保护远程访问:

  • 域名 cisco.com
S1(config)#ip domain-name cisco.com
  • RSA 密钥对参数以支持 SSH 版本 2
S1(config)#crypto key generate rsa(生成一段密钥)
How many bits in the modulus [512]: 1024(选取长度为1024)
  • 设置 SSH 版本 2
S1(config)#ip ssh version 2
  • 用户 admin ,密码为 ccna
S1(config)#username admin secret ccna
  • VTY 线路只接受 SSH 连接,并且使用本地登录进行身份验证
S1(config)#line vty 0 4
S1(config-line)#login local
S1(config-line)#transport input ssh

· 配置端口安全功能以限制网络访问。

  • 禁用所有未使用的端口。
S1(config-if-range)#interface range f0/3-24,g0/1-2
S1(config-if-range)#shutdown
  • 将接口模式设置为接入模式。
S1(config)#interface range f0/1-2
S1(config-if-range)#switchport mode access
  • 启用端口安全,使每个端口仅允许两台主机。
S1(config-if-range)#switchport port-security
S1(config-if-range)#switchport port-security maximum 2
  • 在运行配置中记录 MAC 地址。
S1(config-if-range)#switchport port-security mac-address sticky
  • 确保在发生端口违规时禁用端口。
S1(config-if-range)#switchport port-security violation shutdown
posted @ 2024-07-27 21:43  短短max  阅读(31)  评论(0)    收藏  举报
//雪花飘落效果 //雪花飘落效果