1、交换机
1)作用
用于将多台计算机/交换机连接到一起,组建网络
交换机负责为其中任意两台计算机提供独享线路进行通信
连接电脑组建局域网(组建局域网的主要设备)
2)类型
非网管(即插即用),便宜,不可管理
网管(智能),较贵,可以方便管理(隔离、限速、ACL、堆叠)
2、部署ENSP平台
1)eNSP:华为的网络设备仿真平台(交换机、路由器、防火墙、wifi、电脑)
2)进入物理交换机配置界面
使用console线一端连接交换机console口,另一端连接计算机USB或com口,Putty、SecureCRT、Xshell等终端程序进入设备的配置界面。
安装ENSP操作手册如下:
3、交换机组建局域网

4、认识配置视图4\
1)认识设备的配置视图
<Huawei>
用户视图 【查看运行状态】
[Huawei] 系统视图 【配置设备的系统参数】
[Huaiwei-GigabitEthernet0/0/1] 接口视图 【配置接口参数】
[Huawei-ospf-1] 协议视图 【配置XX协议】
2)切换视图
<Huawei> //用户视图
<Huawei> system-view //进入系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei] //系统视图
[Huawei] interface GigabitEthernet 0/0/1 //进入接口视图
[Huawei-GigabitEthernet0/0/1] //接口视图
3)退回视图
① quit 退回到上一个视图(逐级退回)
[Huawei-GigabitEthernet0/0/1]quit
[Huawei]quit
<Huawei>
② return或者 快捷键Ctrl+Z 直接返回到用户视图
[Huawei-GigabitEthernet0/0/3]return
<Huawei>
4)操作技巧
① 命令是不区分大小写的
② 按?可以获取到帮助信息
方法一:直接在视图上敲?(在该视图上能够敲的命令有哪些)
方法二:问命令全拼 (例如:s?)
方法三:问命令后面能跟哪些命令(例如:interface ?)
③ 命令可以简写
④ 按TAB键自动补全
5、交换机基本配置命令
1)、display current-configuration //查看当前有效配置
<Huawei> display current-configuration
2)、display version //查看系统版本信息
<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=分钟)
3)、sysname 设备名 //配置设备名称
[Huawei]sysname SW1 修改设备名为SW1 设备命名规范:部门-位置-机架编号[还是要根据公司规定的命名规范进行命名]
4)、undo shutdown //开启接口 shutdown //关闭接口
[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 接口已关闭
5)、save //保存配置
<Huawei>save The current configuration will be written to the device. 当前配置将要被写入到设备中 Are you sure to continue?[Y/N] y 你确定要继续嘛? ...... Save the configuration successfully. 配置保存成功 6)、重启设备 <Switch>reboot Info: The system is now comparing the configuration, please wait. Info: If want to reboot with saving diagnostic information, input 'N' and then e xecute 'reboot save diagnostic-information'. System will reboot! Continue?[Y/N]:y
7)、设置终端密码
[SW1] user-interface console 0 //进入终端进行配置 [SW1-ui-console0] authentication-mode password //启用密码认证 [SW1-ui-console0] set authentication password cipher 123456 //设置终端密码为123456(密文) 想要验证密码,在用户视图中直接敲入quit退出,再按回车键提示输入密码