认识交换机、交换机组网、基本配置--网络运维基础

交换机

交换机是一种用于电(光)设备信号转发的网络设备,用于将多台计算机/交换机连接到一起,组建网络。
交换机负责为其中任意两台计算机提供独享线路进行通信
在这里插入图片描述

非网管型交换机

非网管交换机也称为即插即用交换机
①即插即用,无需(也不支持)对设备进行配置
②使用简单、价格便宜

网管型交换机

网管型交换机也称为智能交换机
①能实现网段划分、流量控制等更多高级功能
②支持对设备做高级配置,价格贵(数千、上万元)
在这里插入图片描述
常见路由交换商:华为、思科、华三、普联、水星

交换组网的配置实现

建立简化拓扑图
在这里插入图片描述
交换机LSW1(暂时无需配置)
配置计算机PC1 、计算机PC2
在这里插入图片描述
确认交换机LWS1、计算机PC1-1和PC1-2已启动,从任一方能ping通任一方
在这里插入图片描述

交换机基本配置

在这里插入图片描述

华为交换机的几种命令行配置

华为VRP(Versatile Routing Platform)网络操作系统
在这里插入图片描述

切换不同视图

<Huawei>system	                       //用户视图
<Huawei>system-view 					//切进系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/1  //切进接口视图
[Huawei-GigabitEthernet0/0/1]            //接口视图

视图退回操作

[Huawei-GigabitEthernet0/0/1]quit         //quit退回到前一个视图
[Huawei]quit
<Huawei>
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]return       //return快速返回到用户视图
<Huawei> 

操作技巧

命令行特性:
命令可简写
按TAB键自动补全
按?能获取帮助信息
命令不区分大小
在这里插入图片描述

查看VRP系统版本

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, 0 hour, 39 minutes

配置设备名

sysname命令
作用:可以再众多交换机中区分出来
命名规范:部门、位置、机架编号
需要在 系统视图 下进行

<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname sw1
[sw1]

启用禁用接口

接口默认开启,可以手动关闭以排查网络故障
在指定接口视图下
①执行shutdow 命令可以手动禁用此接口
②执行undo shutdow命令可以恢复启用此接口

<huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/1   //进入需要关闭或打开的接口视图
[Huawei-GigabitEthernet0/0/1]shutdown     //关闭接口
[Huawei-GigabitEthernet0/0/1]
Aug  6 2022 18:30:39-08:00 Huawei %%01PHY/1/PHY(l)[14]:    GigabitEthernet0/0/1:
 change status to down

<huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]interface GigabitEthernet 0/0/1   //进入需要关闭或打开的接口视图
[Huawei-GigabitEthernet0/0/1]undo shutdown  //打开接口
[Huawei-GigabitEthernet0/0/1]
Aug  6 2022 18:32:45-08:00 Huawei %%01PHY/1/PHY(l)[19]:    GigabitEthernet0/0/1:
 change status to up

查看交换机的配置

display current-configuration查看当前交 换机有效配置
display this 查看当前视图配置

<Huawei>display current-configuration  //查看当前有效配置
#
sysname Huawei
#
cluster enable
ntdp enable
ndp enable   ......

[Huawei]display this   //在系统视图查看系统视图配置
#
sysname Huawei
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
return

保存交换机配置

<Huawei>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y      //输入Y确认保存
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Aug  6 2022 18:00:37-08:00 Huawei %%01CFM/4/SAVE(l)[6]:The user chose Y when dec
iding whether to save the configuration to the device.
Now saving the current configuration to the slot 0.
Save the configuration successfully.   //保存成功

实用配置技巧

<Huawei>language-mode Chinese 	  //切换语言模式为中文 (不建议)
<Huawei>undo terminal monitor     // 取消终端提示信息

注:取消终端提示信息,只对当前终端有效,用户重新登录自动取消

更改自动退出超时

终端会话10分钟后会自动退出
调试设备时,可以延长超时时间(比如24小时)
注:为了安全,调试完毕后需要设置短的超时时间

<Huawei>system-view   
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0   //进入console控制端口
[Huawei-ui-console0]idle-timeout 1440  //设置限制超时时间为1440分钟
[Huawei-ui-console0]

注:设置 idle-timeout 0时 将取消闲置超时时间。

重启设备

在这里插入图片描述

设置终端密码

交换机终端登录默认无密码
为了安全,需要添加认证密码

<Huawei>system-view    
Enter system view, return user view with Ctrl+Z.
[Huawei]user-interface console 0     //进入console端口配置
[Huawei-ui-console0]authentication password   //启用密码认证
[Huawei-ui-console0]set authentication password cipher 456  //设置密文密码456
[Huawei-ui-console0]return     //退回到用户视图
<Huawei>q User interface con0 is available

Please Press ENTER.

Login authentication

Password:     // 输入秘密456  密码是隐藏的
<Huawei>

恢复出厂设置

恢复出厂设置适用于系统配置紊乱/错误、修复不便等情况
用户视图 reset saved-configuration 恢复然后重启即可

<Huawei>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  //提示是否恢复选y
Warning: Now clearing the configuration in the device.
Aug  6 2022 18:23:02-08:00 Huawei %%01CFM/4/RST_CFG(l)[2]:The user chose Y when 
deciding whether to reset the saved configuration.
Info: Succeeded in clearing the configuration in the device.

总结:熟悉eNSP网络模拟平台,学会组建交换机网络,
学会华为智能交换机的基本配置操作
系统视图/用户视图、配置设备名、启用禁用接口
学会实用配置
设置秘密、会话闲置超时、取消终端提示信息、恢复出厂设置

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值