华为HCIA(华为hcia证书有什么用)

华为HCIA网络参考模型
1、OSI参考模型 OSI参考模型又被称为七层模型,由下至上依次为: 物理层:在设备之间传输比特流,规定了电平、速度和电缆针脚等物理特性。 数据链路层&#x

网络参考模型

1、OSI参考模型

OSI参考模型也称为七层模型,从下到上由以下部分组成: 物理层:在设备之间发送比特流并指定物理特性,例如电平、速度和电缆引脚。 数据链路层:将比特组装成字节,将字节组装成帧,使用链路层地址(以太网中的MAC地址)访问媒体,并进行错误检测。 网络层:定义路由器确定路径的逻辑地址,负责将数据从源网络传输到目的网络。 传输层:提供面向连接或无连接的数据传输以及重传前的错误检测。 会话层:负责建立、管理和终止表示层实体之间的通信会话。这一层的通信包括不同设备上的应用程序之间的服务请求和响应。 表示层:为应用层数据提供各种编码和转换功能,使一个系统的应用层发送的数据能够被另一个系统的应用层识别。 应用层:OSI参考模型中最接近用户的层,为应用程序提供网络服务。

2、TCP/IP标准参考模型

应用层、主机到主机层、互联网层、网络接入层

3、TCP/IP对等模型

应用层、传输层、网络层、数据链路层、物理层

4、TCP/IP协议栈

应用层:Telnet、FTP、TFTP(69UDP)、SNMP、HTTP、SMTP(25TCP)、DNS、DHCP

传输层:TCP、UDP

网络层:ICMP、IGMP、IP

数据链路层:PPPoE、以太网、PPP、ARP

ARP:TCP/IP协议,根据IP地址获取数据链路层地址

主要特点:

将IP地址解析为MAC地址

维护IP和MAC地址的映射关系以及ARP表项的缓存。

实现网段内重复IP地址的检测

华为VRP系统

1. VRP的功能

它提供统一的用户和管理界面,并实现各产品转发平面和VRP控制平面之间的交互。网络层。

2. 文件类型和文件名后缀

系统文件:cc

配置文件:cfg、zip、dat

补丁文件:pat

PAF 文件:bin

3、存储设备

SDRAM存储、闪存、NVRAM、SD卡、USB

4.VRP用户级别

0:访问级别,可以使用ping、tracert、telnet登录,部分显示

1:监控级,用于系统维护,可显示

2:配置级别。可以通过路由、网络各个层次的命令等业务配置命令直接向用户提供网络服务。

3:管理水平。提供文件系统、FTP、TFTP下载、命令级配置命令、业务故障诊断的debug命令等基本执行命令。

5. 文件系统常用操作命令

显示当前目录:pwd

显示当前目录下的文件信息:dir

显示文本文件的特定内容。细节

更改用户当前界面的工作目录:cd

创建一个新目录:mkdir

恢复已删除的文件:取消删除

永久删除回收站中的文件:resetrecycle-bin

网络层协议及IP编址

IP数据包头的主要内容

版本:4位

标头长度:4bit,标头长度20-60

服务类型:8位,服务类型,QOS仅适用于差异化服务

Total Length: 16bit,总长度,IP数据包总长度

Identification:16位,标识,该字段用于分片重组

标志位:3位,标志位

保留排名: 0 保留

不分片:1表示“不能分片”,0表示“可以分片”。

更多分段:1 表示“稍后有更多分段”,0 表示“最后一个数据分段”。

Fragment Offset:12位,Fragment Offset,该字段在分片重组时使用。

生存时间:8位,生存时间

一个典型的例子是: PPP 链接。如果接口采用PPP封装,则该接口上OSPF默认使用的网络类型为P2P。

IP路由基础

可由多个设备访问的支持广播的环境

一个典型的例子是以太网。如果接口采用以太网封装,则该接口上OSPF默认使用的网络类型为BMA。

1、路由表

多个网络设备可以访问且不支持广播的环境

一个典型的例子是帧中继网络。

2、路由表的三种来源 直连路由:

相当于将多条P2P链路的一端捆绑在一起的网络

缺省情况下,链路层协议不被视为P2MP网络类型。必须通过将非通用NBMA 更改为点对多点网络来手动更改此类型。

3、路由优先级 Preference用来不同路由协议间路由优先级的比较:

4、度量值 cost(即度量值)用于同一种路由协议内部不同路由的优先级比较:

DR(指定路由器)、BDR(备份指定路由器)、DRother

只有DR和BDR才能与其他路由器建立邻接关系。非DR无法建立完全邻接关系。两个BDR 都会监控DR 状态并在DR 发生故障时接管。

5、最长匹配原则

具有较高路由器DR 优先级的接口将成为该MA(多路访问网络)的DR。如果优先级相等(默认为1),则OSPF Router ID较高的路由器接口被选为DR,并且该DR具有非抢占性

6、静态路由

7、缺省路由

由一系列使用相同策略的连续OSPF 网络设备组成的网络

OSPF在同一区域内洪泛LSA,并同步该区域内各路由器的LSDB。

8、等价路由

LSDB越来越大,OSPF路由表规模增大,路由器资源消耗增加,设备性能下降,数据转发受到影响。

基于庞大LSDB的路由计算变得困难

当拓扑发生变化时,LSA的全局泛洪和全网SPF重新计算会带来很大的负担。

9、浮动路由

OSPF基础

骨干区域(Area 0),除Area 0以外的所有区域称为非骨干区域

1、OSPF协议 报文类型

为了防止区域间环路,非骨干区域之间不能直接相连。所有非骨干区域必须与骨干区域连接。

2、OSPF三大表项

3、OSPF建立邻接关系的步骤

此类路由器上的所有接口都属于同一个OSPF 区域

3.1 建立双向邻居关系(hello)

这类路由器的接口同时属于多个区域,但至少有一个接口属于骨干区域。

3.2协商主从(DD)

3.3 相互描述各自的LSDB(DD)

3.4 更新LSA、同步双方LSDB(LSR、LSU)

这种类型的路由器与其他AS 交换路由信息。

4、OSPF网络类型

环回地址中最大的IP 地址优先作为设备ID 号。 如果没有配置Loopback接口,则选择接口地址中最大的IP地址作为设备ID号。

4.1 P2P(点对点)

4.2 BMA(广播型)

在基于CSMA/CD机制的广播网络中,竞争的产生是限制以太网性能的重要因素。

4.3 NBMA(非广播式多路访问)

作为具有竞争隔离功能的二层网络设备,该交换机显着提高了以太网性能。

4.4 P2MP(点到多点)

先听后发送,边发送边听,由于冲突或随机延迟而停止发送,然后重新发送。

5、DR与BDR

连接在同一介质上的所有节点的集合

5.1 三种路由器身份

广播报文能够到达的整个访问范围就成为二层广播域。

每个MAC 地址都是一个广播地址

5.2 选举规则

6、OSPF域与单区域

以太网_II 和IEEE802.3

6.1 域(Domain)

DMAC:6字节,目的MAC地址,IPv4为6字节,该字段标识帧的接收者

SMAC:6字节,源MAC地址,IPv4为6字节,该字段标识帧的发送者

类型:2字节,协议类型,

共同价值观

0x0800:ipv4

0x0806:ARP

6.2 如果只有单区域产生的问题

DSAP:1字节,目的地服务接入点。如果下一个类型是IP,则值为0x06。

SSAP:1字节,源服务接入点。如果下一个类型是IP,则值为0x06。

Ctrl:1字节,一般设置为0x03,表示IEEE802.2无编号格式,无连接服务。

6.3 OSPF多区域

IP地址根据网络拓扑分配,MAC地址根据制造商分配。

6.3.1区域的分类

48 位(6 字节)长,12 个十六进制数字

OUI:制造商代码,由IEEE分配,24位(3字节),其余24位由制造商分配。

6.3.2多区域互联原则

6.4 路由器类型

物理MAC地址是全球唯一的单播地址,用于标识链路上的单个节点,可以用作目的地或源MAC地址。

6.4.1区域内路由器(IR)

用于表示局域网内的所有终端设备。

广播MAC地址可以理解为特殊的组播MAC地址。

目的地址为广播MAC地址的帧被发送到链路上的所有节点。

6.4.2区域间路由器(ABR)

用于表示LAN 上的一组终端。

多播MAC 地址用于识别链路上的节点组。

目的MAC地址是多播地址的帧被发送到一组节点。

组播MAC地址不能用作源地址,只能用作目的地址。

6.4.3骨干路由器(BR)

MAC地址表记录了交换机学习到的其他设备的MAC与接口的对应关系。最初,交换机的MAC 地址表是空的。

该类路由器至少有一个接口属于骨干区域

6.4.4自治系统边界路由器(ASBR)

如果数据帧的目的MAC地址与接收该帧的接口MAC地址表中对应的MAC地址相同,则交换机丢弃该数据帧。

6.5 Router ID 的选择顺序

如果数据帧的目的MAC地址与交换机MAC地址表中的任何条目匹配,并且不是接收该帧的接口对应的MAC地址,则交换机点对点转发该帧。

以太网交换基础

如果数据帧的目的MAC地址是单播地址,并且MAC地址表中不存在该表项,或者目的MAC地址是广播MAC地址,则交换机将泛洪该帧并将其发送到除该接口之外的所有端口. 转发到界面。接收帧的东西。

1、早期的以太网

1.1 交换机组网

1.交换机接收单播帧

2、查询MAC地址表

3. 如果有表项,则转发;如果没有表项,则洪泛到非接收接口。

4. 交换机将帧的源MAC 地址和相应的端口号记录在MAC 表中。

2、CSMA/CD的工作原理

2.1 冲突域

灵活构建虚拟工作组

限制广播域

加强局域网安全

提高网络稳健性

2.2 广播域

802.1Q定义vlan标签

3、以太网帧

标记帧(标记帧)

未标记帧(未标记帧)

3.1 两个标准

3.2 Ethernet_II以太帧

2 字节标签协议标识符。如果值为0x8100,不支持802.1Q的设备将在接收时被丢弃。

3.3 IEEE802.3 LLC以太帧

3位,Priority,表示数据帧的优先级,用于QOS。值范围从0到7。

4、MAC地址

基于接口部门

按MAC地址划分

基于IP子网划分

根据协议拆分

根据战略划分

4.1 MAC地址组成

4.2 MAC地址类型

仅允许具有相同VLAN ID 和接口PVID 的数据帧

4.2.1单播MAC地址(第七个比特为0的MAC地址)

当收到未标记的帧时,交换机会向该帧添加带有VID 或PVID 的标记,并转发检索到的已标记的标记。

当交换机收到带标签的帧时,会检查该帧标签中的VID是否与PVID相同,如果相同则转发该帧,否则丢弃该帧。

4.2.2广播MAC地址(全1的MAC地址,即FF-FF-FF-FF-FF-FF)

当带标签的帧从本交换机的另一个接口进入接入接口时,交换机会检查该帧标签中的VID是否与PVID相同。

如果它们相同,则删除该帧的标记,并将生成的未标记帧从链接发送出去。如果不同,则丢弃该帧。

4.2.3组播MAC地址(除广播地址外,第七位比特为1的MAC地址为组播MAC地址)

5、MAC地址表

只允许Vlan ID在允许列表中的数据帧通过

允许来自多个VLAN 的帧带标签通过,但只有来自一个VLAN 的帧可以不带标签地从该类型接口发送。

5.1 三种帧的处理情况

广播风暴和MAC地址表漂移

5.1.1丢弃:

5.1.2点对点转发:

由网桥优先级和MAC地址组成,用于选择根桥。默认网桥优先级为32768。更改的值必须是1024 的倍数。优先级越低越好。首先,比较优先级。

5.1.3泛洪:

桥ID最小的设备是网络的逻辑中心,可以发送配置BPDU。

5.2 MAC地址表项老化时间,华为S系列交换机的老化时间缺省为300秒

5.3 MAC地址表学习过程

VLAN原理与配置

到根桥的最低成本路径

1、Vlan的好处

它由端口优先级和端口号组成,用于确定端口的角色。默认为128,取值范围为0-240,步长为16。

2、vlan tag 标签

3、以太网帧的类型

包含网桥ID、路径成本和端口ID 等参数。在初始化状态下,各设备会发送配置BPDU来选举根桥并确定交换机上各端口的角色。如果网络拓扑稳定,则只有根桥可以发送配置BPDU。

4、vlan数据帧中的主要字段

当非根交换机感知到网络拓扑发生变化时,它会向根桥发送拓扑变化通知。

4.1 TPID:

BPDU Type:如果值为0x00,则为配置BPDU;如果值为0x80,则为TCN BPDU。

消息年龄:消息年龄,自根桥发送配置BPDU 以来的秒数。

Max Age:最大生命周期,默认为20 秒。如果一段时间内没有收到BPDU且生存期达到最大生存期,则设备认为该接口所连接的链路出现故障。

Hello Time:根桥连续生成配置BPDU 的时间间隔。默认值为2 秒。

转发延迟:转发延迟,监听和学习状态之间的时间间隔,默认15秒

4.2 PRI:

最小根桥ID (BID)

最小的RPC

最小桥ID

最小接口ID

5、vlan的划分

选举路线桥

根网桥选举根端口
选举指定端口
阻塞非根、非指定端口

6、三种端口角色

6.1 指定端口

交换机向所连网段发送配置BPDU的接口,根桥的端口都是指定端口

6.2 根端口

非根网桥去根桥路径最优的端口,一个非根网桥只能有一个根端口,根桥上没有根端口

6.3 预备端口

非根、非指定端口,被阻塞,可以接收并处理BPDU但无法转发用户数据

7、STP计算过程

7.1 STP根桥选举过程

初始状态下,所有交换机都会发送配置BPDU宣告自己时根桥
当交换机收到其他交换机发送的配置BPDU后,会比较BPDU中的桥ID和自己的桥ID
交换机不断交互BPDU,对桥ID进行比较,最终选举出一台桥ID最小的交换机作为根桥,其余为非根桥根桥角色可抢占,当桥ID更小的交换机加入到网络中和,会重新进行计算选举

7.2 STP根端口选举过程

首先比较RPC,其次比较上行接口收到的BID,再其次比较上行交换机的PID,最后比较本机的PID,以上均为一项相同之后才比较下一步,规则均为越小越优

7.3 STP指定端口选举过程

首先比较RPC,其次比较链路两端的BID,再其次比较链路两端的PID,以上均为一项相同之后才比较下一步,规则均为越小越优

7.3 阻塞非指定端口

8、STP的五种接口状态

8.1 Disable

禁用状态,不处理和转发BPDU,也不转发用户流量

8.2 Blocking

阻塞状态,仅能接收和处理BPDU,不能转发BPDU,也不能转发用户流量,预备端口的最终状态

8.3 Listening

侦听状态,可以转发BPDU,但不能转发用户流量,15秒之后进入学习状态

8.4 Learning

学习状态,根据收到的用户流量构建MAC地址表,但不转发用户流量,此状态为了防止临时环路,15秒之后进入转发状态

8.5 Forwarding

转发状态,既可转发用户流量又可转发BPDU报文,只有根端口和指定端口才能进入该状态

9、网络拓扑发生变化

9.1 根桥故障
Max Age超时后,非根桥会发送配置BPDU选举新的根桥,收敛时间为Max Age加上两个Forward Delay,即20+15+15=50s
9.2 直连链路故障

当检测到直连链路故障时,备用端口会从Blocking状态转为Listening-Learning-Forwarding状态,收敛时间为两个Forward Delay即30秒

9.3 非直连链路故障

Max Age超时后,故障链路两端的非根网桥会认为根桥失效,向其他链路发送配置BPDU,而其他非根桥的预备端口一直收不到包含根桥ID的BPDU,在Max Age超时之后,会转发来自上游的包含桥ID的BPDU,发送配置BPDU的交换机接收到其他交换机发送的BPDU时,比较后放弃认为自己是根网桥,同时另一非根网桥的预备端口从Blocking状态转为Listening-Learning-Forwarding状态,收敛时间为Max Age加上两个Forward Delay,即50s

9.4拓扑变更导致MAC地址表错误

非根网桥发送TCN BPDU,根桥收到之后告知其他非根桥MAC地址表的老化时间为Forward Delay 即15s,15s后MAC地址表正常

10、RSTP概述

RSTP可以与STP实现后向兼容
10.1 RSTP的端口角色
根端口(Root)、指定端口、预备端口(Altn)、备份端口(Back)
10.1.1边缘端口
一般与终端设备连接,正常情况下不接收配置BPDU,不参与RSTP运算,直接从Disableding转到Forwarding,一旦边缘端口接收到BPDU会丧失边缘端口属性,成为普通STP端口

10.2 RSTP的端口状态

10.2.1 Disableding

既不转发用户流量,也不学习MAC地址10.2.2 Learning
不转发用户流量但学习MAC地址

10.2.3 Forwarding
端口既转发用户流量,又学习MAC地址
10.3 STP/RSTP的缺陷
所有VLAN共用一棵生成树
10.4 MSTP
兼容STP/RSTP,既快速收敛,又提高冗余路径,实现VLAN数据的负载均衡
10.4.1 MSTP概述
每个生成树为一个实例            

AR1

system-view
sysname Corp-HQ-AR2220-Gateway

# Configure ACL
## NAT ACL
acl name NAT 2000
rule 3 permit source 192.168.2.0 0.0.0.255
rule 4 permit source 192.168.3.0 0.0.0.255
rule 30 permit source 192.168.30.0 0.0.0.255
rule 40 permit source 192.168.40.0 0.0.0.255
rule 70 permit source 192.168.7.0 0.0.0.255
rule 80 permit source 192.168.8.0 0.0.0.255
rule 90 permit source 192.168.9.0 0.0.0.255
rule 160 permit source 172.16.1.0 0.0.0.255
rule 4096 deny
quit

# Configure AAA
aaa
local-user pppuser password cipher hcie
local-user pppuser service-type ppp
quit

# Configuration ip pool
ip pool pppPool
gateway-list 192.168.14.1
network 192.168.14.0 mask 255.255.255.252
quit

# Configure interface
interface GigabitEthernet 0/0/1
ip address 172.16.5.1 255.255.255.252
description To Corp-HQ-S5700-Core01 G0/0/6
quit
interface GigabitEthernet 0/0/2
ip address 172.16.5.6 255.255.255.252
description To Corp-HQ-S5700-Core02 G0/0/6
quit
interface GigabitEthernet 5/0/0
ip address 102.1.1.2 255.255.255.252
nat outbound 2000
description To ISP-AR2240-Internet G0/0/0
quit
interface LoopBack 0
description OSPF router-id
ip address 10.1.1.1 255.255.255.255
quit
interface Serial 1/0/0
description To Corp-BranchA-AR2240-PPP Serial 1/0/0
ip address 192.168.14.1 255.255.255.252
link-protocol ppp
ppp authentication-mode chap
remote address pool pppPool
shutdown
undo shutdown
quit

# Configuration GRE Tunnel
interface Tunnel 0/0/100
description This is a tunnel from 102.1.1.2 to 103.1.1.1
tunnel-protocol gre
ip address 10.1.1.1 255.255.255.252
source 102.1.1.2
destination 103.1.1.1
keepalive
quit

# Configure Router
ip route-static 0.0.0.0 0.0.0.0 102.1.1.1 preference 60 description \”HQ Main Default Route\”

ospf 10 router-id 10.1.1.1
description Corp-HQ-OSPF Network
default-route-advertise cost 1
silent-interface GigabitEthernet 5/0/0
silent-interface Tunnel 0/0/100
import-route ospf 14 cost 10
import-route ospf 100 cost 10000
area 0
network 172.16.5.0 0.0.0.3
network 172.16.5.4 0.0.0.3
quit
quit

ospf 14 router-id 10.1.1.1
description Corp-PPP-Network, Connect to Corp-BranchA
silent-interface GigabitEthernet 0/0/1
silent-interface GigabitEthernet 0/0/2
silent-interface GigabitEthernet 5/0/0
silent-interface Tunnel 0/0/100
import-route ospf 10 cost 10
default-route-advertise always cost 20
area 0
network 192.168.14.0 0.0.0.3
quit
quit

ospf 100 router-id 10.1.1.1
description GRE Tunnel OSPF Network
silent-interface GigabitEthernet 0/0/1
silent-interface GigabitEthernet 0/0/2
silent-interface GigabitEthernet 5/0/0
silent-interface Serial 1/0/0
import-route ospf 10 cost 10000
area 0
network 10.1.1.0 0.0.0.3
quit
quit

return

save

 AC1

system-view
sysname Corp-HQ-AC6500-AC

vlan batch 100

stp enable
y
stp mode mstp
stp bpdu-protection
stp region-configuration
region-name MSTPCore
instance 1 vlan 30
instance 2 vlan 40 100
active region-configuration
quit

# Configure interface
interface vlan 100
ip address 192.168.100.10 255.255.255.0
description To Manager Vlan100 APs
quit

interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 30 40 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-S5700-Core01 G0/0/5
quit
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 30 40 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-S5700-Core02 G0/0/5
quit

# Configure WLAN
capwap source interface vlanif 100
wlan
ap auth-mode mac-auth
ap whitelist mac 00e0-fcff-7db0
ap whitelist mac 00e0-fcd6-3ae0

ap-system-profile name HQ-AP-System01
quit

ssid-profile name HQ-HR-SSID
ssid HR
quit
ssid-profile name HQ-Sale-SSID
ssid Sale
quit

security-profile name HQ-Sec
security wpa2 psk pass-phrase 12345678 aes
y
quit

vap-profile name HQ-HR-VAP
forward-mode direct-forward
service-vlan vlan-id 30
ssid-profile HQ-HR-SSID
security-profile HQ-Sec
quit
vap-profile name HQ-Sale-VAP
forward-mode direct-forward
service-vlan vlan-id 40
ssid-profile HQ-Sale-SSID
security-profile HQ-Sec
quit

ap-group name HQ-AP-HR-Group
vap-profile HQ-HR-VAP wlan 1 radio 0
vap-profile HQ-HR-VAP wlan 1 radio 1
quit
ap-group name HQ-AP-Sale-Group
vap-profile HQ-Sale-VAP wlan 1 radio 0
vap-profile HQ-Sale-VAP wlan 1 radio 1
quit

ap-id 0 ap-mac 00e0-fcff-7db0
ap-name Corp-HQ-AC3030-HRAP
ap-group HQ-AP-HR-Group
y
ap-system-profile HQ-AP-System01
y
quit
ap-id 1 ap-mac 00e0-fcd6-3ae0
ap-name Corp-HQ-AC3030-SaleAP
ap-group HQ-AP-Sale-Group
y
ap-system-profile HQ-AP-System01
y
quit

return
save
 

AR2

system-view
sysname ISP-AR2240-Internet

# Configure interface
interface GigabitEthernet 0/0/0
ip address 102.1.1.1 255.255.255.252
description To Corp-HQ-AR2220-Gateway
quit
interface GigabitEthernet 0/0/1
ip address 103.1.1.2 255.255.255.252
description To Corp-BranchA-AR2240-Gateway 0/0/0
quit
interface GigabitEthernet 0/0/2
ip address 8.8.8.1 255.255.255.0
description To Internet-Client Ethernet0/0/0
quit

# Configuration Routing
ip route-static 202.1.1.0 255.255.255.248 102.1.1.2

return
save

 

AR3

system-view
sysname Corp-BranchA-AR2240-Gateway

vlan batch 3 7 8 9
dhcp enable

# Configuration ACL
acl name NAT 2000
rule 70 permit source 192.168.7.0 0.0.0.255
rule 80 permit source 192.168.8.0 0.0.0.255
rule 90 permit source 192.168.9.0 0.0.0.255
rule 4096 deny
quit
acl number 2100
rule 10 deny source 172.16.5.0 0.0.0.3
rule 20 deny source 172.16.5.4 0.0.0.3
rule 4096 permit
quit

# Configuration interface
interface GigabitEthernet 0/0/0
description To ISP-AR2240-Internet G0/0/1
ip address 103.1.1.1 255.255.255.252
nat outbound 2000
quit

interface GigabitEthernet 0/0/1
description To Corp-BranchA-S5700-CoreSW G0/0/1
quit
interface GigabitEthernet 0/0/1.7
description Vlan 7 termination sub-interface
ip address 192.168.7.254 255.255.255.0
dot1q termination vid 7
arp broadcast enable
dhcp select interface
dhcp server dns-list 172.16.30.1
dhcp server lease day 0 hour 6
quit
interface GigabitEthernet 0/0/1.8
description Vlan 8 termination sub-interface
ip address 192.168.8.254 255.255.255.0
dot1q termination vid 8
arp broadcast enable
dhcp select interface
dhcp server dns-list 172.16.30.1
dhcp server lease day 0 hour 6
quit
interface GigabitEthernet 0/0/1.9
description Vlan 9 termination sub-interface
ip address 192.168.9.254 255.255.255.0
dot1q termination vid 9
arp broadcast enable
dhcp select interface
dhcp server dns-list 172.16.30.1
dhcp server lease day 0 hour 6
quit

interface LoopBack 0
description OSPF Router-ID
ip address 10.2.1.1 255.255.255.255
quit

# Configuration GRE Tunnel
interface Tunnel 0/0/100
description This is a tunnel from 103.1.1.1 to 102.1.1.2
tunnel-protocol gre
ip address 10.1.1.2 255.255.255.252
source 103.1.1.1
destination 102.1.1.2
keepalive
quit

# Configure Router
ip route-static 0.0.0.0 0.0.0.0 103.1.1.2 description \”BrA Main Default Route\”

ospf 20 router-id 10.2.1.1
description Corp-BranchA-OSPF Network
silent-interface GigabitEthernet 0/0/0
silent-interface Tunnel 0/0/100
import-route ospf 100 cost 10000
area 0
network 192.168.9.0 0.0.0.255
quit
area 70
network 192.168.7.0 0.0.0.255
quit
area 80
network 192.168.8.0 0.0.0.255
quit
quit

ospf 100 router-id 10.2.1.1
description GRE Tunnel OSPF Network
silent-interface GigabitEthernet 0/0/0
silent-interface GigabitEthernet 0/0/1
import-route ospf 20 cost 10000
filter-policy 2100 import
area 0
network 10.1.1.0 0.0.0.3
quit
quit

return
save
 

 

 AR4

system-view
sysname Corp-BranchA-AR2240-PPP

acl number 2014
rule 10 deny source 172.16.5.0 0.0.0.3
rule 20 deny source 172.16.5.4 0.0.0.3
rule 4096 permit

# Configuration PPPoE Server
ip pool PPPoE-Pool01
network 172.16.1.0 mask 255.255.255.0
gateway-list 172.16.1.254
quit

aaa
authentication-scheme pppoe_a
authentication-mode local
quit
domain pppoe
authentication-scheme pppoe_a
quit
local-user user1@pppoe password cipher huawei@123
local-user user1@pppoe service-type ppp
quit

interface Virtual-Template 2
description For BranchB PPP
ppp authentication-mode chap domain pppoe
ip address 172.16.1.254 255.255.255.0
remote address pool PPPoE-Pool01
quit

# Configure interface
interface GigabitEthernet 0/0/0
description To Corp-BranchA-S5700-CoreSW G0/0/4
ip address 192.168.9.10 255.255.255.0
quit
interface GigabitEthernet 0/0/1
description To Corp-BranchB-AR2240-Gateway G0/0/0
pppoe-server bind Virtual-Template 2
quit
interface Serial 1/0/0
description To Corp-HQ-AR2220-Gateway Serial 1/0/0
ppp chap user pppuser
ppp chap password cipher hcie
ip address ppp-negotiate
shutdown
undo shutdown
quit

# Configuration Routing
ip route-static 0.0.0.0 0.0.0.0 192.168.14.1 preference 155 description \”BackupDefRoute from HQ-Gateway\”

# Configure OSPF
interface LoopBack 0
ip address 10.2.1.2 255.255.255.255
quit

ospf 14 router-id 10.2.1.2
description Corp-PPP-Network, Connect to Corp-HQ
silent-interface GigabitEthernet 0/0/0
silent-interface GigabitEthernet 0/0/1
import-route ospf 20 cost 10
default-route-advertise always cost 20
filter-policy 2014 import
area 0
network 192.168.14.0 0.0.0.3
quit
quit

ospf 20 router-id 10.2.1.2
description Corp-BranchA-OSPF Network
silent-interface GigabitEthernet 0/0/1
silent-interface Serial 1/0/0
default-route-advertise always cost 20
import-route ospf 14 cost 10
area 0
network 192.168.9.0 0.0.0.255
quit
area 16
network 172.16.1.0 0.0.0.255
quit
quit

return
save

 AR5

system-view
sysname Corp-BranchB-AR2240-gateway

# Configuration NAT ACL
acl name NAT 2000
rule 4096 deny
quit

# Configuration interface
interface Dialer 10
description PPPoE Connect To BranchA
dialer user BranchB-RT
dialer bundle 10
ppp chap user user1@pppoe
ppp chap password cipher huawei@123
ip address ppp-negotiate
nat outbound 2000
quit
interface GigabitEthernet 0/0/0
description To Corp-BranchA-AR2240-PPP G0/0/1
pppoe-client dial-bundle-number 10
quit

# Configuration Router
ip route-static 0.0.0.0 0.0.0.0 Dialer 10

return
save

 LSW1

system-view
sysname Corp-HQ-S5700-Core01

vlan batch 2 3 5 10 20 30 40 100

# Configure STP
stp enable
stp mode mstp
stp bpdu-protection
stp region-configuration
region-name MSTPCore
instance 1 vlan 2 3 10 30
instance 2 vlan 20 40 100
active region-configuration
quit
stp instance 1 priority 0
stp instance 2 priority 4096

# Configure Vlanif
interface vlanif 2
ip address 192.168.2.252 255.255.255.0
description 192.168.2.0/24 DNSServer Gateway
vrrp vrid 2 virtual-ip 192.168.2.254
vrrp vrid 2 priority 120
vrrp vrid 2 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 2 authentication-mode simple 114514
quit
interface vlanif 3
ip address 192.168.3.252 255.255.255.0
description 192.168.3.0/24 WEB_FTP Server Gateway
vrrp vrid 3 virtual-ip 192.168.3.254
vrrp vrid 3 priority 120
vrrp vrid 3 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 3 authentication-mode simple 114514
quit
interface vlanif 5
ip address 172.16.5.2 255.255.255.252
description 172.16.5.0/30 Connect to HQ–Gateway
quit
interface vlanif 10
ip address 192.168.10.252 255.255.255.0
description 192.168.10.0/24 CW Gateway
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 120
vrrp vrid 10 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 10 authentication-mode simple 114514
quit
interface vlanif 20
ip address 192.168.20.252 255.255.255.0
description 192.168.20.0/24 Dev Gateway
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 100
vrrp vrid 20 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 20 authentication-mode simple 114514
quit
interface vlanif 30
ip address 192.168.30.252 255.255.255.0
description 192.168.30.0/24 HRAP Gateway
vrrp vrid 30 virtual-ip 192.168.30.254
vrrp vrid 30 priority 10
vrrp vrid 30 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 30 authentication-mode simple 114514
quit
interface vlanif 40
ip address 192.168.40.252 255.255.255.0
description 192.168.40.0/24 SaleAP Gateway
vrrp vrid 40 virtual-ip 192.168.40.254
vrrp vrid 40 priority 100
vrrp vrid 40 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 40 authentication-mode simple 114514
quit
interface vlanif 100
ip address 192.168.100.252 255.255.255.0
description 192.168.100.0/24 For AC Control AP
vrrp vrid 100 virtual-ip 192.168.100.254
vrrp vrid 100 priority 120
vrrp vrid 100 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 100 authentication-mode simple 114514
quit

# Configure SwitchPort
interface Eth-Trunk 1
mode lacp-static
trunkport GigabitEthernet 0/0/1
trunkport GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
load-balance src-mac
description G0/0/1 to G0/0/2 To Corp-HQ-S5700-Core02 Eth-Trunk 1
quit
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
description Corp-HQ-S5700-Acc01 G0/0/1
quit
interface GigabitEthernet 0/0/4
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
description Corp-HQ-S5700-Acc02 G0/0/1
quit
interface GigabitEthernet 0/0/5
port link-type trunk
port trunk allow-pass vlan 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-AC6005-AC1 G0/0/1
quit
interface GigabitEthernet 0/0/6
port link-type access
port default vlan 5
stp edged-port enable
description To Corp-HQ-AR2220-Gateway G0/0/1
quit
interface GigabitEthernet 0/0/20
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-S5700-ServiceSW G0/0/1
quit

# Configure OSPF
interface LoopBack 0
ip address 10.1.1.2 255.255.255.255
quit

ospf 10 router-id 10.1.1.2
description Corp-HQ-OSPF Network
silent-interface Vlanif 2
silent-interface Vlanif 3
silent-interface Vlanif 10
silent-interface Vlanif 20
silent-interface Vlanif 30
silent-interface Vlanif 40
silent-interface Vlanif 100
area 0
network 172.16.5.0 0.0.0.3
quit
area 2
network 192.168.2.0 0.0.0.255
nssa
quit
area 3
network 192.168.3.0 0.0.0.255
nssa
quit
area 10
network 192.168.10.0 0.0.0.255
nssa
quit
area 20
network 192.168.20.0 0.0.0.255
nssa
quit
area 30
network 192.168.30.0 0.0.0.255
nssa
quit
area 40
network 192.168.40.0 0.0.0.255
nssa
quit
quit

return
save
 

LSW2

system-view
sysname Corp-HQ-S5700-Core02

vlan batch 2 3 5 10 20 30 40 100

# Configure STP
stp enable
stp mode mstp
stp bpdu-protection
stp region-configuration
region-name MSTPCore
instance 1 vlan 2 3 10 30
instance 2 vlan 20 40 100
active region-configuration
quit
stp instance 1 priority 4096
stp instance 2 priority 0

interface vlanif 2
ip address 192.168.2.253 255.255.255.0
description 192.168.2.0/24 DNSServer Gateway
vrrp vrid 2 virtual-ip 192.168.2.254
vrrp vrid 2 priority 100
vrrp vrid 2 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 2 authentication-mode simple 114514
quit
interface vlanif 3
ip address 192.168.3.253 255.255.255.0
description 192.168.3.0/24 WEB_FTP Server Gateway
vrrp vrid 3 virtual-ip 192.168.3.254
vrrp vrid 3 priority 100
vrrp vrid 3 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 3 authentication-mode simple 114514
quit
interface vlanif 5
ip address 172.16.5.5 255.255.255.252
description 172.16.5.3/29 Connect to HQ–Gateway
quit
interface vlanif 10
ip address 192.168.10.253 255.255.255.0
description 192.168.10.0/24 CW Gateway
vrrp vrid 10 virtual-ip 192.168.10.254
vrrp vrid 10 priority 100
vrrp vrid 10 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 10 authentication-mode simple 114514
quit
interface vlanif 20
ip address 192.168.20.253 255.255.255.0
description 192.168.20.0/24 Dev Gateway
vrrp vrid 20 virtual-ip 192.168.20.254
vrrp vrid 20 priority 120
vrrp vrid 20 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 20 authentication-mode simple 114514
quit
interface vlanif 30
ip address 192.168.30.253 255.255.255.0
description 192.168.30.0/24 HRAP Gateway
vrrp vrid 30 virtual-ip 192.168.30.254
vrrp vrid 30 priority 100
vrrp vrid 30 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 30 authentication-mode simple 114514
quit
interface vlanif 40
ip address 192.168.40.253 255.255.255.0
description 192.168.40.0/24 SaleAP Gateway
vrrp vrid 40 virtual-ip 192.168.40.254
vrrp vrid 40 priority 120
vrrp vrid 40 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 40 authentication-mode simple 114514
quit
interface vlanif 100
ip address 192.168.100.253 255.255.255.0
description 192.168.100.0/24 For AC Control AP
vrrp vrid 100 virtual-ip 192.168.100.254
vrrp vrid 100 priority 100
vrrp vrid 100 track interface GigabitEthernet 0/0/6 reduced 50
vrrp vrid 100 authentication-mode simple 114514
quit

interface Eth-Trunk 1
mode lacp-static
trunkport GigabitEthernet 0/0/1
trunkport GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
load-balance src-mac
description G0/0/1 to G0/0/2 To Corp-HQ-S5700-Core02 G0/0/1 G0/0/2 Eth-Trunk 1
quit
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
description Corp-HQ-S5700-Acc01 G0/0/2
quit
interface GigabitEthernet 0/0/4
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
description Corp-HQ-S5700-Acc02 G0/0/2
quit
interface GigabitEthernet 0/0/5
port link-type trunk
port trunk allow-pass vlan 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-AC6005-AC1 G0/0/2
quit
interface GigabitEthernet 0/0/6
port link-type access
port default vlan 5
stp edged-port enable
description To Corp-HQ-AR2220-Gateway G0/0/2
quit
interface GigabitEthernet 0/0/20
port link-type trunk
port trunk allow-pass vlan 10 20 30 40 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-S5700-ServiceSW G0/0/2
quit

# Configure OSPF
interface LoopBack 0
ip address 10.1.1.3 255.255.255.255

quit
ospf 10 router-id 10.1.1.3
description Corp-HQ-OSPF Network
silent-interface Vlanif 2
silent-interface Vlanif 3
silent-interface Vlanif 10
silent-interface Vlanif 20
silent-interface Vlanif 30
silent-interface Vlanif 40
silent-interface Vlanif 100
area 0
network 172.16.5.4 0.0.0.3
quit
area 2
network 192.168.2.0 0.0.0.255
nssa
quit
area 3
network 192.168.3.0 0.0.0.255
nssa
quit
area 10
network 192.168.10.0 0.0.0.255
nssa
quit
area 20
network 192.168.20.0 0.0.0.255
nssa
quit
area 30
network 192.168.30.0 0.0.0.255
nssa
quit
area 40
network 192.168.40.0 0.0.0.255
nssa
quit
quit

return
save

 

 LSw3

system-view
sysname Corp-HQ-S5700-Acc01

vlan batch 2 3 10 20 30 40 100

# Configure STP
stp enable
stp mode mstp
stp bpdu-protection
stp region-configuration
region-name MSTPCore
instance 1 vlan 2 3 10 30
instance 2 vlan 20 40 100
active region-configuration
quit

interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-S5700-Core01 G0/0/3
quit
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 2 3 10 20 30 40 100
undo port trunk allow-pass vlan 1
description To Corp-HQ-S5700-Core02 G0/0/3
quit
interface GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan 30 100
undo port trunk allow-pass vlan 1
port trunk pvid vlan 100
stp edged-port enable
description To Corp-HQ-AC3030-HRAP G0/0/0
quit
interface GigabitEthernet 0/0/4
port link-type access
port default vlan 10
stp edged-port enable
description To CWPC1 Ethernet 0/0/1
quit
interface GigabitEthernet 0/0/5
port link-type access
port default vlan 2
stp edged-port enable
description To WEB/FTP Server Ethernet 0/0/1
quit
interface GigabitEthernet 0/0/6
port link-type access
port default vlan 3
stp edged-port enable
description To DNS Server Ethernet 0/0/1
quit

return
save

 
#以上关于华为HCIA的相关内容来源网络仅供参考,相关信息请以官方公告为准!

原创文章,作者:CSDN,如若转载,请注明出处:https://www.sudun.com/ask/91770.html

(0)
CSDN的头像CSDN
上一篇 2024年6月23日
下一篇 2024年6月23日

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注