2022年2022年华为配置命令 2.pdf





《2022年2022年华为配置命令 2.pdf》由会员分享,可在线阅读,更多相关《2022年2022年华为配置命令 2.pdf(13页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、HCNA 入门部分一、命令行基础用户视图;Huawei 系统视图逐级退出: quit ;完全退出: Ctrl+Z ;打断:Ctrl+C 1、修改设备名称:Huaweisysname R1 2、配置系统时钟:设置所在时区: clock timezone beijing add 08:00:00 设置当前时间: clock datetime 16:35:25 2018-03-29 设置采用夏时制 :clock daylight-saving-time 3、配置标题消息:配 置 在 用 户 登 陆 前 显示 的标 题消 息: R1header login information welcome to
2、 R1 配置在用户登陆后显示的标题消息:R1header shell information no reboot R1 4、配置特定等级用户在特定视图具有特定命令:R1command-privilege level 15 view user save 5、为 VRP 系统创建账户(创建账户缺省是level15 ,服务类型包括 terminal ) :R1aaa R1-aaalocal-user admin privilege level 15 password cipher huawei R1-aaalocal-user admin service-type terminal (用于指定账户的
3、服务类型,默认是 ALL)6、在 console 口配置使用超级终端登录时的验证方式(缺省时不验证):R1user-interface console 0 R1-ui-console0authentication-mode aaa 7、用户界面: VTY 虚拟类型终端:R1user-interface vty 0 4 R1-ui-vty0-4authentication-mode password(或者 aaa)8、配置登录的超时时间(缺省是10 分钟) :R1user-interface console 0 R1-ui-console0idle-timeout 5 0 9、指定终端屏幕临时显
4、示的行数(缺省是24 行) :R1user-interface console 0 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 13 页 - - - - - - - - - R1-ui-console0screen-length 10 10、历史命令缓冲区大小(缺省是10 行) :R1user-interface console0 R1-ui-console0history-command max-size 20 11、配置只使用口令登录之后获取的权限:R1user-
5、interface console 0 R1-ui-console0user privilege level 15 12、配置 IP 地址:R1int g0/0/1 R1-GigabitEthernet0/0/1ip add 192.168.1.1 24 二、文件系统基础1、基本查询命令(1)查看当前目录: pwd (2)查看当前目录下的文件列表:dir (3)查看文办文件: more .txt 2、目录操作(1)创建目录: mkdir aaa (2)进入目录: cd aaa (3)删除目录: mkdir aaa 3、文件操作(1)文件拷贝:copy flash:/dhcp/dhcp-duid
6、.txt flash:/bbb/ Copy flash:/dhcp/dhcp-duid.txt to flash:/bbb/dhcp-duid.txt? (y/n)n:y (2)文件重命名:rename flash:/bbb/dhcp-duid.txt flash:/bbb/123.txt Rename flash:/bbb/dhcp-duid.txt to flash:/bbb/123.txt? (y/n)n:y (3)文件移动:move flash:/bbb/123.txt flash:/aaa/ Move flash:/bbb/123.txt to flash:/aaa/123.txt?
7、 (y/n)n:y (4)删除文件:delete flash:/aaa/123.txt 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 13 页 - - - - - - - - - Delete flash:/aaa/123.txt? (y/n)n:y (5)恢复被删除文件:undelete flash:/aaa/123.txt Undelete flash:/aaa/123.txt? (y/n)n:y (6)永久删除文件:delete /unreserved flash
8、:/aaa/123.txt Warning: The contents of file flash:/aaa/123.txt cannot be recycled. Continue? ( y/n)n:y 4、管理配置文件(1)查看当前配置文件( RAM ) :R1display current-configuration (2)查看保存的配置文件(flash/SD 卡) :R1display saved-configuration (3)保存配置: save (4)删除保存的配置文件,恢复出厂设置:delete flash:/vrpcfg.zip或reset saved-configurat
9、ion (5)系统启动文件的查询:display startup ( 6 ) 修 改 系 统 启 动 后 加 载 的 配 置 文 件 : startup saved-configuration flash:/123.zip (7)修改系统启动系统文件:startup system-software 路径 (8)比较配置文件: compare configuration 5、修复存储设备: fixdisk flash: 6、格式化存储设备: format flash: 三、VRP 系统管理1、升级路由器的VRP 系统:(1)在 FTP SERVER下准备更新的 VRP 系统文件(2)实现路由器与
10、FTP SERVER的网络连接性(3)在路由器的用户视图下连接到FTP SERVER:ftp 192.168.1.2 R1-ftpget 文件名 (get 下载, put 上传)startup system-software flash:文件名 2、备份路由器的VRP 系统:(1)在 FTP SERVER下准备更新的 VRP 系统文件名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 13 页 - - - - - - - - - (2)实现交换机与FTP SERVER的网络连
11、接性interface vlanif 1 IP add 192.168.123.200.24 (3)在交换机的用户视图下连接到FTP SERVER:ftp 192.168.1.2 ftpput 文件名四、修改丢失的口令(1)必须使用 console 口连接设备,(2) 打开电源之后使用 Ctrl+B 进入 BOOTROM 菜单中 (默认口令是 huawei) ;(3) 在进入 BOOTROM MENU中, 选择 5 (5. Enter filesystem submenu) ;(4)然后再选择 4 (4.Rename file from Flash);(5)选择 vrecfg.zip文件进行重
12、命名 (vrpcfg1.zip);(6)最后选择 6(6.Return to main menu) 回到 BOOTROM 菜单,再选择 7 (7.Reboot) 重启设备;(7)设备重启之后将不能加载配置文件(即此时不需要验证口令就可登录)此时可以在用户视图下再将之间重命名的配置文件再修改成vrpcfg.zip rename vrpcfg1.zip vrpcfg.zip Rename flash:/vrpcfg1.zip to flash:/vrpcfg.zip ?Y/N:y_ (8)在用户视图下使用display saved-configuration命令查看保存的配置文件, 然后再将保存的
13、配置文件拷贝到系统视图下执行,以加载到当前配置文件中;(9)修改验证的口令,并保存配置SW1aaa sW1-aaalocal-user test password cipher 123456 sw1user-interface console 0 sW1-ui-consoleauthentication-mod ? aaa AAA authentication none Login without checking password Authentication through the password of a user terminal 五、交换网络基础(1)查看交换机 MAC 地址表:
14、S1display mac-address 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 13 页 - - - - - - - - - (2)配置接口的速率和双工(缺省是自动协商:就低不就高):S1interface Ethernet0/0/1 S1-Ethernet0/0/1negotiation auto (3)手工修改速率和双工需要关闭自动协商:S1interface Ethernet0/0/1 S1-Ethernet0/0/1undo negotiation a
15、uto S1-Ethernet0/0/1speed 100 S1-Ethernet0/0/1duplex (4)查看交换机接口状态:S1-Ethernet0/0/1display interface e0/0/1 六、配置 STP 1)配置交换机的STP模式为 STP S1-4stp mode stp 2)通过修改优先级,调整跟交换机的位置(缺省是32768 ,推荐使用汇聚层交换机为跟交换机)S3stp priority ? INTEGER Bridge priority, in steps of 4096 S3stp priority 0 S4stp priority 4096 3)通过配置
16、端口开销选择RP(1Gbps 端口在 STP 中默认的开销是20000 )S4interface g0/0/4 S4-GigabitEthernet0/0/4stp cost 10000 4)修改端口开销计算方式S4stp pathcost-standard ? dot1d-1998 IEEE 802.1D-1998 dot1t IEEE 802.1T legacy Legacy 5)通过配置端口优先级选择RP(缺省是 128 )S3int g0/0/3 S3-GigabitEthernet0/0/3stp port priority 112 S4int g0/0/3 S4-GigabitEt
17、hernet0/0/3stp cost 10000 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 13 页 - - - - - - - - - 6)检查 stp 运行:S1display stp S1display stp brief display stp interface g0/0/4 七、配置 RSTP 1)配置 STP 模式为 RSTP S1stp mode rstp 2)配置边缘端口S1int e0/0/1 S1-Ethernet0/0/1stp edged
18、-port enable 3)配置根桥S3stp priority 0 S4stp priority 4096 4)配置端口开销和优先级S4-GigabitEthernet0/0/4stp cost S3-GigabitEthernet0/0/3stp port priority 5)配置根保护(在根桥连接接入层交换机的DP 上配置)S3int g0/0/1 S3-GigabitEthernet0/0/1stp root-protection (S3:g0/0/1 、g0/0/2 、S4:g0/0/1 、g0/0/2 )被配置为根保护的DP 端口接收到更优BPDU 时,端口要被置为Discar
19、ding(丢弃)状态6)配置 BPDU 保护边缘端口一般用于连接PC, 不能接收到 BPDU , 但如果攻击者恶意伪造BPDU发送到边缘端口,边缘端口会自动变为非边缘端口,并参与网络拓扑计算,引发网络的震荡。配置 BPDU 保护可以让边缘端口在接收到BPDU 时,端口直接被关闭,并通知到网管系统,端口需要背手工开启之后才能正常工作。S1/2stp bpdu-protection 7)配置环路保护当 AP 端口所在链路发生故障, 成为单向链路时可能产生环路, 配置环路保护,可以解决该问题名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - -
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年2022年华为配置命令 2022 年华 配置 命令

限制150内