华为认证专家HCIE必经之路——Lab讲解

Posted 新网工李白

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了华为认证专家HCIE必经之路——Lab讲解相关的知识,希望对你有一定的参考价值。

📻Lab拓扑

📠Lab题目

考试要求
不要删除或添加端口,严格按照拓扑完成题目需求。
考试题目
1、Layer-2(16分)
1.1链路聚合(2分)
1.S1和S2之间配置链路聚合,使用手动负载分担模式,基于源目MAC地址负载分担。(2分)

📢Lab讲解

解法:分别在S1,S2上配置Eth-Trunk.
S1配置如下:.

interface Eth-Trunk12
mode manual load-balance
load-balance src-dst-mac
trunkport GigabitEthernet 0/0/23 0/0/24

S2配置如下:
int Eth-Trunk 12

mode manual load-balance
load-balance src-dst-macb 
trunkport GigabitEthernet 0/0/23 0/0/24

1.2Link-type(7分)

1.S1、S2、S3、S4互连接口的链路类型为Trunk,允许除VLAN1外的所有VLAN通过。(3分)解法:在S1,S2,S3,S4上分别创建VLAN10,VLAN20,配置交换机之间的链路为Trunk,并放行除VLAN1之外的VLAN通过。

S1配置如下

vlan batch 10 20
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan all.
undo port trunk allow-pass vlan 1
interface Gigabitethernet 0/0/2
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1
interface GigabitEthernet 0/0/12
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1
interface eth-trunk 12
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1

S2配置如下:

vlan batch 10 20
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan all.
undo port trunk allow-pass vlan 1
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1
interface GigabitEthernet 0/0/12
port link-type trunk…
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1

interface eth-trunk 12
port link-type trunk…
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1

S3配置如下:

vlan batch 10 20
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1
interface Ethernet 0/0/1
port link-type access
port default vlan 10

S4配置如下:

vlan batch 10 20
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass vlan all
undo port trunk allow-pass vlan 1
interface Ethernet 0/0/1
port link-type access
port default vlan 20

2.CE1、CE2的VRRP虚拟IP地址10.3.1.254,为PC1的网关。CE1会周期性发送Sender IP为10.3.1.254、源MAC为00-00-5E-00-01-01的免费ARP。PC1与网关之间的数据包封装在VLAN10中(PC1收发untag的帧)。

3.CE1、CE2的VRRP虚拟IP地址10.3.2.254,为Server1的网关。CE2会周期性发送SenderIP为10.3.2.254、源MAC为00-00-5E-00-01-02的免费ARP。server1与网关之间的数据包封装在VLAN20中(Server1 收发untag的帧)。

4.VRRP的master设备重启时,在G0/0/2变为up1分钟后,才能重新成为master。(4分).

解法:在CE1的G0/0/2.10和G0/0/2.20接口上配置VRRP协议,接口地址已经预配。

interface GigabitEthernet0/0/2.10
vrrp vrid 1 virtual-ip 10.3.1.254
vrrp vrid 1 priority 120
vrrp vrid 1 preempt-mode timer delay 60
arp broadcast enable
interface GigabitEtherneto/0/2.20
vrrp vrid 2 virtual-ip 10.3.2.254
arp broadcast enable

在CE2的GO/0/2.10和G0/0/2.20接口上配置VRRP协议,接口地址已经预配。

interface GigabitEthernet0/0/2.10
vrrp vrid 1 virtual-ip 10.3.1.254
arp broadcast enable、

interface GigabitEthernet0/0/2.20
vrrp vrid 2 virtual-ip 10.3.2.254
vrrp vrid 2 priority 120
vrrp vrid 2 preempt-mode timer delay 60
arp broadcast enable

使用 dis vrrp查看CE1和CE2上VRRP备份组状态,CE1为vrid 1的Master,vrid2的 Backup,CE2为vrid2的Master,vrid1的Backup。如果不是请完成MSTP配置后再次查看,如果还不是,请查看Trunk接口是否配置有误。

1.3MSTP(5分)

1.S1、S2、S3、S4都运行MSTP。VLAN10在Instance 10,S1作为Primary Root,S2作为Secondary Root。VLAN20在Instance20,S2作为Primary Root,S1作为Secondary Root。MSTP的 region name是HUAWEI,Revision-level为12。(3分)

2.除了交换机互连的接口,其他接口要确保不参与MSTP计算,由Disabled 会直接转到Forwarding状态。(2分)

解法:分别在S1,S2,S3,54上配置MSTP,配置如下:

stp region-configuration 
region-name HUAWEI
revision-level 12
instance 10 vlan 10.
instance 20 vlan 20
active region-configuration…

在S1上配置Instance10和Instance20的根桥和备份根桥。

stp instance 10 root primary 
stp instance 20 root secondary

在S2上配置Instance10和Instance20的根桥和备份根桥。。

stp instance 10 root secondary
stp instance 20 root primary

在S3,S4上分别以下命令查看MSTP实例端口角色是否正确,S3的G0/0/1是Instance10的RP,是Instance20的AP,G0/0/2是Instance10的AP,是Instance20的RP,S4的G0/0/1是Instance10的AP,Instance20的RP,GO/0/2是Instance10的RP,Instance20的AP。

[S3]dis stp instance 10 brief
MSTID Port              Role STP State              Protection
10 GigabitEthernet0/0/1    ROOT FORWARDING        NONE
10 GigabitEthernet0/0/2    ALTE DISCARDING          NONE
[S3]dis stp instance 20 brief
MSTID Port              Role STP State              Protection
20 GigabitEthernet0/0/1    ALTE DISCARDING           NONE
20 GigabitEthernet0/0/2    ROOT FORWARDING          NONE
[S4]dis stp instance 20 brief 
MSTID Port              Role STP State               Protection
10 GigabitEthernet0/0/1    ALTE DISCARDING           NONE
10 GigabitEthernet0/0/2    ROOT FORWARDING          NONE
[S4]dis stp instance 20 brief   Role STP State              Protection
MSTID Port
20 GigabitEthernet0/0/1    ROOT FORWARDING          NONE
20 GigabitEthernet0/0/2    ALTE DISCARDING            NONE

分别在S1,S2,S3,S4配置边缘端口。

[S1]stp edged-port default
[S2]stp edged-port default
[S3]stp edged-port default.
[S4]stp edged-port default
分别在S1,S2的trunk接口配置非边缘端口。
interface Eth-Trunk12.
stp edged-port disable 
interface GigabitEthernet0/0/1.
stp edged-port disable 
nterface GigabitEthernet0/0/12.
stp edged-port disable

分别在S3,S4的Trunk 接口配置非边缘端口。

interface GigabitEthernet0/0/1
stp edged-port disable.
interface GigabitEthernet0/0/2
stp edged-port disable.

4、 WAN

  • PE1- -RR1的互连Serial接口,绑定为一个逻辑接口,成员链路采用HDLC。逻辑接口的ipv4地址,ipv6地址(ps:该ipv6地址放在ipv6需求中再进行配置)
[PE1-Serial0/0/0]link- protocol hdlc
[PE1-Serial0/0/1]link- protocol hdlc
[RR1-Serial0/0/0]link-protocol hdlc
[RR1-Serial0/0/1]link-protocol hdlc
[PE1]interface lp-Trunk 8
[PE1-|p-Trunk8]trunkport Serial 0/0/0
[PE1-|p-Trunk8]trunkport Serial 0/0/1
[PE1-|p-Trunk8]ip address 10.1.13.1 30
[RR1]interface lp-Trunk 8
[RR1-Ilp-Trunk8]trunkport Serial 0/0/0
[RR1-Ip-Trunk8]trunkport Serial 0/0/1
[RR1-Ip-Trunk8]jip address 10.1.13.2 30
  • PE3–CE3的互连POS接口,绑定为一个逻辑接口,成员链路采用ppp。逻辑接口的Ipv4地址。
[PE3]interface Mp-group 0/0/0
[PE3-Mp-group0/0/0]ip address 10.2.33.2 30
[PE3-Pos4/0/0]ppp mp Mp-group 0/0/0
[PE3-Pos6/0/0]ppp mp Mp-group 0/0/0
[CE3-Mp-group0/0/0]ip address  10.2.33.1 30
[CE3- Pos4/0/0]ppp mp Mp-group 0/0/0
[CE3-Pos6/0/0]ppp mp Mp-group 0/0/0
  1. IPv4 IGP

1.基本配置

  • 所有设备的接口lpv4地址(除PE1- -RR1的逻辑接口之外,已预配置)

  • Router-id与Loopback0的lpv4地址相同。MPLS域中各设备的
    Loopback0 ,从172.16.0.0/16取可用的主机地址,比如172.16.1.21/32可能
    分部在As100,也可能分部在AS200

2、 OSPF

  • CE1 和CE2之囘的链路,及该两台设备的Loopback0 ,通告入OSPF区域;
    0。(已预配置)

  • CE1 的GE0/0/2.10和GE0/0/2.20 , CE2的GE0/0/2.10和;
    GE0/0/2.20 ,直连网段宣告入OSPF区域0 ,但这些接口不能收发OSPF报
    文。

[E1-ospf-1-area-0.0.0.0]network 10.3.1.1 0.0.0.0
[CE1-ospf-1-area-0.0.0.0]network 10.3.2.1 0.0.0.0
[CE2-ospf-1-area-0.0.0.0]network 10.3.1.2 0.0.0.0
[CE2-ospf-1-area-0.0.0.0]network 10.3.2.2 0.0.0.0
[CE1-ospf-1]silent-interface g0/0/2.1O[CE1-ospf- 1]silent-interface g0/0/2.20
[CE2-ospf- 1]silent-interface g0/0/2.10[CE2-ospf- 1]silent-interface g0/0/2.20
  • RR2,P2,PE3,PE4在ospf区域0中,cost如图所示(都已预配置)

  • PE3-PE4 的ospf链路类型为p2p

[PE3-GigabitEthernet0/0/0]ospf network-type p2p
 [PE4-GigabitEthernet0/0/0]ospf network-type p2p
  • PE4.上Loopback0 地址引入 OSPF.。AS200中,&各OSPF 到PE4 lookback0的路由,要包含内部cost。
[PE4]ip ip-prefix Loopback permit  172.16.1.2 32
[PE4]route-policy Loopback permit node 10
[PE4-route-policy]if-match ip-prefix Loopback
[PE4-ospf-1]import-route direct route-policy Loopback type 1

3、ISIS

  • AS100 内Loopback0和互连接口全部开启ISIS协议,其中PE1、PE2路
    由类型L1 ,区域号为49.0001 ; RR1、P1路由类型L1/2,区域号为
    49.0001 ; ASBR1、ASBR2路由类型L2 ,区域号为49.0002。各ISIS
    System-lD唯一, cost-style 为wide ; cost值如图配置
[PE1-Ip-Trunk8]jisis enable[PE1-|p-Trunk8]jsis cost 1500
[RR1-Ip-Trunk8]isis enable[RR1-Ip-Trunk8]isis cost 1500

RR2-P2的ISIS链路类型为R2P

[RR2-GigabitEthernet0/0/0]isis circuit-type p2p
[P2-GigabitEthernet0/0/0lisis circuit-type p2p

为了保证后续mpls.Vpn中的AS 100 公网LDP的可达,在RR1和P1上做172. 16. 0.0/16主机路由level-2向level-1路由的渗透

RR1上配置路由的渗透

[RR1]ip ip-jirefix Tigerlab permit 172.16.0.0 16 greater-equal 32 less-equal 32
 [RR1jis- 1]import-route isis level-2 into level-1 fiter-policy ip-prefix Tigerlab

P1.上配置路由渗透:

[P1]ip ip-prefix Tigerlab permit 172.16.0.0 16 greater-equal 32 less-equal 32[P1-isis- 1]import-route isis level-2 into level-1 filter-policy ip-prefix Tigerlab
  • 在RR2、P2上, ISIS和OSPF双向引入前缀为172.160.0/16的主机路
    由。被引入的协议的cost要继承到引入后的协议中P2和PE4的
    Loopback0互访走最优路径。配置要求有最好的扩展性。
[RR2-ospf- 1]default cost inherit-metric
[P2-ospf- 1]default cost inherit-metric

P2 和 PE4的lookback0互访走最优路径的解法二:

[RR2-ospf- 1]default cost inherit-metric
[P2-ospf- 1]default cost inherit-metric

接下来在RR2和P2上针对前缀为172.16.0.0/16的主机路由进行双向映入

[RR2]ip ip-prefix Tigerlab permit 172.16.0.0 16 greater-eqûal 32 less-equal 32
[RR2]route-policy Tigerlab permit node 10
[RR2-route-policyif-match ip-prefix Tigerlab
[RR2-ospf- 1]import-route isis route-policy Tigerlab
[RR2-isis- 1]import-route ospf inherit-cost route-policy Tigerlab
[P2]ip ip-prefix Tigerlab permit 172.16.6.O 16 greater-equal 32 less-equal 32
[P2]route-policy Tigerlab permit nodè i0
[P2-route-policy]if-match ip-prefix Tigerlab
[P2-isis- 1]import-route ospf inherit-cost route-policy Tigerlab
[P2-ospf-1]import-route isis route-policy Tigerlab

1、在RR2上将ospf的路由引入到isis中去,添加tag为100,并拒绝tag为200的ospf路由(即从P2上ISIS路由引入到ospf的路由)

[RR2]route-policy ospftoisis deny node 10
[RR2-route-policy] if-match tag 200
[RR2]route-policy ospftoisis permit node 20
[RR2-route-policy]if- match ip-prefix Tigerlab
[RR2-route-policy]apply tag 100  
[R2-isis -1]import-route ospf inherit-cost route-policy ospftoisis

2、在P2上将ISIS的路由引入到ospf协议中,添加tag为200,并拒绝tag为100的isis路由(即从RR2上ospf路由引入到ISIS的路由)

[P2]route-policy isistoospf deny node 10
[P2-route-polcy]if-match tag 100
[P2]route-policy isistoospf permit node 20
[P2-route-policy]if-match ip-prefix Tigerlab
[P2-route-policy]apply tag 200
[P2-ospf- 1]import-route isis route-policysistoospf

3、在RR2上将TAG为200的路由优先级配置为150 (即从P2上引入到ospf协议的isis路由)

[RR2]route-policy preference permit node 10
[RR2-route-policy誉天HCIE-Storage课程学习指南

华为HCIE神秘大揭秘

《华为HCIE安全认证》学习笔记 | 安全认证概述

《华为HCIE安全认证》学习笔记 - 防火墙用户管理与认证技术

《华为HCIE安全认证》学习笔记 | 防火墙用户管理与认证技术

《华为HCIE安全认证》学习笔记 - 双机热备