# 设置设备的名称为LinuxZJ
system-view
[Huawei] sysname LinuxZJ
# 设置查看设备的时区,时间
clock timezone BJ add 8
clock datetime 18:20:30 2011-06-08
display clock
#telnet远程登录
system-view
[Huawei] aaa
[Huawei-aaa] local-user testadmin password cipher p@ssw0rd privilege level 15
[Huawei-aaa] quit
[Huawei]user-interface vty 0 4
[Huawei-vty0-4]authentication-mode aaa
#添加VLAN
system-view
[Huawei] vlan 128
[Huawei-vlan128] quit
#设定端口模式
system-view
[Huawei] int gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] port link-type access
#将端口加入Vlan
system-view
[Huawei] vlan 131
[Huawei-vlan131] port gigabitethernet 0/0/21 to 0/0/22
[Huawei-Vlan131] quit
#设置Trunk
system-view
[Huawei] interface GigabitEthernet 0/0/23
[Huawei-GigabitEthernet0/0/23] port link-type trunk
[Huawei-GigabitEthernet0/0/23] port trunk allow-pass vlan 128 131
#设置VLAN IP(管理IP)
system-view
[Huawei] interface vlanif 131
[Huawei-Vlanif131] ip address 192.168.0.253 255.255.255.0
[Huawei-Vlanif131] shutdown
[Huawei-Vlanif131] undo shutdown
#设置默认路由
system-view
[Huawei] ip route-static 0.0.0.0 0.0.0.0 192.168.0.254
#设定NTP
system-view
[Huawei] ntp-service unicast-peer 192.168.0.254
# 关闭WEB Server,dhcp
system-view
[Huawei] undo http server enable
[Huawei] undo dhcp enable
#保存配置
save
#相关查看命令
[Huawei] display version 显示VRP版本号
[Huawei] display current-configuration 显示系统运行配置信息
[Huawei] display saved-configuration 显示保存的配置信息
[Huawei] display interfaces brief 显示接口配置信息