华为60条路由器配置命令

发布于:2025-05-10 ⋅ 阅读:(8) ⋅ 点赞:(0)

一、系统管理类


①查看系统信息‌

    display version 查看设备版本信息display current-configuration 查看当前运行配置display saved-configuration 查看已保存配置display device 查看硬件状态(CPU/内存)display clock 显示系统时间

    ‌②设备配置与管理

      sysname R1(修改设备名称)save(保存配置)reboot(重启设备)delete(删除Flash中配置)reset saved-configuration(清除已保存配置)set factory-configuration from default(恢复出厂配置)

      ‌③‌用户与权限

        local-user admin password irreversible-cipher Admin@2025(创建加密用户)local-user admin service-type terminal(设置用户服务类型)local-user admin privilege level 15(设置用户权限等级)super password 123456(设置特权密码)

        二、接口配置类


        ①接口基础配置‌

          interface GigabitEthernet0/0/1 进入接口视图ip address 192.168.1.1 24 配置IP地址及子网掩码undo shutdown 启用接口shutdown 关闭接口description [描述] 添加接口描述

          ②子接口与VLAN‌

            interface GigabitEthernet0/0/1.10 创建子接口dot1q termination vid 10 配置子接口关联VLANarp broadcast enable 启用ARP广播

            ③链路协议

            interface Serial0/0/0(进入串口视图)link-protocol ppp(封装PPP协议)ppp authentication-mode chap(配置CHAP认证)

            ④接口状态查看‌

              display interface GigabitEthernet0/0/1 查看接口详细信息display ip interface brief 查看接口IP摘要

              三、路由协议类


              ①静态路由‌

                ip route-static 10.0.0.0 255.255.255.0 192.168.1.2 配置静态路由display ip routing-table 查看路由表

                ‌②动态路由协议‌

                ‌RIP配置‌:

                rip 1 启用RIP进程network 192.168.1.0 宣告直连网段version 2 启用RIPv2

                ‌OSPF配置‌:

                ospf 1 启用OSPF进程area 0 进入骨干区域network 192.168.1.0 0.0.0.255 宣告网段(反掩码格式)

                四、安全与管理类


                ①访问控制‌

                user-interface vty 0 4 进入虚拟终端视图authentication-mode password 设置密码认证模式set authentication password cipher [密码] 配置远程登录密码

                ②ACL配置‌

                acl 2000 创建基本ACLrule permit source 192.168.1.0 0.0.0.255 允许指定网段traffic-filter inbound acl 2000 应用ACL到接口

                ③日志与诊断‌

                info-center enable 启用日志功能debugging all 开启所有调试信息undo debugging all 关闭调试信息

                五、诊断与维护类


                ①连通性测试‌

                ping 192.168.1.1 测试网络连通性tracert 192.168.1.1 追踪路径

                ②信息诊断‌

                display fib 查看转发信息库display arp 查看ARP表display mac-address 查看MAC地址表

                六、高级功能类


                ①NAT配置‌

                nat address-group 1 202.100.1.10 202.100.1.20 创建地址池nat outbound 2000 address-group 1 关联ACL与地址池

                ②DHCP配置‌

                dhcp enable 启用DHCP服务dhcp select interface 接口启用DHCP服务器dhcp server dns-list 8.8.8.8 配置DNS服务器

                ‌③生成树协议(STP)‌

                stp enable(启用STP)stp disable(关闭指定接口的STP)

                六、高级功能类


                ‌①时间同步‌

                clock datetime 10:00:00 2025-04-27(手动设置时间)

                ‌②服务管理‌

                info-center console debugging(日志输出到控制台)info-center monitor debugging(日志输出到远程终端)

                不想错过文章内容?读完请点一下“在看图片,加个关注”,您的支持是我创作的动力

                期待您的一键三连支持(点赞、在看、分享~)


                网站公告

                今日签到

                点亮在社区的每一天
                去签到