华为认证

HCIA授课内容
RS方向
网络基础入门
VPR系统命令介绍
常用网络技术
VRP系统常用命令的总结

1.<Huawei>
用户视图 在这个用户视图下面所执行的命令特别少 一般执行的ping命令或保存(save)或者reboot重启等等
其中<>代表的就是用户视图 Huawei表示的就是这个路由器的名称

2.<Huawei>system-viem====>>>[Huawei]
系统视图 在这个视图下面所执行的命令特别多 通过该视图可以控制整个路由器其中[ ]代表是系统视图
Huawei表示的就是这个路由器的名称 [Huawei]重命名输入sysname R1 就变成[R]就表示命名成功

3.[Huawei]quit
quit就是相当于撤销的意思
cerl+Z 直接退回到用户视图

4.[AR1]interface GigabitEthernet 0/0/0
从系统视图下进入到接口视图下面 也就是路由器的G0/0/0接口下面了
只有在接口视图下 才能配置IP地址

5. ? Tab或者简写
就是咱们的VRP系统帮助命令
VRP命令补全键
[R]int 按下tab键
[R]interface g 按下tab键
[R]interface GigabitEthernet
?是一个万能命令
能够帮助工程师进行相关操作
[R1]int?
interface Specify the interface configuration view
[R1] int
[R1] interface

6.[R1-GigabitEthernet0/0/0] ip address 192.168.1.1 255.255.255.0//255.255.255.0
可以直接写成24 如果想要修改接口的IP地址的话 直接在敲一遍 ip address X.X.X.X即可

7.[R1-GigabitEthernet0/0/0] undo ip address //删除IP地址
删除命令undo命令 华为这边没有明确规定 需要管理员一个一个试一个删除的命令

8.怎么查看配置的IP地址状态什么样子
display 查询
[R]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 2
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 2

Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.12.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
[R1]
display 物理 //如果状态UP的话 代表我的接口连接正常
如果状态down 代表我的接口连接正常
display 协议//如果状态UP的话 代表三层的配置是OK的
如果状态wodn的话 代表三层的配置不OK的

[SW1]display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/1 up down 0% 0% 0 0
GigabitEthernet0/0/2 down down 0% 0% 0 0
GigabitEthernet0/0/3 down down 0% 0% 0 0
GigabitEthernet0/0/4 down down 0% 0% 0 0
GigabitEthernet0/0/5 down down 0% 0% 0 0
GigabitEthernet0/0/6 down down 0% 0% 0 0
GigabitEthernet0/0/7 down down 0% 0% 0 0
GigabitEthernet0/0/8 down down 0% 0% 0 0
GigabitEthernet0/0/9 down down 0% 0% 0 0
GigabitEthernet0/0/10 down down 0% 0% 0 0
GigabitEthernet0/0/11 down down 0% 0% 0 0
GigabitEthernet0/0/12 down down 0% 0% 0 0
GigabitEthernet0/0/13 down down 0% 0% 0 0
GigabitEthernet0/0/14 down down 0% 0% 0 0
GigabitEthernet0/0/15 down down 0% 0% 0 0
GigabitEthernet0/0/16 down down 0% 0% 0 0
GigabitEthernet0/0/17 down down 0% 0% 0 0
GigabitEthernet0/0/18 down down 0% 0% 0 0
GigabitEthernet0/0/19 down down 0% 0% 0 0
GigabitEthernet0/0/20 down down 0% 0% 0 0
GigabitEthernet0/0/21 down down 0% 0% 0 0
GigabitEthernet0/0/22 down down 0% 0% 0 0
GigabitEthernet0/0/23 down down 0% 0% 0 0
GigabitEthernet0/0/24 down down 0% 0% 0 0
---- More ----
[R]display ip interface brief //查看三层的接口 华为的中低端交换机默认接口为二层接口
了IP地址
三层接口:就是指能够配置IP地址接口
9.shutdown命令
这条命令的作用就是相当于把接口给弄坏了 把接口直接关闭

10.[R1-GigabitEthernet0/0/0] display this
这条命令的作用就是查询当前的配置 查看G0/0/0接口配置情况

11.[R1-GigabitEthernet0/0/0]undo shutdown
这条命令的作用就是删除配置命令
删除地址[R1-GigabitEthernet0/0/0]undo ip address

12.[AR1]save
注意 这个save命令只能在用户视图下敲 并且敲完后 然后点击Y进行确认保存

13.[AR1]<R1>display current-configuration
查看我们当前设备的所用配置文件 一般可以简写为dis cu

14.[AR1]display version
查看我们路由器的版本信息

15.ctrl+c
这条命令就是终止咱们命令的运行 其中ping -c 100表示并的试数

静态路由介绍
静态路由的配置
IP地址连通性的测试

第二步:R1访问192.168.23.3路由
[R1]ip route-static 192.168.23.0 24 GigabitEthernet 00/0/0 192.168.12.2

检查静态路由是否生效
[R1]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 1 Routes : 1 Configured Routes : 1

Static routing table status : <Active> ---路由条目在action里面才表示生效
Destinations : 1 Routes : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.23.0/24 Static 60 0 D 192.168.12.2 GigabitEthernet
0/0/0

Static routing table status : <Inactive>
Destinations : 0 Routes : 0

R1会根据路由表RIB把去往192.168.23.3从出接口G00/0/0发出传递给R2设备

R2设备会检查路由表RIB 发现到达192.168.23.3是我直连 从而把数据包传递给R3设备

R3设备收到SIP 192.168.12.1 DIP192.168.23.3 刚好目标IP是我自己的接口IP地址 会进行接收

R3将数据包进行返回SIP 192.168.23.3 DIP 192.168.12.1 我们可以在R3上面写到达 192.168.12.0静态路由
ip route-static 192.168.12.0 255.255.255.0 GigabitEthernet0/0/1 192.168.23.2
检查如下:
[R3]display ip routing-table protocol static
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Public routing table : Static
Destinations : 1 Routes : 1 Configured Routes : 1

Static routing table status : <Active>
Destinations : 1 Routes : 1

Destination/Mask Proto Pre Cost Flags NextHop Interface

192.168.12.0/24 Static 60 0 D 192.168.23.2 GigabitEthernet
0/0/1

Static routing table status : <Inactive>
Destinations : 0 Routes : 0
R3设备会检查路由表RIB 发现到达192.168.12.1 从而把数据包传递给R2设备

R2设备会检查路由表RIB 发现到达192.168.12.1 是我直连 从而把数据包传递给R1设备

R1设备收到SIP 192.168.23.3 DIP192.168.12.1 刚好目标IP是我自己的接口IP地址 会进行接收

第三步:能够访问成功
<R1>ping 192.168.23.3
PING 192.168.23.3: 56 data bytes, press CTRL_C to break
Reply from 192.168.23.3: bytes=56 Sequence=1 ttl=254 time=50 ms
Reply from 192.168.23.3: bytes=56 Sequence=2 ttl=254 time=20 ms
Reply from 192.168.23.3: bytes=56 Sequence=3 ttl=254 time=20 ms
Reply from 192.168.23.3: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 192.168.23.3: bytes=56 Sequence=5 ttl=254 time=30 ms

--- 192.168.23.3 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/30/50 ms
1.access trunk hybrid接口
第一步:在交换机SW1和SW2上创建对应的vlan
[SW1]vlan batch 3 4

[SW2]vlan batch 3 4
通过检查display vlan检查是否创建vlan

第二步:把交换机连接电脑的接口设置为access接口

[SW1]interface GigabitEthernet 0/0/2

[SW1-GigabitEthernet0/0/2]port link-type access

[SW1-GigabitEthernet0/0/2]port default vlan 4 然后回车

[SW1]display current-configuration interface GigabitEthernet 0/0/2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 4
#

[SW1]interface GigabitEthernet 0/0/3

[SW1-GigabitEthernet0/0/3]port link-type access

[SW1-GigabitEthernet0/0/3]port default vlan 3 然后回车

[SW1]display current-configuration interface GigabitEthernet 0/0/3
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 3
#
=============================================================
=============================================================
=============================================================

[SW2]interface GigabitEthernet 0/0/2

[SW2-GigabitEthernet0/0/2]port link-type access

[SW2-GigabitEthernet0/0/2]port discard vlan 3 然后回车

[SW2]display current-configuration interface GigabitEthernet 0/0/2
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 3
#

[SW2]interface GigabitEthernet 0/0/3

SW2-GigabitEthernet0/0/3]port link-type access

[SW2-GigabitEthernet0/0/3]port default vlan 4 然后回车

[SW2]display current-configuration interface GigabitEthernet 0/0/3
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 4
#

第三步:交换机和交换机之间设置为trunk 并且允许对应的vlan通过

[SW1]interface GigabitEthernet 0/0/1

[SW1-GigabitEthernet0/0/1]port link-type trunk

[SW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 3 4

[SW1]display current-configuration interface GigabitEthernet 0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 3 to 4
#

[SW2]interface GigabitEthernet 0/0/1
[SW2-GigabitEthernet0/0/1]port link-type trunk
[SW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 3 4
[SW2]display current-configuration interface GigabitEthernet 0/0/1
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 3 to 4
#


第四步:测试主机之间的连通性
PC1是可以访问PC2的
PC3是可以访问PC4的
PC1不能访问PC 3 4 的
同一个vlan的主机可以相互访问
不同vlan之间的主机不能相互访问

 

posted @ 2022-09-09 11:41  邢增全  阅读(318)  评论(0)    收藏  举报