HCNP-路由交换:华为路由器系统配置命令

  1. 修改路由器/交换机名
<R1>system-view
Enter system view, return user view with Ctrl+Z.
[R1]sysname Huawei
[Huawei]
  1. 端口配置iIP
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/0
//方式一:使用掩码位数
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[Huawei-GigabitEthernet0/0/0]dis this
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.1.1 255.255.255.0 
#
return
//清除IP配置
[Huawei-GigabitEthernet0/0/0]undo ip add
//方式二:使用子网掩码
[Huawei-GigabitEthernet0/0/0]ip add 192.168.2.2 255.255.255.0
[Huawei-GigabitEthernet0/0/0]dis th
[V200R003C00]
#
interface GigabitEthernet0/0/0
 ip address 192.168.2.2 255.255.255.0 
#
return
[Huawei-GigabitEthernet0/0/0]
  1. 修改系统时间
//先配置时区,格式为 时区名 add或minus(东半球为add,西半球为minus)偏移时间量
<Huawei>clock timezone BJ add 08:00:00
#配置时间,格式为 时:分:秒 年--<Huawei>clock datetime 16:31:05 2019-08-13
<Huawei>dis clock
2019-08-13 16:31:10
Tuesday
Time Zone(BJ) : UTC+08:00

4. console口配置密码和用户级别

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
//进入到console口
[Huawei]user-interface console 0
//设置密码为helloworld
[Huawei-ui-console0]set authentication password cipher helloworld
[Huawei-ui-console0]dis th
[V200R003C00]
#
user-interface con 0
 authentication-mode password
 set authentication password cipher %$%$9|`7Nb>u,!u5uPXxU>f6,#`y[vNT"-;KF2FylOP;
fM6$#`|,%$%$
user-interface vty 0 4
user-interface vty 16 20
#
return
//退出,再登陆需要密码
[Huawei-ui-console0]
<Huawei>q
  Configuration console exit, please press any key to log on
Login authentication
Password:
<Huawei>

5. 设置链接空闲超时时间、分屏行数、历史命令缓存区大小

//进入console口
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface con 0
//设置空闲超时时间,格式   分 秒。若为0,则永不超时(不安全,只在实验环境下使用)
[Huawei-ui-console0]idle-timeout 1 30
//设置每屏显示行数,0表示不分屏
[Huawei-ui-console0]screen-length 24
//设置保留历史命令的条数
[Huawei-ui-console0]history-command max-size 5

6. 设置登陆前后显示信息

#没有登陆前后显示的信息
Login authentication
Password:
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
//设置登陆前显示信息
[Huawei]header login information "12345"
//设置登陆后显示信息
[Huawei]header shell information "Welcome!"
[Huawei]
<Huawei>q
  Configuration console exit, please press any key to log on
//显示登陆前信息
12345
Login authentication
//显示登陆后信息
Password:
Welcome!
<Huawei>
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值