一、交换机基本配置.
1、language-mode Chinese //切换语言模式为中文
<Huawei>language-mode Chinese
Change language mode, confirm? [Y/N] y
备注:更改语言模式,确认吗?Y确认
提示:改变语言模式成功。
<Huawei>language-mode English //切换语言模式为英文
2、undo terminal monitor //取消终端提示
<SW2>undo terminal monitor //取消终端提示 terminal 终止 Info: Current terminal monitor is off. 提醒:当前终端提示已经关闭 <SW2>terminal monitor //开启终端提示 Info: Current terminal monitor is on. 提示:当前终端提示已经开启 <SW2>u t m //取消终端提示简写 Info: Current terminal monitor is off.
3、设置交换机闲置会话时间
user-interface console 0 //进终端进行配置
[SW1]user-interface console 0 //进终端进行配置 [SW1-ui-console0]idle-timeout 1 //设置闲置会话时间为1分钟
4、恢复出厂设置
<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
三、路由器的相关知识
1) 路由:数据从一个网络到另外一个网络之间转发数据包的过程称为路由
2) 路由器:连接不同网络,实现不同网段之间的通信
3)路由表:路由器选择数据的传输路径的依据**
4) 路由器的工作原理
路由器接收数据包
检查数据包中的目标IP
在路由表中查找与目标IP相匹配的路由条目
路由表中找到与目标IP相匹配的路由条目后,按照此条目所指的方向将数据转发出去
四、路由器的基本配置

配置思路:
1、给PC1、PC2配置IP地址、子网掩码、网关地址
2、给路由器接口配置IP地址
配置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地址简短信息
3、验证结果:测试PC1和PC2的网络连通性
在PC1上进行操作:ping 192.168.20.1 在PC2上进行操作:ping 192.168.10.1
查看路由表
根据以上的拓扑图,可以查看路由器的路由表
<Huawei>display ip routing-table
