交换机初始化配置

一、基本配置环境

1.设置时区  <huawei>  clock  timezone  BJ  add  08:00

2.设置时间  <huawei> clock  datetime  xx:xx:xx    xx-xx-xx

二、配置主机名

1.进入系统视图  <huawei> system-view

2.设置主机名  [huawei]  sysname  xxx

3.进入用户视图  [xxx]  quit

4.保存配置  <xxx> save

三、设置欢迎消息

1.设置登陆前的欢迎消息  [ huawei]  header  login  information  “hello”

2..设置登陆后的欢迎消息  [ huawei]  header  login  information  “hi”

四、设置终端登录

1.进入终端线配置视图  [huawei]  user- interface  console  0

2.设置终端登录用户级别  [huawei-ui-console0]user privilege level 15      //设置终端用户级别为15级 

3.设置终端用户验证方式

(1)不验证    [huawei-ui-console0]authentication-mode none 

(2)密码验证

  [huawei-ui-console0]  authentication-mode password 

  [huawei-ui-console0]  set authentication password cipher/simple XXXXX //设置明文(simple)或密文(cipher)保存的密码XXXXX 

(3)用户名+密码验证

   [huawei-ui-console0]authentication-mode aaa      //设置aaa认证

   [huawei-ui-console0]aaa        //进入aaa配置

   [huawei-aaa]local-user huawei service-type terminal    //创建终端登录用户huawei

   [huawei-aaa]llocal-user hauwei privilege level <0-15>    //设置终端登录用户级别

   [huawei-aaa]local-user huawei password cipher/simple xxx      //设置终端用户huawei明文或密文密码xxx

(4)设置超时时间  [huawei-ui-console0]idle-timeout  0  5 //设置超时时间为5秒 

四、设置远程登录

1.进入远程登录配置视图 

[huawei] user-interface vty 0 4  //开启5条虚拟线路(同时允许5用户远程访问设备)

[huawei-ui-vty0] 

2.设置远程登录用户级别  [huawei-ui-vty0]user privilege level 15    //设置远程登录用户级别为15级 

3.设置终端用户验证方式

(1)不验证  [huawei-ui-vty0]  authentication-mode none 

(2)密码验证 

   [huawei-ui-vty0]  authentication-mode password

   [huawei-ui-vty0]  set authentication password cipher/simple XXXXX      //设置明文(simple)或密文(cipher)保存的密码XXXXX 

(3)用户名+密码验证

   [huawei-ui-vty0]  authentication-mode aaa        //设置aaa认证

   [huawei-ui-vty0]  aaa      //进入aaa配置

   [huawei-aaa]  local-user huawei service-type telnet    //创建远程登录用户huawei

   [huawei-aaa]  local-user hauwei privilege level <0-15>  //设置远程登录用户级别

   [huawei-aaa]  local-user huawei password cipher/simple huawei    //设置远程用户huawei明文或密文密码huawei 

4.设置超时时间  [huawei-ui-vty0]  idle-timeout 0  5  //设置超时时间为5秒 

五、设置管理地址

1.进入管理端口配置视图

[huawei]  interface  vlan 1[huawei-Vlanif1] 

2.清除已有IP地址    [huawei-Vlanif1]  undo ip address    //清空原有的IP地址 

3.设置管理VLAN地址(可二选一)

[huawei-Vlanif1]  ip address 192.168.1.100 24    //设置IP地址并指定地址中的网络位(网络前缀)[huawei-Vlanif1]  ip address 192.168.1.100 255.255.255.0  //设置IP地址并指定子网掩码 

六、测试网络连通性

1.显示当前主机ip地址      ipconfig

2.显示交换机管理ip  [huawei]    display ip inter brief    //显示当前设备端口的简要信息 

3.测试网络连通性   

ping  -n  设置发送测试护具包的数量

ping  -t  设置测试发送数据包永远不停止,直到使用ctrl+c

ping  -l  设置发送测试数据包的大小

七、保存设置

<huawei>  save

The current configuration will be written to the device.Are you sure to continue?[Y/N]  y 

八、查看当前配置

<huawei>    display current-configuration    //查看当前配置

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。