目录
双绞线
线序规范
T568A:白绿、绿、白橙、蓝、白蓝、橙、白棕、棕
T568B:白橙、橙、白绿、蓝、白蓝、绿、白棕、棕
1、2芯发送数据,3、6芯接收数据
传输速度
类型 | 标识 | 传输速率 | 备注 |
五类 | cat5 | 100Mbps | |
超五类 | cat5e | 1000Mbps(1Gbps) | 可达千兆常用百兆网络 |
六类 | cat6 | 1000Mbps(1Gbps) | |
超六类 | cat6e | 10000Mbps(10Gbps) | 可达万兆常用千兆网络 |
七类 | cat7e | 10000Mbps(10Gbps) |
配置视图
建立配置连接
软件连接:Putty、SecureCRT、Xshell等
硬件连接:计算机com/usb口 --> Console线 --> 交换机Console口
命令行配置视图
<Huawei> | 用户视图 | 查看运行状态或其他参数 |
[Huawei] | 系统视图 | 配置设备的系统参数 |
[Huawei-GigabitEthernet0/0/1] | 接口视图 | 配置接口参数 |
[Huawei-ospf-1] | 协议视图 | 配置XX协议 |
切换不同视图
<Huawei>sy //进入系统视图
[S1]int g0/0/1 //进入接口视图
<Huawei> //用户视图
<Huawei>system-view //切进系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei] //系统视图
[Huawei]interface GigabitEthernet 0/0/1 //切进接口视图
[Huawei-GigabitEthernet0/0/1] //接口视图
GigabitEthernet 千兆位
Ethernet 百兆位
[Huawei-GigabitEthernet0/0/1]quit //返回上一视图
[Huawei]ospf //切进协议视图
[Huawei-ospf-1] //协议视图
视图回退操作
Ctrl+z //直接返回用户视图
[S1-ui-console0]ret //返回用户视图
退回到前一个视图:quit命令
快速返回到用户视图:return命令、或快捷键Ctrl+Z
[Huawei-ospf-1]quit
[Huawei]
[Huawei-ospf-1]return
<Huawei>
操作技巧
命令可简写
按TAB键自动补全
按?能获取帮助信息
命令不区分大小
<Huawei>sys //按TAB键自动补全
<Huawei>system-view //按Ctrl+Z退回
<Huawei>sys? //按?获取帮助信息
system-view
<Huawei>sy //按回车键简写
Enter system view, return user view with Ctrl+Z.
[Huawei]
[Huawei]QUIT //大写
<Huawei>
命令行基本操作
查看VRP系统版本
<Huawei>dis ver //显示版本
<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, 1 day, 23 hours, 19 minutes
配置设备名
[Huawei]sy S1 //更改设备名称为S1
sysname命令
作用:可以在众多交换机中区分出来
命名规范:部门、位置、机架编号
需要在系统视图下执行
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname test-H3C-19 //将设备名命名为test-H3C-19
[test-H3C-19]
启用/禁用接口
[S1-GigabitEthernet0/0/1]sh //禁用接口
[S1-GigabitEthernet0/0/1]un sh //启用接口
默认自动开启,可以手动关闭以排查网络故障
在指定接口视图下
执行shutdown命令可手动禁用此接口
执行undo shutdown命令可恢复启用此接口
[test-H3C-19]interface GigabitEthernet 0/0/3
[test-H3C-19-GigabitEthernet0/0/3]shutdown
[test-H3C-19-GigabitEthernet0/0/3]
Jan 2 2024 14:08:36-08:00 test-H3C-19 %%01PHY/1/PHY(l)[0]:
GigabitEthernet0/ 0/3: change status to down //此接口状态为down
[test-H3C-19-GigabitEthernet0/0/3]undo shutdown
[test-H3C-19-GigabitEthernet0/0/3]
Jan 2 2024 14:14:46-08:00 test-H3C-19 %%01PHY/1/PHY(l)[1]:
GigabitEthernet0/ 0/3: change status to up //此接口状态为up
查看当前交换机的配置
<Huawei>dis cu //查看当前配置信息
查看当前有效配置(display current-configuration)
display this 查看当前视图配置
<test-H3C-19>display current-configuration //查看当前有效配置
#
sysname test-H3C-19
#
cluster enable ntdp enable ndp enable
......
按回车是向下查看一行,按空格是向下查看一页
保存交换机的配置
<S1>sa //保存当前配置
保存当前配置(save)
需要在用户视图下执行
<test-H3C-19>save //保存当前配置
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y //输入y确认保存
Now saving the current configuration to the slot 0.
Jan 4 2024 09:01:53-08:00 test-H3C-19 %%01CFM/4/SAVE(l)[0]:The user chose Y whe n deciding whether to save the configuration to the device.
Save the configuration successfully. //保存成功
实用配置技巧
重启设备
可以通过命令重启设备
用户视图reboot
<Test-H3C-19>reboot
Warning: All the configuration will be saved to the configuration file for the n ext startup:flash:/vrpcfg.zip, Continue?[Y/N]:y //确认是否保存
System will reboot! Continue?[Y/N]:y //确认是否重启
......
注:如果执行save保存后没有做其他修改,重启时将不会出现“是否”保存提示
设置终端密码(本地访问口令)
[S1]user-in co 0 //进入终端
[S1-ui-console0]auth p //启动密码验证
[S1-ui-console0]set a p c 123 //设置密码为123
交换机终端登录默认无需密码
为了安全需要添加认证密码
<Test-H3C-19>system-view //进入系统视图
[Test-H3C-19]user-interface console 0 //进入终端配置
[Test-H3C-19-ui-console0]authentication-mode password //启用密码认证
[Test-H3C-19-ui-console0]set authentication password cipher 123456 //设置终端密码为123456
Please Press ENTER.
Login authentication
Password: //再次进入终端时要求密码验证 <Test-H3C-19>
注:输入密码时为了安全考虑是不会有密码回显的,输入完成后直接回车就行
更改自动退出超时时间
[S1-ui-console0]i 1400 //设置超时时间为24小时
终端会话闲置10分钟后自动退出
调试设备时,可以延长超时时间(比如24小时)
注:为了安全,调试完毕后需要设置短的超时时间
<Test-H3C-19>system-view //进入系统视图
[Test-H3C-19]user-interface console 0 //进入终端配置视图
[Test-H3C-19-ui-console0]idle-timeout 2 //设置超时时间2分钟
[Test-H3C-19-ui-console0]
[Test-H3C-19-ui-console0]idle-timeout 0 //配置为0为永不超时
切换语言模式
提示和警告信息提供中、英文两种语言显示
初学者可以暂时切换到“中文”模式
注:只对当前终端有效,用户重新登录自动取消
<Test-H3C-19>language-mode Chinese //改变语言为中文
Change language mode, confirm? [Y/N] y
Jan 10 2024 09:24:17-08:00 Test-H3C-19 %%01CMD/4/LAN_MODE(l)[59]:The user chose Y
when deciding whether to change the language mode.
提示:改变语言模式成功。
取消终端提示信息
<Huawei>u t m //关闭日志提示
配置命令会被终端界面显示一些"提示信息"打断
初学者可以暂时取消这些“提示信息”
注:只对当前终端有效,用户重新登录自动取消
<Test-H3C-19>undo terminal monitor //取消终端提示信息
提示:当前终端禁止所有类信息输出。
恢复出厂设置
<S1>re sa //恢复出厂设置
适用于系统配置紊乱/错误、修复不便等情况
用户试图reset saved-configuration恢复,然后“重启”即可
<Test-H3C-19>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.
Jan 10 2024 09:37:35-08:00 Test-H3C-19 %%01CFM/4/RST_CFG(l)[59]:The user chose Y
when deciding whether to reset the saved configuration.
Info: Succeeded in clearing the configuration in the device.