网络:VRP介绍

1. VRP 华为使用的通用路由平台,华为的交换机、防火墙、安全设备、无线和路由器的命令行几乎一样。

2. VRP分为用户视图、系统视图。

3. 用户视图 user view

        <Huawei>:其中<>代表的是用户视图,Huawei是设备的名称。命令比较少。开机、登录默认进入该视图。

        使用system-view可以由用户视图进入系统视图。

4. 系统视图 system view

        [Huawei] : 其中[] 代表的是系统视图,Huawei是设备的名称。可以对设备进行控制。

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

        使用quit 逐级退出或者同时按住Ctrl + Z 键直接返回用户视图。

        save 保存命令,需要确认。有时敲一遍不能保存,需要多敲几次才能完成保存。

<R1>save
saveThe current configuration will be written to the device. Are you sure to continue? (y/n)[n]:
<R1>

5. 命令介绍

        Tips:可以使用Tab键补全命令,或者直接使用命令简写。

                  输入?可以对命令进行提示。

                  以下命令在系统视图操作。

       1. 进入接口

[R1]interface  GigabitEthernet  0/0/0
[R1-GigabitEthernet0/0/0]

        或者

[R1]interface g0/0/1
interface g0/0/1
[R1-GigabitEthernet0/0/1]

        2. 给接口配置IP地址(思科和华为设备均可通过此种方法配置)

[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 255.255.255.0
ip add
[R1-GigabitEthernet0/0/0]ip address  192.168.1.1 255.255.255.0
Aug  2 2023 19:53:23-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]

        或者 (仅华为设备可这样配置,思科不可这样配置)

[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
ip address 192.168.1.1 24
Aug  2 2023 20:03:03-08:00 R1 %%01IFNET/4/LINK_STATE(l)[10]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]
[R1-GigabitEthernet0/0/0]display this
display this
[V200R003C00]
#
interface GigabitEthernet0/0/0ip address 192.168.1.1 255.255.255.0 
#
return
[R1-GigabitEthernet0/0/0]

        如果IP地址配置错了,重新输入正确的IP地址覆盖即可。

        3. 给设备重命名

[Huawei]sysname R1
sysname R1
[R1]

        4. 查看当前端口的IP等配置信息

[R1-GigabitEthernet0/0/0]display this
display this
[V200R003C00]
#
interface GigabitEthernet0/0/0ip address 192.168.1.1 255.255.255.0 
#
return
[R1-GigabitEthernet0/0/0]

        5. 关闭接口

[R1-GigabitEthernet0/0/0]shutdown
shutdown
Aug  2 2023 19:57:46-08:00 R1 %%01IFPDT/4/IF_STATE(l)[1]:Interface GigabitEthernet0/0/0 has turned into DOWN state.
[R1-GigabitEthernet0/0/0]

        6. 撤销命令:undo+命令

        撤销shutdown命令

[R1-GigabitEthernet0/0/0]undo shutdown
undo shutdown
[R1-GigabitEthernet0/0/0]
[R1-GigabitEthernet0/0/0]
Aug  2 2023 19:59:53-08:00 R1 %%01IFPDT/4/IF_STATE(l)[7]:Interface GigabitEthernet0/0/0 has turned into UP state.
[R1-GigabitEthernet0/0/0]
Aug  2 2023 19:59:53-08:00 R1 %%01IFNET/4/LINK_STATE(l)[8]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]

       撤销端口的IP配置

[R1-GigabitEthernet0/0/0]undo ip address
undo ip address
Aug  2 2023 20:01:06-08:00 R1 %%01IFNET/4/LINK_STATE(l)[9]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the DOWN state. 
[R1-GigabitEthernet0/0/0]display this
display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
#
return
[R1-GigabitEthernet0/0/0]

        或者

[R1-GigabitEthernet0/0/0]undo ip address 192.168.1.1 24
undo ip address 192.168.1.1 24
Aug  2 2023 20:04:27-08:00 R1 %%01IFNET/4/LINK_STATE(l)[11]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the DOWN state. 
[R1-GigabitEthernet0/0/0]
[R1-GigabitEthernet0/0/0]display this
display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
#
return
[R1-GigabitEthernet0/0/0]

    7. 查看配置的IP地址状态是否在工作

[R1]display ip interface brief
display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.1.1/24        up         up        
GigabitEthernet0/0/1              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
[R1]

        解释  

[R1]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              172.16.1.1/24        up         up        
GigabitEthernet0/0/1              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
[R1]

        Physical 物理 # 如果状态为UP,代表接口连线正常。

                                   如果状态为down,代表接口连线不正常。没有接线,或者光衰过大。

        Protocol  协议 # 如果状态为UP,代表三层的配置是正确的。

                         如果状态为DOWN,代表三层的配置是不正确的。

        8. display interface brief 与 display ip interface brief 的区别

        display ip interface brief #查看三层接口的状态

        display interface brief #查看所有接口的状态

[Huawei]display interface brief 
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface                   PHY   Protocol InUti OutUti   inErrors  outErrors
Ethernet0/0/0               down  down        0%     0%          0          0
Ethernet0/0/1               down  down        0%     0%          0          0
Ethernet0/0/2               down  down        0%     0%          0          0
Ethernet0/0/3               down  down        0%     0%          0          0
Ethernet0/0/4               down  down        0%     0%          0          0
Ethernet0/0/5               down  down        0%     0%          0          0
Ethernet0/0/6               down  down        0%     0%          0          0
Ethernet0/0/7               down  down        0%     0%          0          0
GigabitEthernet0/0/0        up    down        0%     0%          0          0
GigabitEthernet0/0/1        down  down        0%     0%          0          0
NULL0                       up    up(s)       0%     0%          0          0
[Huawei]

        9. 三层接口可以配置IP地址。

            二层接口不能直接配置IP地址。华为的中低端交换机默认接口为二层接口,无法配置IP地址。使用undo portswitch 命令删除二层接口的配置,使用vlanif或者svi 才可以配置IP地址。

[Huawei-GigabitEthernet0/0/1]undo portswitch 
Aug  2 2023 21:04:15-08:00 Huawei %%01IFNET/4/IF_STATE(l)[0]:Interface Vlanif1 has turned into DOWN state.
Aug  2 2023 21:04:16-08:00 Huawei %%01PHY/1/PHY(l)[1]:    GigabitEthernet0/0/1: change status to down
[Huawei-GigabitEthernet0/0/1]
Aug  2 2023 21:04:17-08:00 Huawei %%01PHY/1/PHY(l)[2]:    GigabitEthernet0/0/1: change status to up
Aug  2 2023 21:04:23-08:00 Huawei DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.191.3.1 configurations have been changed. The current change number is 4, the change loop count is 0, and the maximum number of records is 4095.
[Huawei-GigabitEthernet0/0/1]

        10. 配置两台路由器的连通性测试

        路由器1配置如下

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
#
return
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Aug  2 2023 21:18:41-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[Huawei-GigabitEthernet0/0/0]display this
[V200R003C00]
#
interface GigabitEthernet0/0/0ip address 192.168.1.1 255.255.255.0 
#
return
[Huawei-GigabitEthernet0/0/0]quit   
[Huawei]display ip interface br
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.1/24       up         up        
GigabitEthernet0/0/1              unassigned           up         down      
NULL0                             unassigned           up         up(s)     
[Huawei]

        路由器2配置如下

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface g0/0/0
[R2-GigabitEthernet0/0/0]display this
[V200R003C00]
#
interface GigabitEthernet0/0/0
#
return
[R2-GigabitEthernet0/0/0]interface g0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 24
Aug  2 2023 21:19:40-08:00 R2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]quit
[R2]display ip interface brief 
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1Interface                         IP Address/Mask      Physical   Protocol  
GigabitEthernet0/0/0              192.168.1.2/24       up         up        
GigabitEthernet0/0/1              unassigned           down       down      
NULL0                             unassigned           up         up(s)     
[R2]ping 192.168.1.1PING 192.168.1.1: 56  data bytes, press CTRL_C to breakReply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=140 msReply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=30 msReply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=20 msReply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=20 msReply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms--- 192.168.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 20/48/140 ms[R2]

        使用ping 命令ping对方IP。成功则返回ttl等信息。

        11. shutdown 将接口关闭

        12. 查看当前设备的所有配置信息

[R1]display current-configuration 
[V200R003C00]
#sysname R1
#snmp-agent local-engineid 800007DB03000000000000snmp-agent 
#clock timezone China-Standard-Time minus 08:00:00
#
portal local-server load portalpage.zip
#drop illegal-mac alarm
#set cpu-usage threshold 80 restore 75
#
aaa authentication-scheme defaultauthorization-scheme defaultaccounting-scheme defaultdomain default domain default_admin local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$local-user admin service-type http
#
firewall zone Local                       priority 15
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0authentication-mode password
user-interface vty 0 4
user-interface vty 16 20
#
wlan ac
#
return
[R1]

        13. 查看路由器某接口的详细信息

[R1]display interface g0/0/1
GigabitEthernet0/0/1 current state : DOWN
Line protocol current state : DOWN
Description:HUAWEI, AR Series, GigabitEthernet0/0/1 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc63-6071
Last physical up time   : -
Last physical down time : 2023-08-03 18:27:02 UTC-08:00
Current system time: 2023-08-03 18:30:05-08:00
Port Mode: COMMON COPPER
Speed : 1000,  Loopback: NONE
Duplex: FULL,  Negotiation: ENABLE
Mdi   : AUTO
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Input peak rate 0 bits/sec,Record time: -
Output peak rate 0 bits/sec,Record time: -Input:  0 packets, 0 bytesUnicast:                  0,  Multicast:                   0Broadcast:                0,  Jumbo:                       0Discard:                  0,  Total Error:                 0CRC:                      0,  Giants:                      0Jabbers:                  0,  Throttles:                   0Runts:                    0,  Symbols:                     0Ignoreds:                 0,  Frames:                      0Output:  0 packets, 0 bytesUnicast:                  0,  Multicast:                   0Broadcast:                0,  Jumbo:                       0Discard:                  0,  Total Error:                 0Collisions:               0,  ExcessiveCollisions:         0Late Collisions:          0,  Deferreds:                   0Input bandwidth utilization threshold : 100.00%Output bandwidth utilization threshold: 100.00%Input bandwidth utilization  :    0%Output bandwidth utilization :    0%[R1]

        14. Ctrl + C 终止当前正在进行的命令。

        15. display version 查看当前设备版本信息。

<R1>display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.130 (AR2200 V200R003C00)
Copyright (C) 2011-2012 HUAWEI TECH CO., LTD
Huawei AR2220 Router uptime is 0 week, 0 day, 0 hour, 12 minutes
BKP 0 version information: 
1. PCB      Version  : AR01BAK2A VER.NC
2. If Supporting PoE : No
3. Board    Type     : AR2220
4. MPU Slot Quantity : 1
5. LPU Slot Quantity : 6MPU 0(Master) : uptime is 0 week, 0 day, 0 hour, 12 minutes
MPU version information : 
1. PCB      Version  : AR01SRU2A VER.A
2. MAB      Version  : 0
3. Board    Type     : AR2220
4. BootROM  Version  : 0
<R1>

        16. 配置环回接口IP地址

        17. 

        18. 

        19. 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/21146.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

H5实现签字版签名功能

前言&#xff1a;H5时常需要给C端用户签名的功能&#xff0c;以下是基于Taro框架开发的H5页面实现 一、用到的技术库 签字库&#xff1a;react-signature-canvas主流React Hooks 库&#xff1a;ahooks 二、组件具体实现 解决H5样式问题&#xff0c;主要还是通过两套样式实现…

a-date-picker报错TypeError: date4.locale is not a function

问题描述 使用日期选择器&#xff0c;数据从后端获得&#xff0c;再赋值给a-date-picker做数据回显&#xff0c;遇到这个报错&#xff0c;排错后定位到a-date-picker组件本身接收数据的问题。 如果使用了dayjs或moment库来处理时间字符串&#xff0c;并且使用.format对时间数据…

day20-101. 对称二叉树

101. 对称二叉树 力扣题目链接 给定一个二叉树&#xff0c;检查它是否是镜像对称的。 思路 镜像对称必要的条件就是根节点的左右子树互相对称 左子树的左孩子 右子树的右孩子左子树的右孩子 右子树的左孩子 递归 使用递归前要确定递归的顺序&#xff0c;是前序、后序还…

【Android】在AndroidStudio开发工具运行Java程序

在Android Studio开发工具中&#xff0c;Android系统开始就是用java语言开发的&#xff0c;还可以java代码来写程序&#xff0c;控制台&#xff0c;桌面应用&#xff0c;还可以写可调用的模块&#xff0c;这里讲一下创建Java程序步骤&#xff0c;方便入门java语言开发。 新建一…

Leetcode-每日一题【剑指 Offer 39. 数组中出现次数超过一半的数字】

题目 数组中有一个数字出现的次数超过数组长度的一半&#xff0c;请找出这个数字。 你可以假设数组是非空的&#xff0c;并且给定的数组总是存在多数元素。 示例 1: 输入: [1, 2, 3, 2, 2, 2, 5, 4, 2]输出: 2 限制&#xff1a; 1 < 数组长度 < 50000 解题思路 前置知…

Docker Compose编排部署LNMP服务

目录 安装docker-ce 阿里云镜像加速器 文件 启动 安装docker-ce [rootlocalhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo --2023-08-03 18:34:32-- http://mirrors.aliyun.com/repo/Centos-7.repo 正在解析主机 m…

观察者模式(Observer)

观察着模式是一种行为设计模式&#xff0c;可以用来定义对象间的一对多依赖关系&#xff0c;使得每当一个对象状态发生改变时&#xff0c;其相关依赖对象皆得到通知并被自动更新。 观察者模式又叫做发布-订阅&#xff08;Publish/Subscribe&#xff09;模式、模型-视图&#xf…

Elasticsearch分词详解:ES分词介绍、倒排索引介绍、分词器的作用、停用词

详见&#xff1a;https://blog.csdn.net/weixin_40612128/article/details/123476053

新手指南:流程图中各种图形的含义及用法解析

我们经常在技术设计、沟通、业务演示等一些领域看到流程图&#xff0c;它也可以称为输入输出图。顾名思义&#xff0c;它是指一种简单的工作流程的具体步骤&#xff0c;比如包括一次会议的流程&#xff0c;以及一次生产制造的顺序和过程等。本文将为大家介绍流程图的含义和具体…

【零基础学Rust | 基础系列 | 基础语法】变量,数据类型,运算符,控制流

文章目录 简介&#xff1a;一&#xff0c;变量1&#xff0c;变量的定义2&#xff0c;变量的可变性3&#xff0c;变量的隐藏 二、数据类型1&#xff0c;标量类型2&#xff0c;复合类型 三&#xff0c;运算符1&#xff0c;算术运算符2&#xff0c;比较运算符3&#xff0c;逻辑运算…

BigDecimal的加减乘除

加法 add() 示例&#xff1a;a b BigDecimal a new BigDecimal("1.23"); BigDecimal b new BigDecimal("4.56"); BigDecimal sum a.add(b); ------------ 减法 subtract() 示例…

在windows配置redis的一些错误及解决方案

目录 Unable to connect to Redis; nested exception is io.lettuce.core.RedisConnectionException:用客户端Redis Desktop Manager一样的密码端口&#xff0c;是可以正常连接的&#xff0c;但是运行java程序之后使用接口请求就会报错 Unable to connect to Redis; nested e…

【JAVA】正则表达式是啥?

个人主页&#xff1a;【&#x1f60a;个人主页】 系列专栏&#xff1a;【❤️初识JAVA】 文章目录 前言正则表达式正则表达式语法正则表达式的特点捕获组实例 前言 如果我们想要判断给定的字符串是否符合正则表达式的过滤逻辑&#xff08;称作“匹配”&#xff09;&#xff0c…

Screens 4 for mac VNC客户端 强大的远程控制工具

Screens 4 for Mac 是一款功能强大的 VNC 客户端软件&#xff0c;为 Mac 用户提供了便捷的远程访问和控制解决方案。无论您是需要远程管理服务器、办公电脑&#xff0c;还是需要远程协助他人解决问题&#xff0c;Screens 4 都是您的理想选择。 Screens 4 for Mac具备简洁直观的…

Mybatis 实体类属性名和表中字段名不一致怎么处理

一. 前言 最近耀哥有学生出去面试&#xff0c;被问到 “Mybatis实体类的属性名和表中的字段名不一致该怎么处理&#xff1f;”&#xff0c;这其实是一个很经典的面试题&#xff0c;接下来耀哥就为大家详细解析一下这道面试题。 二. 分析 2.1 实体类和字段名不一致所带来的后果…

GPT带我学-设计模式-工厂模式

1 你好&#xff0c;请问你知道设计模式的工厂模式吗 当然知道&#xff0c;工厂模式是一种创建型设计模式&#xff0c;它提供了一种创建对象的方式&#xff0c;而不需要暴露对象创建的逻辑细节。工厂模式通过使用工厂类来创建对象&#xff0c;从而将对象的实例化逻辑与客户端代…

Json文件编辑功能

1 Json格式 JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式。它基于 ECMAScript&#xff08;European Computer Manufacturers Association, 欧洲计算机协会制定的js规范&#xff09;的一个子集&#xff0c;采用完全独立于编程语言的文本格式来存储和表示数据。…

Maven引入本地jar包

maven做为一种强大的依赖管理工具&#xff0c;可以帮助我们更方便的管理项目中的依赖&#xff1b;而在使用过程中我们难免会有需要引入本地jar包的需求&#xff0c;这里踩过坑之后我分享俩种引入方式&#xff1b; 1.上传jar到本地maven仓库&#xff0c;再引入 使用此方法后可…

echarts datazoom功能设置

dataZoom: [ {type: slider,handleSize: "0%",moveHandleSize: 0,height: 8,backgroundColor: "#F2F3F8",fillerColor: "#DCDFE6",bottom: 0,startValue: 0,endValue: 5,showDetail: false ,zoomLock: true,// 锁定窗口的大小filterMode:empty,m…

CAD产品设计逆向软件 FARO RevEng Crack

CAD产品设计逆向软件 FARO RevEng 软件平台能为用户带来全面的数字设计体验。该反向工程软件有助于利用三维点云创建和编辑高质量的网格和 CAD 表面&#xff0c;以实现反向工程工作流程。然后&#xff0c;工业设计师可以利用这些网格模型进行进一步设计或三维打印。 RevEng 的商…