H3C 堆叠项目实战

实验拓扑图

步骤1:配置堆叠

SW1配置:

[sw1]irf member 1 priority 32


[sw1]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50

[sw1-if-range]shutdown

[sw1-if-range]quit


[sw1]irf-port 1/1

[sw1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/49

[sw1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/50

[sw1-irf-port1/1]quit


[sw1]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50

[sw1-if-range]undo shutdown


save


SW2配置:

[sw2]irf member 1 renumber 2


reboot


[sw2]interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/50

[sw2-if-range]shutdown


[sw2]irf-port 2/2

[sw2-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/49

[sw2-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/50


[sw2]interface range Ten-GigabitEthernet 2/0/49 TO Ten-GigabitEthernet 2/0/50

[sw2-if-range]undo shutdown


save



SW1,SW2激活irf-port端口,sw2会自动重启,会发现两台合并一台

[sw1]irf-port-configuration active

[sw2]irf-port-configuration active


查看是否堆叠成功

[sw1]display irf

MemberID Role Priority CPU-Mac Description

*+1 Master 32 2aee-46ae-0100 ---

2 Standby 1 2aee-50bd-0200 ---

--------------------------------------------------

* indicates the device is the master.

+ indicates the device through which the user logs in.


The Bridge MAC of the IRF is: 2aee-46ae-0100

Auto upgrade : yes

Mac persistent : 6 min

Domain ID : 0



步骤2:二层聚合端口

Sw1:

[sw1]interface Bridge-Aggregation 1

[sw1-Bridge-Aggregation1]link-aggregation mode dynamic


[sw1]interface range GigabitEthernet 1/0/1 GigabitEthernet 2/0/2

[sw1-if-range]port link-aggregation group 1



[sw1]interface Bridge-Aggregation 2

[sw1-Bridge-Aggregation2]link-aggregation mode dynamic



[sw1]interface range GigabitEthernet 1/0/2 GigabitEthernet 2/0/1

[sw1-if-range]port link-aggregation group 2



SW3配置:

[sw3]interface Bridge-Aggregation 1

[sw3-Bridge-Aggregation1]link-aggregation mode dynamic


[sw3]interface range GigabitEthernet 1/0/1 GigabitEthernet 1/0/2

[sw3-if-range]port link-aggregation group 1





SW4配置:


[sw4]interface Bridge-Aggregation 2

[sw4-Bridge-Aggregation2]link-aggregation mode dynamic


[sw4]interface range GigabitEthernet 1/0/1 GigabitEthernet 1/0/2

[sw4-if-range]port link-aggregation group 2



Sw1:

查看端口是否聚合成功

[sw1]display link-aggregation verbose

[sw1]display link-aggregation summary


三层链路聚合:

Sw1配置:

[sw1]interface Route-Aggregation 10

[sw1-Route-Aggregation10]ip address 192.168.30.254 24


[sw1]interface range GigabitEthernet 1/0/3 GigabitEthernet 2/0/3

[sw1-if-range]port link-mode route

[sw1-if-range]port link-aggregation group 10


R1配置:


[R1]interface Route-Aggregation 10

[R1-Route-Aggregation10]ip address 192.168.30.253 24



[R1]interface range GigabitEthernet 0/0 GigabitEthernet 0/1

[R1-if-range]port link-aggregation group 10


[R1-if-range]ping 192.168.30.254

Ping 192.168.30.254 (192.168.30.254): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.30.254: icmp_seq=0 ttl=255 time=0.967 ms

56 bytes from 192.168.30.254: icmp_seq=1 ttl=255 time=0.626 ms

56 bytes from 192.168.30.254: icmp_seq=2 ttl=255 time=0.994 ms

56 bytes from 192.168.30.254: icmp_seq=3 ttl=255 time=1.308 ms

56 bytes from 192.168.30.254: icmp_seq=4 ttl=255 time=0.721 ms



步骤3:truck vlan配置

Sw1配置:

[sw1]vlan 10

[sw1-vlan10]vlan 20


[sw1]interface Vlan-interface 10

[sw1-Vlan-interface10]ip address 192.168.10.254 24

[sw1]interface Vlan-interface 20

[sw1-Vlan-interface20]ip address 192.168.20.254 24


[sw1]interface Bridge-Aggregation 1

[sw1-Bridge-Aggregation1]port link-type trunk

[sw1-Bridge-Aggregation1]port trunk permit vlan 10


[sw1]interface Bridge-Aggregation 2

[sw1-Bridge-Aggregation1]port link-type trunk

[sw1-Bridge-Aggregation1]port trunk permit vlan 20




Sw3配置:

[sw3]vlan 10


[sw3]interface Bridge-Aggregation 1

[sw3-Bridge-Aggregation1]port link-type trunk

[sw3-Bridge-Aggregation1]port trunk permit vlan 10


[sw3]interface GigabitEthernet 1/0/3

[sw3-GigabitEthernet1/0/3]port link-type access

[sw3-GigabitEthernet1/0/3]port access vlan 10


Sw4配置:

[sw4]vlan 20


[sw4]int Bridge-Aggregation 2

[sw4-Bridge-Aggregation2]port link-type trunk

[sw4-Bridge-Aggregation2]port trunk permit vlan 20


[sw4]interface GigabitEthernet 1/0/3

[sw4-GigabitEthernet1/0/3]port link-type access

[sw4-GigabitEthernet1/0/3]port access vlan 20



pc1:192.168.10.1/24 ip route-static 0.0.0.0 0 192.168.10.254

Pc2:192.168.20.1/24 ip route-static 0.0.0.0 0 192.168.20.254

测试是否互拼成功

[pc1]ping 192.168.20.1

Ping 192.168.20.1 (192.168.20.1): 56 data bytes, press CTRL_C to break

56 bytes from 192.168.20.1: icmp_seq=0 ttl=254 time=6.793 ms

56 bytes from 192.168.20.1: icmp_seq=1 ttl=254 time=3.501 ms

56 bytes from 192.168.20.1: icmp_seq=2 ttl=254 time=3.977 ms

56 bytes from 192.168.20.1: icmp_seq=3 ttl=254 time=2.968 ms

56 bytes from 192.168.20.1: icmp_seq=4 ttl=254 time=6.675 ms


步骤4:启用mad多主检测

Sw1配置:

[sw1]interface Bridge-Aggregation 1

[sw1-Bridge-Aggregation1]mad enable

You need to assign a domain ID (range: 0-4294967295)

[Current domain is: 0]: 0

The assigned domain ID is: 0

MAD LACP only enable on dynamic aggregation interface.

//domain id 默认为0,由于实验只有一个堆叠,默认堆叠域为0就行


Sw3配置:

[sw1]interface Bridge-Aggregation 1

[sw1-Bridge-Aggregation1]mad enable


Sw4配置:

[sw1]interface Bridge-Aggregation 2

[sw1-Bridge-Aggregation1]mad enable



查看mad多主情况

[sw1]display mad verbose

Current MAD status: Detect

Excluded ports(configurable):

Excluded ports(can not be configured):

Ten-GigabitEthernet1/0/49

Ten-GigabitEthernet1/0/50

MAD ARP disabled.

MAD ND disabled.

MAD enabled aggregation port:

Bridge-Aggregation1

MAD BFD disabled.


步骤5:配置nat和路由

Sw1配置:

[sw1]ip route-static 0.0.0.0 0 192.168.30.253


R1配置:

[R1]ip route-static 0.0.0.0 0 12.1.1.2

[R1]ip route-static 12.168.0.0 255.255.0.0 192.168.30.254


[R1]interface GigabitEthernet 0/2

[R1-GigabitEthernet0/2]ip address 12.1.1.1 255.255.255.0


[R1]nat address-group 1

[R1-address-group-1]address 12.1.1.10 12.1.1.13


[R1]acl basic 2001

[R1-acl-ipv4-basic-2001]rule permit source 192.168.10.0 0.0.0.255

[R1-acl-ipv4-basic-2001]rule permit source 192.168.20.0 0.0.0.255



[R1]interface GigabitEthernet 0/2

[R1-GigabitEthernet0/2]nat outbound 2001 address-group 1


R2配置:

[R2]int g0/0

[R2-GigabitEthernet0/0]ip address 12.1.1.2 24

[R2]interface LoopBack 0

[R2-LoopBack0]ip address 100.100.100.100 32


测试是否可以访问外网:

ping 100.100.100.100

Ping 100.100.100.100 (100.100.100.100): 56 data bytes, press CTRL_C to break

56 bytes from 100.100.100.100: icmp_seq=0 ttl=253 time=8.555 ms

56 bytes from 100.100.100.100: icmp_seq=1 ttl=253 time=2.927 ms

56 bytes from 100.100.100.100: icmp_seq=2 ttl=253 time=1.000 ms

56 bytes from 100.100.100.100: icmp_seq=3 ttl=253 time=1.767 ms

56 bytes from 100.100.100.100: icmp_seq=4 ttl=253 time=1.210 ms


R1查看nat转换出去

[R1]display nat session

Slot 0:

Initiator:

Source IP/port: 192.168.10.1/43008

Destination IP/port: 100.100.100.100/2048

DS-Lite tunnel peer: -

VPN instance/VLAN ID/VLL ID: -/-/-

Protocol: ICMP(1)

Inbound interface: Route-Aggregation10


Total sessions found: 1





测试1:断开底下truck

测试1:断开底下truck

测试2:断开堆叠线

测试2:断开堆叠线

测试3:断开上行链路

测试3:断开上行链路

测试4:禁用stp

[sw1]undo stp global enable

[sw3]undo stp global enable

[sw4]undo stp global enable

测试4:禁用stp

实战   项目   H3C
发表评论
留言与评论(共有 0 条评论) “”
   
验证码:

相关文章

推荐文章