一,交换机的简要配置

(一),交换机的基本配置命令

<Huawei> display current-configuration  //查看当前有效配置
<Huawei>display  version   //查看版本信息
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.110 (S5700 V200R001C00)
备注:设备系统,版本,型号
Copyright (c) 2000-2011 HUAWEI TECH CO., LTD

Quidway S5700-28C-HI Routing Switch uptime is 0 week, 0 day, 1 hour, 25 minutes
                           备注:查看设备的开启时长(week=周,day=天,hour=小时,minutes=分钟)


[SW1-GigabitEthernet0/0/1]undo shutdown    //启用接口
Feb 16 2023 15:48:28-08:00 SW1 %%01PHY/1/PHY(l)[3]:GigabitEthernet0/0/1: cha
nge status to up 接口已开启


[SW1-GigabitEthernet0/0/1]shutdown        //禁用接口
Feb 16 2023 15:51:16-08:00 SW1 %%01PHY/1/PHY(l)[4]:GigabitEthernet0/0/1: cha
nge status to down 接口已关闭


进入终端,设置密码(console口令,本地访问口令)
[SW1]user-interface console 0 //进入终端进行配置 [SW1-ui-console0]authentication-mode password //启用密码认证 [SW1-ui-console0]set authentication password cipher 123456 //设置终端密码为123456(密文) 想要验证密码,在用户视图中直接敲入quit退出,再按回车键提示输入密码

<Huawei>language-mode English //切换语言模式为英文

[SW1]user-interface console 0 //进终端进行配置

[SW1-ui-console0]idle-timeout 1 //设置闲置会话时间为1分钟

<SW1>reset saved-configuration   //恢复出厂设置
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:y    //是否要恢复出厂设置
..........
Info: Succeeded in clearing the configuration in the device.
<SW1>reboot               //重启终端
Warning: All the configuration will be saved to the configuration file for the n
ext startup:, Continue?[Y/N]:n      //提示是否保存当前配置,选择是Y/否N
...........
System will reboot! Continue?[Y/N]:y   //提示设备是否要重启,选择是Y/否N

5、辟邪剑谱

<Huawei>u t m关闭日志提示
<Huawei>dis ver显示版本
<Huawei>dis cu查看当前配置信息
<Huawei>sy进入系统视图
[Huawei]sy S1更改设备名为S1
[S1]int g0/0/1进入接口
[S1-GigabitEthernet0/0/1]sh禁用接口
[S1-GigabitEthernet0/0/1]undo sh启用接口
Ctrl+z返回用户视图
[S1]user-in co 0进入console口
[S1-ui-console0]auth p启用密码认证
[S1-ui-console0]set a p c 123设置密码
[S1-ui-console0]ret返回到用户视图
<S1>sa保存
<S1>quit 
Please Press ENTER.
Login authentication
Password:输入123
[S1]user-in co 0进入console口
[S1-ui-console0]i 1440设置超时时间24小时
<S1>res sa
Warning: The action will delete the saved configuration in the device.
The configuration will be erased to reconfigure. Continue? [Y/N]:y确认恢复

<S1>reboot 
ext startup:, Continue?[Y/N]:n不保存
System will reboot! Continue?[Y/N]:y重启

 


(二),主要命令:

 

1.给设备配置IP地址:

SW1:(以上图标注为准) [Huawei]
interface Vlanif 1 //进入虚接口Vlanif1 [Huawei-Vlanif1]ip address 192.168.10.100 24 //配置IP地址 PC:(以上图标注为准,也是一台交换机) [Huawei]interface Vlanif 1 //进入虚接口Vlanif1 [Huawei-Vlanif1]ip address 192.168.10.200 24 //配置IP地址 **<SW1>display interface Vlanif 1 //查询IP地址信息**

2.测试两台设备的网络连通性:

SW1:
<Huawei>ping 192.168.10.200
PC:(以上图标注为准,也是一台交换机)
<Huawei>ping 192.168.10.100

3.实施远程:

SW1:
[SW1]user-interface vty 0 4 //进入远程配置视图,允许5个会话远程访问
[SW1-ui-vty0-4]authentication-mode password //启用密码认证模式
[SW1-ui-vty0-4]set authentication password cipher 123456 //设置密文密码为123456
[SW1-ui-vty0-4]user privilege level 3 //设置权限级别,默认为权限0参观级,3为管理级


PC:(以上图标注为准,也是一台交换机)
<huawei> telnet 192.168.10.100
Password:

注:telnet 远程管理协议,端口号 23

 

路由器的基本配置:

配置PC1设备的网关地址:
[Huawei]interface GigabitEthernet 0/0/0      //进入接口视图
[Huawei-GigabitEthernet0/0/0]ip address 192.168.10.254 24  //配置接口IP地址
配置PC2设备的网关地址:
[Huawei]interface GigabitEthernet 0/0/1     //进入接口视图
[Huawei-GigabitEthernet0/0/1]ip address 192.168.20.254 24  //配置接口IP地址

确认IP地址是否配置成功
[Huawei-GigabitEthernet0/0/0]display  this
[Huawei-GigabitEthernet0/0/1]display  this
<Huawei>display ip interface brief//查看接口IP地址简短信息
<Huawei>display ip routing-table //查看路由表信息

远程控制也是和交换机类似,这里就不做过多的赘述了......

 

交换机的总结:

 

posted on 2023-08-23 17:58  成为一代王者的星辰  阅读(13)  评论(0编辑  收藏  举报