华为三层交换机端口汇聚和交换机备份 实例介绍

1. 组网及功能实现

如图,配置以三层太网端口汇聚和交换机备份功能

华为三层交换机端口汇聚和交换机备份 实例介绍_第1张图片

2. 三层交换机配置步骤

(1)配置接口IP地址

在SW1和SW2上分别创建VLAN1的三层地址10.1.1.1/30和10.1.1.2/30。

(2)配置汇聚的端口属性

在配置端口汇聚之前,首先要保证Sw1和Sw2所有汇聚的端口必须工作在全双工方式下,而且必须工作在相同的速率下(不能工作于自协商模式,自协商模式容易导致网络工作于半双工或速率不匹配造成的网络瘫痪)。

(3)配置端口汇聚和vlan通过情况

3. 配置参数参考

(1)交换机Sw1的配置:

[SW1]interface Vlan-interface 1

[SW1-Vlan-interface1]ip add 10.1.1.1255.255.255.252

[SW1-Ethernet0/1]undo negotiation auto

[SW1-Ethernet0/1]speed 100

[SW1-Ethernet0/1]duplex full

[SW1-Ethernet0/1]port link-type trunk

[SW1-Ethernet0/1] port trunk allow-pass vlan all

[SW1-Ethernet0/2]speed 100

[SW1-Ethernet0/2]duplex full

[SW1-Ethernet0/1]port link-type trunk

[SW1-Ethernet0/1] port trunk allow-pass vlan all

(2)交换机SW2的配置:                                                                              

[SW2]interface Vlan-interface 1

[SW2-Vlan-interface1]ip add 10.1.1.2255.255.255.252

[SW2-Ethernet0/1]speed 100

[SW2-Ethernet0/1]duplex full

[SW2-Ethernet0/1]port link-type trunk

[SW2-Ethernet0/1] port trunk allow-pass vlan all

[SW2-Ethernet0/2]speed 100

[SW2-Ethernet0/2]duplex full

[SW2-Ethernet0/1]port link-type trunk

[SW2-Ethernet0/1] port trunk allow-pass vlan all

4. 结果验证

(1)检查配置的正确性

分别在SW1和SW2上显示当前配置,在SW1的系统视图执行display current-configuration,结果显示

#

sysname SW1

#

cluster enable

ntdp enable

ndp enable

#

drop illegal-mac alarm

#

diffserv domain default

#

drop-profile default

#

aaa

 authentication-scheme default

 authorization-scheme default

 accounting-scheme default

 domain default

 domain default_admin

 local-user admin password simple admin

 local-user admin service-type http

#

interface Vlanif1

 ip address 10.1.1.1 255.255.255.252

#

interface MEth0/0/1

#

interfaceGigabitEthernet0/0/1

 undo negotiation auto

 shutdown

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

#

interfaceGigabitEthernet0/0/2

 undo negotiation auto

 port link-type trunk

 port trunk allow-pass vlan 2 to 4094

同样,在SW2上检查配置正确性

(2)检查两个三层交换机的互通

分别在SW1、SW2上执行ping 10.1.1.2/1,显示网络联通

(3)验证端口汇聚的互为备份这个特性。

首先在SW1上用display mac-address命令检查MAC地址表,查看目前SW2的Interface Vlan 1的MAC地址在E0/1还是E0/2,SW2的Interface Vlan 1的MAC地址可以通过在SW2上利用命令Display Interface Vlan 1观察到。

1) [SW1]display mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  
               VSI/SI                                              MAC-Tunnel  
-------------------------------------------------------------------------------
4c1f-ccd5-61b6 1           -      -      GE0/0/1         dynamic   0/-         
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 1 

2) [SW2]display interface vlan
Vlanif1 current state : UP
Line protocol current state : UP
Last line protocol up time : 2018-01-10 16:06:13 UTC-08:00
Description:
Route Port,The Maximum Transmit Unit is 1500
Internet Address is 10.1.1.2/30
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 4c1f-ccd5-61b6
Current system time: 2018-01-10 19:01:41-08:00
    Input bandwidth utilization  : --
    Output bandwidth utilization : --

由上述输出可以知道,目前Sw1将要转发到Sw2的interface vlan1数据帧是通过GE0/0/1转发的。为了检验汇聚组中GE0/0/2是否能够备份E0/0/1,我们只要手工关闭E0/0/1在检查SW1和SW2之间的可通性即可。

3)关闭 GE0/0/1

[SW1-GigabitEthernet0/0/1]shutdown

[SW1-GigabitEthernet0/0/1]
Jan 10 2018 19:04:17-08:00 SW1 %%01PHY/1/PHY(l)[0]:    GigabitEthernet0/0/1: cha
nge status to down
Jan 10 2018 19:04:18-08:00 SW1 %%01PHY/1/PHY(l)[1]:    GigabitEthernet0/0/1: cha
nge status to down

4) 检查交换机的备份性能

ping 10.1.1.1

  PING10.1.1.1: 56  data bytes, press CTRL_C to break

    Reply from 10.1.1.1:bytes=56 Sequence=1 ttl=254 time = 13 ms

    Reply from 10.1.1.1:bytes=56 Sequence=2 ttl=254 time = 10 ms

    Reply from 10.1.1.1:bytes=56 Sequence=3 ttl=254 time = 8 ms

    Reply from 10.1.1.1:bytes=56 Sequence=4 ttl=254 time = 9 ms

    Reply from 10.1.1.1:bytes=56 Sequence=5 ttl=254 time = 10 ms

  --- 10.1.1.1ping statistics ---

    5 packet(s)transmitted

    5 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 8/10/13ms

5)确认现在利用SW1利用GE0/0/2进行连接

[SW1]display mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address    VLAN/       PEVLAN CEVLAN Port            Type      LSP/LSR-ID  
               VSI/SI                                              MAC-Tunnel  
-------------------------------------------------------------------------------
4c1f-ccd5-61b6 1           -      -      GE0/0/2         dynamic   0/-         
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 1 


结语:到目前为止,已经完成了三层交换机的汇聚功能,并验证了交换机备份的正确性










你可能感兴趣的:(计算机网络)