HCIE-LAB1-Option C1-part1


Layer-2

拓扑图

链路聚合:

S1和S2之间配置链路聚合,使用手动负载分担模式,基于源目MAC地址负载分担。

S1:

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

S2:

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

1.S1、S2、S3、S4互联接口的链路类型为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 Ethernet0/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 Ethernet0/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的网关,CE1会周期性发送Sender IP为10.3.2.254、源MAC为00-00-5E-00-01-02的免费ARP,Server1与网关之间的数据包封装在VLAN20中(Server收发untag的帧)。

4.VRRP的master设备重启时,在Gi0/0/2变为up1分钟后,才能重新成为master,接口IP地址已预配。

CE1:

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 GigabitEthernet0/0/2.20
vrrp vrid 2 virtual-ip 10.3.2.254
arp broadcast enable

CE2:

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

使用display vrrp brief 查看CE1和CE2的VRRP备份组状态,CE1为vrid 1的master,vrid 2的backup;CE2为vrid 1的backup,vrid 2的master。

MSTP:

1.S1、S2、S3、S4都运行MSTP,VLAN10在instance 10,S1作为Primary Root,S2作为Secondary Root;VLAN20在instance 20,S1作为Secondary Root,S2作为Primary Root;MSTP的region name为HUAWEI,Revision-level 12。

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

S1:

stp region-configuration
region-name HUAWEI
revision-level 12
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
stp edged-port default

interface gigabitEthernet0/0/1
stp edged-port disable

interface gigabitEthernet0/0/12
stp edged-port disable

interface Eth-Trunk 12
stp edged-port disable

S2:

stp region-configuration
region-name HUAWEI
revision-level 12
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
stp edged-port default

interface gigabitEthernet0/0/1
stp edged-port disable

interface gigabitEthernet0/0/12
stp edged-port disable

interface Eth-Trunk 12
stp edged-port disable

S3:

stp region-configuration
region-name HUAWEI
revision-level 12
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
stp edged-port default

interface gigabitEthernet0/0/1
stp edged-port disable

interface gigabitEthernet0/0/2
stp edged-port disable

S4:

stp region-configuration
region-name HUAWEI
revision-level 12
instance 10 vlan 10
instance 20 vlan 20
active region-configuration
stp edged-port default

interface gigabitEthernet0/0/1
stp edged-port disable

interface gigabitEthernet0/0/2
stp edged-port disable

使用 display stp instance 10(20)brief 查看MSTP实例端口角色是否正确,按照下图查看配置是否正确。

S3:

S4:

WAN:

PE1 接口 IPv4地址 IPv6地址
HDLC Ip-Trunk 1 10.1.13.1/30 2000:EAD8:99EF:CC3E:B2AD:9EFF:32DD:1300/127
RR1 接口 IPv4地址 IPv6地址
HDLC Ip-Trunk 1 10.1.13.2/30 2000:EAD8:99EF:CC3E:B2AD:9EFF:32DD:1301/127
PE3 接口 IPv4地址 N/A
PPP MP-Group 0/0/1 10.2.33.2/30
CE3 接口 IPv4地址 /NA
PPP MP-Group 0/0/1 10.2.33.1/30

1.PE1-RR1的互联Serial接口,绑定为一个逻辑接口,成员链路采用HDLC,逻辑接口的IPv4地址、IPv6地址按照上面表格进行配置。

PE1:

interface serial 0/0/0
link-protocol hdlc(输完这条命令会弹出一个封装协议将被修改的警告,键入y就行)

interface serial 0/0/1
link-protocol hdlc
interface Ip-Trunk 1
trunkport Serial 0/0/0 0/0/1
ip address 101.13.1 30
ipv6 enable
ipv6 address 2000:EAD8:99EF:CC3E:B2AD:9EFF:32DD:1300 127

RR1:

interface serial 0/0/0
link-protocol hdlc

interface serial 0/0/1
link-protocol hdlc
interface Ip-Trunk 1
trunkport Serial 0/0/0 0/0/1
ip address 101.13.2 30
ipv6 enable
ipv6 address 2000:EAD8:99EF:CC3E:B2AD:9EFF:32DD:1301 127

2.PE3-CE3的互联POS接口,绑定为一个逻辑接口,成员链路采用PPP,逻辑接口的IPv4地址按照上面表格进行配置。

PE3:

interface Mp-group 0/0/1
ip address 10.2.33.2 30

interface pos 4/0/0
ppp mp mp-group 0/0/1

interface pos 6/0/0
ppp mp mp-group 0/0/1

CE3:

interface Mp-group 0/0/1
ip address 10.2.33.1 30

interface pos 4/0/0
ppp mp mp-group 0/0/1

interface pos 6/0/0
ppp mp mp-group 0/0/1

配置完成后ping对方ip地址即可。


文章作者: Naraku
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Naraku !
  目录