NA West Third difficult: GVRP, Eth-trunk, smart-link, monitor-link

GVRP

GVRP (GARP VLAN Registration Protocol), Chinese called GARP VLAN Registration Protocol;
GARP (the Generic the Attribute Registration Protocol), Generic Attribute Registration Protocol
GVRP to register and deregister VLAN attributes. Between each other so that the switch can exchange VLAN configuration information and dynamic VLAN creation and management, and control the trunk interface allows VLAN list, but can not automatically be divided into a user port corresponding VLAN.

VLAN classification

Static VLAN: VLAN manually configured static VLAN
Dynamic VLAN: VLAN created through GVRP dynamic VLAN

GVRP registration mode

Normal mode (default): Allow it to dynamically register and deregister VLAN, the spread of dynamic and static VLAN information
Fixed: In this mode interface to dynamically register and deregister VLAN, propagates only static VLAN information. I.e. be set to the trunk interface in this mode, even if all VLAN allows to pass through only VLAN that is manually configured
Forbidden: In this mode the interface dynamically register VLAN, except without any spread of VLAN 1 any VLAN information. I.e. be set to the trunk interface in this mode, even if all VLAN allows to pass through only a VLAN VLAN. 1

Topology
NA West Third difficult: GVRP, Eth-trunk, smart-link, monitor-link

The basic configuration (Normal Mode by default)

Trunk interconnection between the switch
S1 is ge0 / 0/1, S2 is ge0 / 0/1 and ge0 / 0/2, S3 is ge0 / 0/1 and ge0 / 0/2, S4 of ge0 / 0/1

[s1-GigabitEthernet0/0/1]port link-type trunk
[s1-GigabitEthernet0/0/1]port trunk allow-pass vlan all

Interconnect switch port configuration GVRP
Sl of ge0 / 0/1, S2 is ge0 / 0/1 and ge0 / 0/2, S3 is ge0 / 0/1 and ge0 / 0/2, S4 of ge0 / 0/1

[s1]gvrp
[s1-GigabitEthernet0/0/1]gvrp

单向注册,在s1上配置

vlan batch 10 20
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20

双向注册,在s4上配置

vlan batch 10 20
interface Ethernet0/0/1
 port link-type access
 port default vlan 10
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 20

S2上查看动态注册的vlan

[s2-GigabitEthernet0/0/2]dis vlan summary 
static vlan:
Total 1 static vlan.
  1 

dynamic vlan:
Total 2 dynamic vlan.
  10 20 

reserved vlan:
Total 0 reserved vlan

Fixed模式模式配置

[s1]gvrp
[s1-GigabitEthernet0/0/1]gvrp registration fixed 

Forbidden模式配置

[s1]gvrp
[s1-GigabitEthernet0/0/1]gvrp registration forbidden 

Smart Link与Monitor Link

Smart Link用于双归属上行组网,网络中两条上行链路在正常情况下, 一条连通,一条阻塞,防止了环路的出现;当主用链路发生故障时,流量会在毫秒级的时间内切换到备用链路,保证了数据的正常转发。
Smart Link能保证本设备上行链路故障快速切换,但是对于跨设备的链路故障需要配置Monitor Link,Monitor Link用于扩展Smart Link的链路备份的范围,通过监控上游设备的上行链路,达到上行链路故障迅速传达给下游设备,从而触发Smart Link的主备链路切换,防止长时间因上行链路故障而出现网络中断,使Smart Link备份作用更为完善。

拓扑
NA West Third difficult: GVRP, Eth-trunk, smart-link, monitor-link

配置Smart Link

S1配置smark-link组1
[s1]smart-link group 1
[s1-smlk-group1]smart-link enable

关闭e0/0/3和e0/0/4的stp
[s1-Ethernet0/0/3]stp disable 
[s1-Ethernet0/0/4]stp disable

配置主备接口
[s1]smart-link group 1
[s1-smlk-group1]port Ethernet 0/0/3 master 
[s1-smlk-group1]port Ethernet 0/0/4 slave

查看主备状态
[s1]display smart-link group 1
Smart Link group 1 information :
  Smart Link group was enabled
  There is no Load-Balance
  There is no protected-vlan reference-instance
  DeviceID: 4c1f-cc03-37eb
  Member                  Role   State    Flush Count Last-Flush-Time
  ----------------------------------------------------------------------

  Ethernet0/0/3           Master Active   0           0000/00/00 00:00:00 UTC+00
:00 
  Ethernet0/0/4           Slave  Inactive 0           0000/00/00 00:00:00 UTC+00
:00 

配置回切功能,回切时间30秒(默认为60秒)
[s1]smart-link group 1
[s1-smlk-group1]restore enable
[s1-smlk-group1]timer wtr 30

在上游交换机s2上配置Monitor Link组1
[s2]monitor-link group 1
[s2-mtlk-group1]port GigabitEthernet 0/0/1 uplink
[s2-mtlk-group1]port Ethernet 0/0/3 downlink 

配置Monitor Link回切时间
[s2-mtlk-group1]timer recover-time 10

Eth-Trunk链路聚合

Eth-Trunk是一种捆绑技术,它将多个物理接口捆绑成一个逻辑接口,这个逻辑接口就称为Eth-Trunk接口,捆绑在一起的每个物理接口称为成员接口。Eth-Trunk只能由以太网链路构成,Eth-Trunk链路两端相连的物理接口类型,物理接口数量,物理接口的速率,物理接口的双工方式以及物理接口的流控方式。
优势:
负载分担
提高可靠性
增加带宽

配置手工负载分担模式链路聚合:手工负载分担模式下,Eth-Trunk的建立、成员接口的加入完全由手工来配置。所有活动链路都参与数据的转发,平均分担流量。手工负载分担模式通常应用在对端设备不支持LACP协议的情况下。
配置LACP模式链路聚合:LACP模式下,需手工创建Eth-Trunk,手工加入Eth-Trunk成员接口,但活动接口的选择是由LACP协商确定的,配置相对灵活。LACP具有备份链路,保证链路的高可靠性。
NA West Third difficult: GVRP, Eth-trunk, smart-link, monitor-link

链路聚合缺省配置为手工负载分担模式

创建链路聚合组,将三个端口加入组内

interface Eth-Trunk1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/1
 eth-trunk 1
#
interface GigabitEthernet0/0/2
 eth-trunk 1
#
interface GigabitEthernet0/0/3
 eth-trunk 1

活动接口数上限阈值
设置活动接口数上限阈值的目的是在保证带宽的情况下提高网络的可靠性。当前活动链路数目达到上限阈值时,再向Eth-Trunk中添加成员接口,不会增加Eth-Trunk活动接口的数目,超过上限阈值的链路状态将被置为Down,作为备份链路。
例如,有8条无故障链路在一个Eth-Trunk内,每条链路都能提供1G的带宽,现在最多需要5G的带宽,那么上限阈值就可以设为5或者更大的值。其他的链路就自动进入备份状态以提高网络的可靠性
活动接口数下限阈值
设置活动接口数下限阈值是为了保证最小带宽,当前活动链路数目小于下限阈值时,Eth-Trunk接口的状态转为Down。
例如,每条物理链路能提供1G的带宽,现在最小需要2G的带宽,那么活动接口数下限阈值必须要大于等于2。

配置活动接口数阈值
在手动负载分担模式,不适用活动接口数上限阈值,可配置活动接口数下限阈值,缺省情况下,活动接口数下限阈值为1,本端和对端设备的活动接口数下限阈值可以不同

[s1-Eth-Trunk1]least active-linknumber 2

配置链路聚合模式为LACP模式
LACP模式下,需手工创建Eth-Trunk,手工加入Eth-Trunk成员接口,但活动接口的选择是由LACP协商确定的,配置相对灵活。
动态LACP模式适用于CE12800系列设备
动态LACP模式Eth-Trunk仅用于华为公司设备与服务器互连的场景。其他场景下,建议部署静态LACP模式Eth-Trunk,如果部署动态LACP,则网络会有成环风险。
当直连的两端设备都支持LACP协议时,建议选择静态LACP模式。
配置前要先取消成员接口中eth-trunk的配置

undo eth-trunk
[s1-Eth-Trunk1]mode lacp-static 
[s1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1
[s1-Eth-Trunk1]trunkport GigabitEthernet 0/0/2
[s1-Eth-Trunk1]trunkport GigabitEthernet 0/0/3

This need to ensure consistent polymerization mode terminal and terminal configuration. That is, if the local end configured as static LACP mode, the remote device must be configured as static LACP mode.

undo eth-trunk
[s2-Eth-Trunk1]mode lacp-static 
[s2-Eth-Trunk1]trunkport GigabitEthernet 0/0/1
[s2-Eth-Trunk1]trunkport GigabitEthernet 0/0/2
[s2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3

When both ends are directly connected to the device and the server, usually the dynamic mode LACP, static LACP mode may also be employed.
Run mode lacp-dynamic, Eth-Trunk working mode for dynamic LACP mode.

Reference Laboratory Manual HCNA network technology

Guess you like

Origin blog.51cto.com/jiayimeng/2448596