华为交换机首次登录基本配置

admin 2024年11月14日23:01:50评论94 views字数 4009阅读13分21秒阅读模式

动动大拇指

华为交换机首次登录基本配置

快快关注哦

首次登录设备并进行基本配置
一、组网需求
    通过Console口首次登录设备后,对设备进行基本配置并配置通过STelnet远程登录的0 ~ 4号用户的级别为3级,认证方式为AAA认证。PC2与设备之间路由可达。
通过 Console 口首次登录设备后进行基本配置组网图
华为交换机首次登录基本配置
二、配置思路
    1. 通过Console口登录设备。
    2. 对设备进行基本配置。
操作步骤-1
    将Console通信电缆的DB9 (孔)插头插入PC机的串口( COM )中,再将RJ-45插头端 插入设备的Console口中。如果终端( PC端)上没有DB9串口,可通过DB9串口转USB 的转接线,将USB口连接到终端上。
操作步骤-2
    在PC1上打开终端仿真软件,新建连接,设置连接的接口以及通信参数。(此处使用第 三方软件PuTTY为例进行介绍)也可以使用Xshell或者CRT等配置工具。
1.单击“Session”,新建连接。
华为交换机首次登录基本配置
2.单击“Serial”,设置连接的接口以及通信参数。
  • 连接的接口请根据实际情况进行选择。例如,在Windows系统中,可以通过 在“设备管理器”中查看端口信息,选择连接的接口。
  • 设置终端软件的通信参数需与设备的缺省值保持一致,分别为:传输速率为 9600bit/s 、8位数据位、 1位停止位、无校验和无流控。
  • 单击“Open”。
华为交换机首次登录基本配置
备注说明:
    因为PC1端可能会存在多个连接接口,这里需要选择的是连接Console线缆的那个接口。一般情况下,选择的接口是COM1。
    若修改了设备的串口通信参数值,需要在PC端更换通信参数值与设备的串口通信参数值一 致后,重新连接。
操作步骤-3
    按Enter键,直到系统出现如下显示,提示用户先设置登录密码,然后再登录。
User interface con0 is availablePlease Press ENTER.Please configure the login password (8-16)Enter Password:Confirm Password: //设置Console口登录密码Info: Save the password now. Please wait for a moment.Info: The max number of VTY users is 21, the number of current VTY users online is 0 ,and total number of terminal users online is 1.The current login time is 2020-06-30 18:15:10+08:00<HUAWEI>
备注说明:
    第一次通过Console口登录设备时,须设置登录密码。登录成功后,串口的权限为默认的管理员权限。
    密码为字符串形式,区分大小写,长度范围是8 ~ 16字符。输入的密码至少包含两种类型字符,包括大写字母、小写字母、数字及特殊字符。特殊字符不包括“?”和空格。
    采用交互方式输入的密码不会在终端屏幕上显示出来。
     为充分保证设备安全,请用户定期修改密码。
操作步骤-4 对设备进行基本配置。
# 设置系统的日期、时间和时区。
    在配置设备的当前时间和日期前,需要执行clock timezone命令配置时区。如果不配置时区,执行clock datetime命令配置的是UTC时间。
<HUAWEI> clock timezone BJ add 08:00:00<HUAWEI> clock datetime 20:20:00 2023-05-08
# 设置设备名称和管理网口的IP地址。
<HUAWEI> system-view[HUAWEI] sysname Device[Device] interface meth 0/0/0[Device-MEth0/0/0] ip address 10.137.217.203 255.255.255.0[Device-MEth0/0/0] quit
# 假如设备的网关是10.137.217.1 ,配置设备的缺省路由。
Device] ip route-static 0.0.0.0 0 10.137.217.1
# 配置SSH客户端加密算法、 HMAC认证算法、密钥交换算法列表、公钥算法。
[Device] ssh server cipher aes128_ctr aes256_ctr aes192_ctr aes128_gcm aes256_gcm [Device] ssh server hmac sha2_256 sha2_512[Device] ssh server key-exchange dh_group_exchange_sha256 dh_group16_sha512[Device] ssh server publickey rsa_sha2_256 rsa_sha2_512[Device] ssh server dh-exchange min-len 3072
# 配置SSH用户与本地用户相关参数,实现通过SSH协议登录设备。
[Device] user-interface vty 0 4[Device-ui-vty0-4] authentication-mode aaa[Device-ui-vty0-4] user privilege level 3[Device-ui-vty0-4] protocol inbound ssh[Device-ui-vty0-4] quit[Device] aaa[Device-aaa] local-user admin123 passwordPlease conigure the login password (8-128)It is recommended that the password consist of four types of characters, including lowercase letters, uppercase letters, numerals and special characters.Please enter password:Please conirm password:Info: Add a new user.[Device-aaa] local-user admin123 service-type ssh[Device-aaa] local-user admin123 privilege level 3[Device-aaa] quit[Device] ssh user admin123[Device] ssh user admin123 authentication-type password[Device] ssh user admin123 service-type stelnet[Device] ssh server-source all-interface[Device] stelnet server enable
    完成以上配置后,终端PC2通过STelnet登录设备,此处以使用第三方软件OpenSSH和 Windows命令行提示符为例进行配置。
    ● OpenSSH软件的安装请参考该软件的安装说明。
    ● 使用OpenSSH软件从终端访问设备时,需要使用OpenSSH的命令,命令的使用可 以参见该软件的帮助文档。
    ● 只有安装了OpenSSH软件后, Windows命令行提示符才能识别OpenSSH相关命 令。
    进入Windows的命令行提示符,执行OpenSSH命令,登录设备。
C:UsersUser1> ssh [email protected][email protected]'s password:Info: The max number of VTY users is 21, the number of current VTY users online is 5, and total number of terminal users online is 5.The current login time is 2020-12-15 14:23:00.<Device>
Device的配置文件
#sysname Device#stelnet server enable#clock timezone BJ add 08:00:00#aaalocal-user admin123 password irreversible-cipher $1d$+,JS+))2$KVNj(.3`_5x0FCKGv}H&.kUTI`Ff&H*eBqO.ua>)$local-user admin123 service-type sshlocal-user admin123 privilege level 3#interface MEth0/0/0ip address 10.137.217.203 255.255.255.0#ip route-static 0.0.0.0 0.0.0.0 10.137.217.1#ssh user admin123ssh user admin123 authentication-type passwordssh user admin123 service-type stelnetssh server-source all-interface#ssh server cipher aes128_ctr aes256_ctr aes192_ctr aes128_gcm aes256_gcmssh server hmac sha2_256 sha2_512ssh server key-exchange dh_group_exchange_sha256 dh_group16_sha512ssh server publickey rsa_sha2_256 rsa_sha2_512ssh server dh-exchange min-len 3072#user-interface vty 0 4authentication-mode aaauser privilege level 3protocol inbound ssh#return
华为交换机首次登录基本配置

原文始发于微信公众号(老五说网络):华为交换机首次登录基本配置

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年11月14日23:01:50
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   华为交换机首次登录基本配置http://cn-sec.com/archives/3395857.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息