2024年8月2日 11:53:01

This commit is contained in:
Noriu 2024-08-02 11:52:57 +08:00
parent d132727deb
commit ccda41e37e

View File

@ -1,15 +1,13 @@
# 交换机 # 交换机
### 一、 组建局域网的主要设备 ### 1、 作用及类型
##### 1、 交换机
- 作用: - 作用:
- 用 于将多台计算机/交换机连接到一起,组建网络。 - 用 于将多台计算机/交换机连接到一起,组建网络。
- 连接电脑组建局域网(组建局域网的主要设备) - 连接电脑组建局域网(组建局域网的主要设备)
- 类型限制、隔离、ALC - 类型限制、隔离、ALC
##### 2、 eNSP ### 2、 eNSP
1. 交换机、路由器、防火墙、WIFI、电脑 1. 交换机、路由器、防火墙、WIFI、电脑
@ -19,24 +17,28 @@
> >
> 通过文本工具添加标签,右击文本文字可调整大小、字体、背景颜色 > 通过文本工具添加标签,右击文本文字可调整大小、字体、背景颜色
##### 3、 拓扑文件保存 ### 3、 拓扑文件保存
##### 4、 配置视图 ### 4、 配置视图
1. 连接物理设备 1. ##### 连接物理设备
- 使用console线一端连接交换机console口另一端连接计算机USB或com、Putty、SecureCRT、Xshell等终端程序进入设备的配置界面。 - 使用console线一端连接交换机console口另一端连接计算机USB或com、Putty、SecureCRT、Xshell等终端程序进入设备的配置界面。
2. 视图 2. ##### 视图
- 用户视图:<Hwuwei> - 用户视图:<Hwuwei>
- 系统视图:[Hwuwei] - 系统视图:[Hwuwei]
- 命令system-view简写sy - 命令system-view简写sy
- 作用:配置设备的系统参数 - 作用:配置设备的系统参数
- quite退回到上一个视图逐级退回 - quite退回到上一个视图逐级退回
- returnctrl+z直接退回到用户视图 - returnctrl+z直接退回到用户视图
3. 接口视图 3. ##### 接口视图
- 命令interface GigabitEtherent 0/0/1简写int g0/0/1 - 命令interface GigabitEtherent 0/0/1简写int g0/0/1
4. 协议视图 4. ##### 协议视图
5. 操作技巧 5. ##### 操作技巧
- 可以查看help - 可以查看help
- 查命令的全拼sys? - 查命令的全拼sys?
- 查后面能跟什么命令interface ? - 查后面能跟什么命令interface ?
@ -44,33 +46,45 @@
- 命令简写sy、int g0/0/1 - 命令简写sy、int g0/0/1
- 不区分大小写 - 不区分大小写
##### 5、 交换机的基本配置命令 ### 5、 交换机的基本配置命令
1. <Huawei>display version查看版本信息 1. ##### 查看版本信息
2. <Huawei>display current-configuration查看华为网络设备的当前配置简写dis cu > <Huawei>display version
- 回车翻行,空格翻页 2. ##### 查看华为网络设备的当前配置
3. display this查看当前视图的配置 > <Huawei>display current-configuration //简写dis cu
>
> 注:回车翻行,空格翻页
3. ##### 查看当前视图的配置
> [Huawei]display this > [Huawei]display this
> >
> [Huawei-GigabitEthernet0/0/1]display this > [Huawei-GigabitEthernet0/0/1]display this
4. sysname更改设备名称需要在用户视图save保存 4. ##### 更改设备名称需要在用户视图save保存
> [Huawei]sysname SW1 //修改设备名为SW1简写sy SW1 > [Huawei]sysname SW1 //修改设备名为SW1简写sy SW1
> >
> [SW1]display this //查看当前视图有效配置 > [SW1]display this //查看当前视图有效配置
5. <Huawei>reboot重启 5. ##### 重启
6. [Huawei-GigabitEthernet0/0/3]shutdown关闭端口禁用端口 > <Huawei>reboot
[Huawei-GigabitEthernet0/0/3]undo shutdown启用端口 6. ##### 端口的开关
7. 设置交换机密码 - 关闭端口(禁用端口)
> [Huawei-GigabitEthernet0/0/3]shutdown
- 启用端口
> [Huawei-GigabitEthernet0/0/3]undo shutdown
7. ##### 设置交换机密码
> [Huawei]user-interface console 0 > [Huawei]user-interface console 0
> >
@ -126,7 +140,7 @@
[Huawei-ui-console0]set a p s 123456 [Huawei-ui-console0]set a p s 123456
``` ```
8. 设置交换机闲置会话时间 8. ##### 设置交换机闲置会话时间
- [Huawei-ui-console0]idle-timeout 1 //设置闲置会话时间为1分钟 - [Huawei-ui-console0]idle-timeout 1 //设置闲置会话时间为1分钟
@ -151,11 +165,11 @@
[Huawei-ui-console0]i 1440 [Huawei-ui-console0]i 1440
``` ```
9. 关闭终端提示 9. ##### 关闭终端提示
> <Huawei>undo terminal monitor //缩写u t m > <Huawei>undo terminal monitor //缩写u t m
10. 恢复出厂默认设置 10. ##### 恢复出厂默认设置
> <Huawei>reset saved-configuration //简写res sa > <Huawei>reset saved-configuration //简写res sa