- 修改路由器/交换机名
<R1>system-view
Enter system view, return user view with Ctrl+Z.
[R1]sysname Huawei
[Huawei]
- 端口配置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]
- 修改系统时间
//先配置时区,格式为 时区名 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>