• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 关于我们

H3C园区交换机M-LAG配置指导书-6W108

12-M-LAG组网VRRP网关单挂场景配置举例

本章节下载  (465.73 KB)

12-M-LAG组网VRRP网关单挂场景配置举例


1 M-LAG组网VRRP网关单挂场景配置举例

1.1  组网需求

图1-1所示,Device A和Device B组成M-LAG系统,在两台M-LAG设备上部署VRRP,可以为下行接入设备提供冗余备份网关,VRRP虚拟IP地址作为接入设备的网关地址,Device D通过非M-LAG接口单归接入到VRRP网关Device A。两台M-LAG设备通过peer-link链路建立的三层接口建立路由邻居作为三层链路备份,如果Device A和Device B与上行设备Device C的链路故障,报文可以通过路由绕行到对端M-LAG设备处理。

1.2  适用设备及使用版本

说明

请在适用软件版本的基础上安装当前最新补丁。

 

设备

软件版本

S5590-HI、S5590-EI、S6805-G、S6850-G、S6530X、S6530X-G、S9850-G

R8336P09及以上的版本

 

1.3  组网图

图1-1 M-LAG组网VRRP网关单挂场景组网图

‌‌

表1-1 组网图示例接口与设备实际接口对应关系

组网图示例接口

设备实际接口

Interface1

GigabitEthernet1/0/1

Interface2

GigabitEthernet1/0/2

Interface3

GigabitEthernet1/0/3

Interface4

GigabitEthernet1/0/4

Interface5

GigabitEthernet1/0/5

 

1.4  配置限制和指导

对于非M-LAG接口单归接入的场景,为了使VLAN内的ARP/ND表项正常在两台M-LAG设备间同步,当本端M-LAG设备上行链路故障时,业务流量可以通过peer-link链路绕行到对端M-LAG设备上进行处理。请选择以下方式之一配置:

·     在两台M-LAG设备上将单挂业务VLAN配置为额外VLAN。(本例中采用这种方式,此方式要求设备上至少要有一个M-LAG聚合口,可以是空M-LAG聚合口或者设备上已存在的其他M-LAG聚合口)

·     在两台M-LAG设备创建一个空M-LAG聚合接口(无需加入任何物理接口),并将该M-LAG聚合接口加入单挂业务的VLAN。

建议在M-LAG设备上的单挂业务VLAN接口下配置ipv6 nd unsolicited-na-learning enable命令从未经请求的NA报文中学习邻居信息的功能。

1.5  配置步骤

(1)     配置Device A

# 配置M-LAG系统参数。

<Sysname> system-view

[Sysname] sysname DeviceA

[DeviceA] m-lag system-mac 1-1-1

[DeviceA] m-lag system-number 1

[DeviceA] m-lag system-priority 123

# 配置Keepalive报文的目的IP地址和源IP地址。按需选择IPv4或IPv6地址其一作为Keepalive报文的目的和源地址。

[DeviceA] m-lag keepalive ip destination 1.1.1.2 source 1.1.1.1

# 配置端口GigabitEthernet1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceA] interface gigabitethernet 1/0/5

[DeviceA-GigabitEthernet1/0/5] port link-mode route

[DeviceA-GigabitEthernet1/0/5] ip address 1.1.1.1 24

[DeviceA-GigabitEthernet1/0/5] ipv6 address 1::1 64

[DeviceA-GigabitEthernet1/0/5] quit

# 配置Keepalive链路接口为M-LAG保留接口。

[DeviceA] m-lag mad exclude interface gigabitethernet 1/0/5

# 创建动态二层聚合接口1。

[DeviceA] interface bridge-aggregation 1

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

[DeviceA-Bridge-Aggregation1] quit

# 分别将端口GigabitEthernet1/0/3和GigabitEthernet1/0/4加入到聚合组1中。

[DeviceA] interface gigabitethernet 1/0/3

[DeviceA-GigabitEthernet1/0/3] port link-aggregation group 1

[DeviceA-GigabitEthernet1/0/3] quit

[DeviceA] interface gigabitethernet 1/0/4

[DeviceA-GigabitEthernet1/0/4] port link-aggregation group 1

[DeviceA-GigabitEthernet1/0/4] quit

# 将二层聚合接口1配置为peer-link接口。

[DeviceA] interface bridge-aggregation 1

[DeviceA-Bridge-Aggregation1] port m-lag peer-link 1

[DeviceA-Bridge-Aggregation1] undo mac-address static source-check enable

[DeviceA-Bridge-Aggregation1] quit

# 创建动态二层聚合接口2,并配置该接口为M-LAG接口1。

[DeviceA] interface bridge-aggregation 2

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

[DeviceA-Bridge-Aggregation2] port m-lag group 1

[DeviceA-Bridge-Aggregation2] quit

# 将端口GigabitEthernet1/0/1加入到聚合组2中。

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] port link-aggregation group 2

[DeviceA-GigabitEthernet1/0/1] quit

# 为双归Device C的业务创建VLAN 200。

[DeviceA] vlan 200

[DeviceA] quit

# 配置二层聚合接口2为Trunk端口,并允许携带VLAN 200的报文通过。

[DeviceA] interface bridge-aggregation 2

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

[DeviceA-Bridge-Aggregation2] port trunk permit vlan 200

[DeviceA-Bridge-Aggregation2] quit

# 创建接口Vlan-interface200,并配置其IP地址。

[DeviceA] interface vlan-interface 200

[DeviceA-vlan-interface200] ip address 20.1.1.1 24

[DeviceA-vlan-interface200] ipv6 address 20:1:1::1 64

[DeviceA-vlan-interface200] quit

# 配置Vlan-interface200接口为M-LAG保留接口。

[DeviceA] m-lag mad exclude interface vlan-interface 200

# 为单归Device D的业务创建VLAN 100。

[DeviceA] vlan 100

[DeviceA] quit

# 配置二层以太网接口GigabitEthernet1/0/1为Trunk端口,并允许携带VLAN 100的报文通过。

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] port link-type trunk

[DeviceA-GigabitEthernet1/0/1] port trunk permit vlan 100

[DeviceA-GigabitEthernet1/0/1] quit

# 创建接口Vlan-interface100,并配置其IP地址。

[DeviceA] interface vlan-interface 100

[DeviceA-vlan-interface100] ip address 10.1.1.1 24

[DeviceA-vlan-interface100] ipv6 address 10:1:1::1 64

# 开启Vlan-interface100接口从未经请求的NA报文中学习邻居信息的功能。

[DeviceA-Vlan-interface100] ipv6 nd unsolicited-na-learning enable

[DeviceA-vlan-interface100] quit

# 配置Vlan-interface100接口为M-LAG保留接口。

[DeviceA] m-lag mad exclude interface vlan-interface 100

# 配置M-LAG的额外VLAN 100。

[DeviceA] m-lag extra-vlan 100

# 配置OSPF。

[DeviceA] ospf

[DeviceA-ospf-1] import-route direct

[DeviceA-ospf-1] area 0

[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceA-ospf-1-area-0.0.0.0] quit

[DeviceA-ospf-1] quit

# 配置OSPFv3。

[DeviceA] ospfv3

[DeviceA-ospfv3-1] router-id 10.1.1.1

[DeviceA-ospfv3-1] import-route direct

[DeviceA-ospfv3-1] area 0

[DeviceA-ospfv3-1-area-0.0.0.0] quit

[DeviceA-ospfv3-1] quit

[DeviceA] interface vlan-interface 200

[DeviceA-vlan-interface200] ospfv3 1 area 0.0.0.0

[DeviceA-vlan-interface200] quit

[DeviceA] interface vlan-interface 100

[DeviceA-vlan-interface100] ospfv3 1 area 0.0.0.0

[DeviceA-vlan-interface100] quit

# 为接口Vlan-interface100创建备份组1,并配置备份组1的虚拟IPv4地址为10.1.1.100,虚拟IPv6地址为10:1:1::100。

[DeviceA] interface vlan-interface 100

[DeviceA-Vlan-interface100] vrrp vrid 1 virtual-ip 10.1.1.100

[DeviceA-Vlan-interface100] vrrp ipv6 vrid 1 virtual-ip FE80::10 link-local

[DeviceA-Vlan-interface100] vrrp ipv6 vrid 1 virtual-ip 10:1:1::100

# 设置Device A在备份组1中的优先级为200,以保证Device A成为Master,从而和Device A在M-LAG中角色一致。

[DeviceA-Vlan-interface100] vrrp vrid 1 priority 200

[DeviceA-Vlan-interface100] vrrp ipv6 vrid 1 priority 200

[DeviceA-Vlan-interface100] quit

# 为接口Vlan-interface200创建备份组2,并配置备份组2的虚拟IPv4地址为20.1.1.100,虚拟IPv6地址为20:1:1::100。

[DeviceA] interface vlan-interface 200

[DeviceA-Vlan-interface200] vrrp vrid 2 virtual-ip 20.1.1.100

[DeviceA-Vlan-interface200] vrrp ipv6 vrid 2 virtual-ip FE80::20 link-local

[DeviceA-Vlan-interface200] vrrp ipv6 vrid 2 virtual-ip 20:1:1::100

# 设置Device A在备份组2中的优先级为200,以保证Device A成为Master,从而和Device A在M-LAG中角色一致。

[DeviceA-Vlan-interface200] vrrp vrid 2 priority 200

[DeviceA-Vlan-interface200] vrrp ipv6 vrid 2 priority 200

[DeviceA-Vlan-interface200] quit

(2)     配置Device B

# 配置M-LAG系统参数。

<Sysname> system-view

[Sysname] sysname DeviceB

[DeviceB] m-lag system-mac 1-1-1

[DeviceB] m-lag system-number 2

[DeviceB] m-lag system-priority 123

# 配置Keepalive报文的目的IP地址和源IP地址。

[DeviceB] m-lag keepalive ip destination 1.1.1.1 source 1.1.1.2

# 配置端口GigabitEthernet1/0/5工作在三层模式,并配置IP地址为Keepalive报文的源IP地址。

[DeviceB] interface gigabitethernet 1/0/5

[DeviceB-GigabitEthernet1/0/5] port link-mode route

[DeviceB-GigabitEthernet1/0/5] ip address 1.1.1.2 24

[DeviceB-GigabitEthernet1/0/5] ipv6 address 1::2 64

[DeviceB-GigabitEthernet1/0/5] quit

# 配置Keepalive链路接口为保留接口。

[DeviceB] m-lag mad exclude interface gigabitethernet 1/0/5

# 创建动态二层聚合接口1。

[DeviceB] interface bridge-aggregation 1

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

[DeviceB-Bridge-Aggregation1] quit

# 分别将端口GigabitEthernet1/0/3和GigabitEthernet1/0/4加入到聚合组1中。

[DeviceB] interface gigabitethernet 1/0/3

[DeviceB-GigabitEthernet1/0/3] port link-aggregation group 1

[DeviceB-GigabitEthernet1/0/3] quit

[DeviceB] interface gigabitethernet 1/0/4

[DeviceB-GigabitEthernet1/0/4] port link-aggregation group 1

[DeviceB-GigabitEthernet1/0/4] quit

# 将二层聚合接口1配置为peer-link接口。

[DeviceB] interface bridge-aggregation 1

[DeviceB-Bridge-Aggregation1] port m-lag peer-link 1

[DeviceB-Bridge-Aggregation1] undo mac-address static source-check enable

[DeviceB-Bridge-Aggregation1] quit

# 创建动态二层聚合接口2,并配置该接口为M-LAG接口1。

[DeviceB] interface bridge-aggregation 2

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

[DeviceB-Bridge-Aggregation2] port m-lag group 1

[DeviceB-Bridge-Aggregation2] quit

# 将端口GigabitEthernet1/0/1加入到聚合组2中。

[DeviceB] interface gigabitethernet 1/0/1

[DeviceB-GigabitEthernet1/0/1] port link-aggregation group 2

[DeviceB-GigabitEthernet1/0/1] quit

# 为双归Device C的业务创建VLAN 200。

[DeviceB] vlan 200

[DeviceB] quit

# 配置二层聚合接口2为Trunk端口,并允许携带VLAN 102的报文通过。

[DeviceB] interface bridge-aggregation 2

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

[DeviceB-Bridge-Aggregation2] port trunk permit vlan 200

[DeviceB-Bridge-Aggregation2] quit

# 创建接口Vlan-interface200,并配置其IP地址。

[DeviceB] interface vlan-interface 200

[DeviceB-vlan-interface200] ip address 20.1.1.2 24

[DeviceB-vlan-interface200] ipv6 address 20:1:1::2 64

[DeviceB-vlan-interface200] quit

# 配置Vlan-interface200接口为M-LAG保留接口。

[DeviceB] m-lag mad exclude interface vlan-interface 200

# 为单归Device D的业务创建VLAN 100。

[DeviceB] vlan 100

[DeviceB] quit

# 创建接口Vlan-interface100,并配置其IP地址。

[DeviceB] interface vlan-interface 100

[DeviceB-vlan-interface100] ip address 10.1.1.2 24

[DeviceB-vlan-interface100] ipv6 address 10:1:1::2 64

# 开启Vlan-interface100接口从未经请求的NA报文中学习邻居信息的功能。

[DeviceB-Vlan-interface100] ipv6 nd unsolicited-na-learning enable

[DeviceB-vlan-interface100] quit

# 配置Vlan-interface100接口为M-LAG保留接口。

[DeviceB] m-lag mad exclude interface vlan-interface 100

# 配置M-LAG的额外VLAN 100。

[DeviceB] m-lag extra-vlan 100

# 配置OSPF。

[DeviceB] ospf

[DeviceB-ospf-1] import-route direct

[DeviceB-ospf-1] area 0

[DeviceB-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceB-ospf-1-area-0.0.0.0] quit

[DeviceB-ospf-1] quit

# 配置OSPFv3。

[DeviceB] ospfv3

[DeviceB-ospfv3-1] router-id 10.1.1.2

[DeviceB-ospfv3-1] import-route direct

[DeviceB-ospfv3-1] area 0

[DeviceB-ospfv3-1-area-0.0.0.0] quit

[DeviceB-ospfv3-1] quit

[DeviceB] interface vlan-interface 200

[DeviceB-vlan-interface200] ospfv3 1 area 0.0.0.0

[DeviceB-vlan-interface200] quit

[DeviceB] interface vlan-interface 100

[DeviceB-vlan-interface100] ospfv3 1 area 0.0.0.0

[DeviceB-vlan-interface100] quit

# 为接口Vlan-interface100创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.100。

[DeviceB] interface vlan-interface 100

[DeviceB-Vlan-interface100] vrrp vrid 1 virtual-ip 10.1.1.100

[DeviceB-Vlan-interface100] vrrp ipv6 vrid 1 virtual-ip FE80::11 link-local

[DeviceB-Vlan-interface100] vrrp ipv6 vrid 1 virtual-ip 10:1:1::100

[DeviceB-Vlan-interface100] quit

# 为接口Vlan-interface200创建备份组2,并配置备份组2的虚拟IP地址为20.1.1.100。

[DeviceB] interface vlan-interface 200

[DeviceB-Vlan-interface200] vrrp vrid 2 virtual-ip 20.1.1.100

[DeviceB-Vlan-interface200] vrrp ipv6 vrid 2 virtual-ip FE80::21 link-local

[DeviceB-Vlan-interface200] vrrp ipv6 vrid 2 virtual-ip 20:1:1::100

[DeviceB-Vlan-interface200] quit

(3)     配置Device C

# 创建二层聚合接口2,并配置该接口为动态聚合模式。

<Sysname> system-view

[Sysname] sysname DeviceC

[DeviceC] interface bridge-aggregation 2

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

[DeviceC-Bridge-Aggregation2] quit

# 分别将端口GigabitEthernet1/0/1和GigabitEthernet1/0/2加入到聚合组2中。

[DeviceC] interface range gigabitethernet 1/0/1 to gigabitethernet 1/0/2

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

[DeviceC-if-range] quit

# 创建VLAN 200。

[DeviceC] vlan 200

[DeviceC-vlan200] quit

# 配置二层聚合接口2为Trunk端口,并允许VLAN 200的报文通过。

[DeviceC] interface bridge-aggregation 2

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

[DeviceC-Bridge-Aggregation2] port trunk permit vlan 200

[DeviceC-Bridge-Aggregation2] quit

# 配置接口GigabitEthernet1/0/3Acess端口,设置PVID200

[DeviceC] interface gigabitethernet 1/0/3

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

[DeviceC-GigabitEthernet1/0/3] port access vlan 200

[DeviceC-GigabitEthernet1/0/3] quit

# 创建接口Vlan-interface200,并配置其IP地址。

[DeviceC] interface vlan-interface 200

[DeviceC-vlan-interface200] ip address 20.1.1.3 24

[DeviceC-vlan-interface200] ipv6 address 20:1:1::3 64

[DeviceC-vlan-interface200] quit

# 配置OSPF。

[DeviceC] ospf

[DeviceC-ospf-1] import-route direct

[DeviceC-ospf-1] area 0

[DeviceC-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[DeviceC-ospf-1-area-0.0.0.0] quit

[DeviceC-ospf-1] quit

# 配置OSPFv3。

[DeviceC] ospfv3

[DeviceC-ospfv3-1] router-id 10.1.1.3

[DeviceC-ospfv3-1] import-route direct

[DeviceC-ospfv3-1] area 0

[DeviceC-ospfv3-1-area-0.0.0.0] quit

[DeviceC-ospfv3-1] quit

[DeviceC] interface vlan-interface 200

[DeviceC-vlan-interface200] ospfv3 1 area 0.0.0.0

[DeviceC-vlan-interface200] quit

(4)     配置Device D

# 创建VLAN 100。

<Sysname> system-view

[Sysname] sysname DeviceD

[DeviceD] vlan 100

# 配置二层以太网接口GigabitEthernet1/0/1为Trunk端口,并允许携带VLAN 100的报文通过。

[DeviceD] interface gigabitethernet 1/0/1

[DeviceD-GigabitEthernet1/0/1] port link-type trunk

[DeviceD-GigabitEthernet1/0/1] port trunk permit vlan 100

[DeviceD-GigabitEthernet1/0/1] quit

# 创建接口Vlan-interface100,并配置其IPv4和IPv6地址。

[DeviceD] interface vlan-interface 100

[DeviceD-Vlan-interface100] ip address 10.1.1.3 24

[DeviceD-vlan-interface100] ipv6 address 10:1:1::3 64

[DeviceD-Vlan-interface100] quit

# 配置接口GigabitEthernet1/0/2Acess端口,设置PVID100

[DeviceD] interface gigabitethernet 1/0/2

[DeviceD-GigabitEthernet1/0/2] port link-type access

[DeviceD-GigabitEthernet1/0/2] port access vlan 100

[DeviceD-GigabitEthernet1/0/2] quit

# 配置OSPF。

[DeviceD] ospf

[DeviceD-ospf-1] import-route direct

[DeviceD-ospf-1] area 0

[DeviceD-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[DeviceD-ospf-1-area-0.0.0.0] quit

[DeviceD-ospf-1] quit

# 配置OSPFv3。

[DeviceD] ospfv3

[DeviceD-ospfv3-1] router-id 10.1.1.4

[DeviceD-ospfv3-1] import-route direct

[DeviceD-ospfv3-1] area 0

[DeviceD-ospfv3-1-area-0.0.0.0] quit

[DeviceD-ospfv3-1] quit

[DeviceD] interface vlan-interface 100

[DeviceD-vlan-interface100] ospfv3 1 area 0.0.0.0

[DeviceD-vlan-interface100] quit

1.6  验证配置

1. M-LAG系统状态正常

# 在Device A上查看M-LAG的简要信息和详细信息。可以看到Device A和Device B成功组成M-LAG系统。

[DeviceA] display m-lag summary

Flags: A -- Aggregate interface down, B -- No peer M-LAG interface configured

       C -- Configuration consistency check failed

       D -- Standby status in active/standby mode

 

Peer-link interface: BAGG1

Peer-link interface state (cause): UP

Keepalive link state (cause): UP

 

                     M-LAG interface information

M-LAG IF    M-LAG group  Local state (cause)  Peer state  Remaining down time(s)

BAGG2       1            UP                   UP          -

# 在Device C上查看二层聚合组2的详细信息。可以看到Device C的端口GigabitEthernet1/0/1、GigabitEthernet1/0/2均处于选中状态,此时Device C将DeviceA和DeviceB认为是一台设备,从而实现了跨设备的聚合。

[DeviceC] display link-aggregation verbose

Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing

Port Status: S -- Selected, U -- Unselected, I -- Individual

Port: A -- Auto port, M -- Management port, R -- Reference port

Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,

        D -- Synchronization, E -- Collecting, F -- Distributing,

        G -- Defaulted, H -- Expired

Role: P -- Primary, S -- Secondary

 

Aggregate Interface: Bridge-Aggregation2

Creation Mode: Manual

Aggregation Mode: Dynamic

Loadsharing Type: Shar

Management VLANs: None

System ID: 0x8000, 0e90-5765-0100

Local:

  Port                Status   Priority Index    Oper-Key               Flag

  GE1/0/1             S        32768    1        1                      {ACDEF}

  GE1/0/2             S        32768    2        1                      {ACDEF}

Remote:

  Actor               Priority Index    Oper-Key SystemID               Flag

  GE1/0/1(R)          32768    16387    40001    0x7b  , 0001-0001-0001 {ACDEF}

  GE1/0/2             32768    32771    40001    0x7b  , 0001-0001-0001 {ACDEF}

2. VRRP备份组状态正常

# 在Device A上查看IPv4 VRRP和IPv6 VRRP备份组状态正常,DeviceA均为Master。

<DeviceA> display vrrp

IPv4 Virtual Router Information:

 Running mode : Standard

 Total number of virtual routers : 2

 Interface          VRID  State        Running Adver   Auth             Virtual

                                       Pri     Timer   Type             IP

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

 Vlan100            1     Master       200     100     Not supported    10.1.1.100

 Vlan200            2     Master       200     100     Not supported    20.1.1.100

<DeviceA> display vrrp ipv6

IPv6 Virtual Router Information:

 Running mode : Standard

 Total number of virtual routers : 2

 Interface          VRID  State        Running Adver   Auth             Virtual

                                       Pri     Timer   Type             IP

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

 Vlan100            1     Master       255     100     Not supported    FE80::10

 Vlan200            2     Master       255     100     Not supported    FE80::20

 

3. 路由协议正常

# 在DeviceC和DeviceD上查看OSPF、OSPFv3邻居,其邻居状态正常。

[DeviceC] display ospf peer

 

         OSPF Process 1 with Router ID 20.1.1.3

               Neighbor Brief Information

 

 Area: 0.0.0.0

 Router ID       Address         Pri Dead-Time  State             Interface

 20.1.1.1        20.1.1.1        1   32         Full/DROther      Vlan200

 20.1.1.2        20.1.1.2        1   33         Full/BDR          Vlan200

[DeviceC] display ospfv3 peer

 

               OSPFv3 Process 1 with Router ID 10.1.1.3

 

 Area: 0.0.0.0

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

 Router ID       Pri State             Dead-Time InstID Interface

 10.1.1.1        1   Full/BDR          00:00:30  0      Vlan200

 10.1.1.2        1   Full/DROther      00:00:36  0      Vlan200

# 在DeviceC或DeviceD上通过ping命令可以分别测试10.1.1.3到20.1.1.3、20:1:1::3和10:1:1::3正常可达。

[DeviceD] ping -a 10.1.1.3 20.1.1.3

Ping 20.1.1.3 (20.1.1.3) from 10.1.1.3: 56 data bytes, press CTRL+C to break

56 bytes from 20.1.1.3: icmp_seq=0 ttl=254 time=1.000 ms

56 bytes from 20.1.1.3: icmp_seq=1 ttl=254 time=1.000 ms

56 bytes from 20.1.1.3: icmp_seq=2 ttl=254 time=0.000 ms

56 bytes from 20.1.1.3: icmp_seq=3 ttl=254 time=2.000 ms

56 bytes from 20.1.1.3: icmp_seq=4 ttl=254 time=1.000 ms

 

--- Ping statistics for 20.1.1.3 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/1.000/2.000/0.632 ms

<DeviceC> ping ipv6 -a 20:1:1::3 10:1:1::3

Ping6(56 data bytes) 20:1:1::3 --> 10:1:1::3, press CTRL+C to break

56 bytes from 10:1:1::3, icmp_seq=0 hlim=63 time=2.000 ms

56 bytes from 10:1:1::3, icmp_seq=1 hlim=63 time=0.000 ms

56 bytes from 10:1:1::3, icmp_seq=2 hlim=63 time=0.000 ms

56 bytes from 10:1:1::3, icmp_seq=3 hlim=63 time=1.000 ms

56 bytes from 10:1:1::3, icmp_seq=4 hlim=63 time=1.000 ms

 

--- Ping6 statistics for 10:1:1::3 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/0.800/2.000/0.748 ms

# 在DeviceB上可以看到peer-link口同步的Device D的ARP表项。

<DeviceB> display arp

  Type: S-Static   D-Dynamic   O-Openflow   R-Rule   M-Multiport  I-Invalid

IP address      MAC address    VLAN/VSI name Interface                Aging Type

1.1.1.1         0e90-5bb4-020a --            GE1/0/5                  190   D

20.1.1.1        0e90-5bb4-0202 200           BAGG1                    194   D

20.1.1.100      0000-5e00-0102 200           BAGG1                    198   D

10.1.1.1        0e90-5bb4-0202 100           BAGG1                    192   D

10.1.1.3        0e90-6828-0402 100           BAGG1                    281   D

20.1.1.3        0e90-5765-0102 200           BAGG2                    259   D

 

1.7  配置文件

·     Device A:

#

 sysname DeviceA

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 20.1.1.0 0.0.0.255

#

ospfv3 1

 router-id 10.1.1.1

 import-route direct

 area 0.0.0.0

#

vlan 1

#

vlan 100

#

vlan 200

#

interface Bridge-Aggregation1

 port link-type trunk

 port trunk permit vlan all

 link-aggregation mode dynamic

 port m-lag peer-link 1

 undo mac-address static source-check enable

#

interface Bridge-Aggregation2

 port link-type trunk

 port trunk permit vlan 1 200

 link-aggregation mode dynamic

 port m-lag group 1

#

interface Vlan-interface100

 ip address 10.1.1.1 255.255.255.0

 ospfv3 1 area 0.0.0.0

 vrrp vrid 1 virtual-ip 10.1.1.100

 vrrp vrid 1 priority 200

 ipv6 nd unsolicited-na-learning enable

 ipv6 address 10:1:1::1/64

 vrrp ipv6 vrid 1 virtual-ip FE80::10 link-local

 vrrp ipv6 vrid 1 virtual-ip 10:1:1::100

 vrrp ipv6 vrid 1 priority 200

#

interface Vlan-interface200

 ip address 20.1.1.1 255.255.255.0

 ospfv3 1 area 0.0.0.0

 vrrp vrid 2 virtual-ip 20.1.1.100

 vrrp vrid 2 priority 200

 ipv6 address 20:1:1::1/64

 vrrp ipv6 vrid 2 virtual-ip FE80::20 link-local

 vrrp ipv6 vrid 2 virtual-ip 20:1:1::100

 vrrp ipv6 vrid 2 priority 200

#

interface GigabitEthernet1/0/5

 port link-mode route

 ip address 1.1.1.1 255.255.255.0

 ipv6 address 1::1/64

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 200

 port link-aggregation group 2

#

interface GigabitEthernet1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan all

 port link-aggregation group 1

#

interface GigabitEthernet1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan all

 port link-aggregation group 1

#

 m-lag mad exclude interface GigabitEthernet1/0/5

 m-lag mad exclude interface Vlan-interface100

 m-lag mad exclude interface Vlan-interface200

 m-lag system-mac 0001-0001-0001

 m-lag system-number 1

 m-lag system-priority 123

 m-lag extra-vlan 100

 m-lag keepalive ip destination 1.1.1.2 source 1.1.1.1

#

·     Device B:

#

 sysname DeviceB

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

  network 20.1.1.0 0.0.0.255

#

ospfv3 1

 router-id 10.1.1.2

 import-route direct

 area 0.0.0.0

#

vlan 1

#

vlan 100

#

vlan 200

#

interface Bridge-Aggregation1

 port link-type trunk

 port trunk permit vlan all

 link-aggregation mode dynamic

 port m-lag peer-link 1

 undo mac-address static source-check enable

#

interface Bridge-Aggregation2

 port link-type trunk

 port trunk permit vlan 1 200

 link-aggregation mode dynamic

 port m-lag group 1

#

interface Vlan-interface100

 ip address 10.1.1.2 255.255.255.0

 ospfv3 1 area 0.0.0.0

 vrrp vrid 1 virtual-ip 10.1.1.100

 ipv6 address 10:1:1::2/64

 ipv6 nd unsolicited-na-learning enable

 vrrp ipv6 vrid 1 virtual-ip FE80::11 link-local

 vrrp ipv6 vrid 1 virtual-ip 10:1:1::100

#

interface Vlan-interface200

 ip address 20.1.1.2 255.255.255.0

 ospfv3 1 area 0.0.0.0

 vrrp vrid 2 virtual-ip 20.1.1.100

 ipv6 address 20:1:1::2/64

 vrrp ipv6 vrid 2 virtual-ip FE80::21 link-local

 vrrp ipv6 vrid 2 virtual-ip 20:1:1::100

#

interface GigabitEthernet1/0/5

 port link-mode route

 ip address 1.1.1.2 255.255.255.0

 ipv6 address 1::2/64

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 200

 port link-aggregation group 2

#

interface GigabitEthernet1/0/3

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan all

 port link-aggregation group 1

#

interface GigabitEthernet1/0/4

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan all

 port link-aggregation group 1

#

 m-lag mad exclude interface GigabitEthernet1/0/5

 m-lag mad exclude interface Vlan-interface100

 m-lag mad exclude interface Vlan-interface200

 m-lag system-mac 0001-0001-0001

 m-lag system-number 2

 m-lag system-priority 123

 m-lag extra-vlan 100

 m-lag keepalive ip destination 1.1.1.1 source 1.1.1.2

#

·     Device C:

#

 sysname DeviceC

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 20.1.1.0 0.0.0.255

#

ospfv3 1

 router-id 10.1.1.3

 import-route direct

 area 0.0.0.0

#

vlan 200

#

interface Bridge-Aggregation2

 port link-type trunk

 port trunk permit vlan 1 200

 link-aggregation mode dynamic

#

interface Vlan-interface200

 ip address 20.1.1.3 255.255.255.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 20:1:1::3/64

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 200

 port link-aggregation group 2

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 200

 port link-aggregation group 2

#

interface GigabitEthernet1/0/3

 port link-mode bridge

 port access vlan 200

#

·     Device D:

#

 sysname DeviceD

#

ospf 1

 import-route direct

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

#

ospfv3 1

 router-id 10.1.1.4

 area 0.0.0.0

#

vlan 100

#

interface Vlan-interface100

 ip address 10.1.1.3 255.255.255.0

 ospfv3 1 area 0.0.0.0

 ipv6 address 10:1:1::3/64

#

interface GigabitEthernet1/0/1

 port link-mode bridge

 port link-type trunk

 port trunk permit vlan 1 100

#

interface GigabitEthernet1/0/2

 port link-mode bridge

 port access vlan 100

#

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们