EVPN管理
本章节介绍EVPN管理的配置模型,以及配置的XML报文举例说明。
数据模型
EVPN的对应配置模型文件名为huawei-ethernet-vpn.yang、huawei-bgp-l3vpn.yang和huawei-bgp.yang。
节点 |
说明 |
取值范围 |
备注 |
---|---|---|---|
/huawei-ethernet-vpn:vpn-instances/vpn-instance/vpn-instance-name |
创建EVPN实例的实例名 |
字符串形式,不支持空格,区分大小写,长度范围是1~31。 |
NA |
/huawei-ethernet-vpn:vpn-instances/vpn-instance/evpn-type |
创建EVPN实例的实例类型 |
枚举格式:
说明:
当前仅支持取值为bdevpn。 |
NA |
/huawei-ethernet-vpn:vpn-instances/vpn-instance/route-distinguisher |
为EVPN实例配置RD |
字符串形式,不支持空格,区分大小写,长度范围是3~21。 |
NA |
/huawei-ethernet-vpn:vpn-instances/vpn-instance/evpntargets/evpntarget/evrf-rtvalue |
为EVPN实例配置VPN-Target扩展团体属性的值 |
字符串形式,不支持空格,区分大小写,长度范围是3~21。 |
NA |
/huawei-ethernet-vpn:vpn-instances/vpn-instance/evpntargets/evpntarget/evrf-rttype |
为EVPN实例配置VPN-Target扩展团体属性的类型 |
枚举格式:
|
NA |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/huawei-ethernet-vpn:advertise-to-ethernet-vpn |
使能VPN实例向EVPN实例发布IP路由功能 |
NA |
NA |
/huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn:evpn-vpn-instance-name |
指定与BD绑定的EVPN实例名 |
字符串形式,不支持空格,区分大小写,长度范围是1~31。 |
参考节点/hw-ethvpn:vpn-instances/hw-ethvpn:vpn-instance/hw-ethvpn:vpn-instance-name |
/huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn:arp-broadcast-suppress |
使能ARP广播抑制功能 |
布尔型,具体取值如下:
|
NA |
/huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn:mismatch-discard |
使能ARP广播抑制功能时,对ARP广播报文不匹配丢弃动作 |
布尔型,具体取值如下:
|
当/huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn:arp-broadcast-suppress节点为true时,此节点才可以配置 |
/huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn: nd-multicast-suppress |
使能NS组播抑制功能 |
布尔型,具体取值如下:
|
NA |
/huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn: nd-mismatch-discard |
使能NS组播抑制功能时,对NS组播报文执行不匹配丢弃动作 |
布尔型,具体取值如下:
|
当/huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn: nd-multicast-suppress节点为true时,此节点才可以配置 |
/huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv4-family/huawei-ethernet-vpn:evpntargets/evpntarget/evrf-rtvalue |
指定用于交叉进入VPN实例的EVPN路由的VPN-Target值 |
字符串形式,不支持空格,区分大小写,长度范围是3~21。 |
NA |
/huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv4-family/huawei-ethernet-vpn:evpntargets/evpntarget/evrf-rttype |
指定用于交叉进入VPN实例的EVPN路由的VPN-Target类型 |
枚举格式:
|
NA |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/active |
配置使能与指定对等体之间交换相关的路由信息 |
布尔型,具体取值如下:
|
NA |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/route-reflector-client |
配置将本机作为路由反射器,并将对等体作为路由反射器的客户 |
布尔型,具体取值如下:
|
当/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/active节点为true时,此节点才可以配置 |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/huawei-ethernet-vpn:advertise-host-route-mode |
配置向BGP EVPN对等体发布ARP路由或者IRB路由 |
枚举格式:
|
NA |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing /bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/huawei-ethernet-vpn:advertise-host-ipv6-route-mode |
配置向BGP EVPN对等体发布ND路由或者IRBv6路由 |
枚举格式:
|
NA |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/l2vpn/evpn/vpn-target-filter |
配置对接收到的EVPN路由进行VPN-Target过滤 |
枚举格式:
|
NA |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/af-configuration/l2vpn/evpn/cluster-id |
在BGP EVPN地址族配置路由反射器的集群ID。 |
可选以下两个格式之一:
|
NA |
配置vxlan-evpn
本章节主要介绍通过config方法对vxlan-evpn进行配置。
操作 |
XPATH |
---|---|
Config |
/huawei-ethernet-vpn:vpn-instances/vpn-instance/vpn-instance-name /huawei-ethernet-vpn:vpn-instances/vpn-instance/evpn-type /huawei-ethernet-vpn:vpn-instances/vpn-instance/route-distinguisher /huawei-ethernet-vpn:vpn-instances/vpn-instance/evpntargets/evpntarget/evrf-rtvalue /huawei-ethernet-vpn:vpn-instances/vpn-instance/evpntargets/evpntarget/evrf-rttype /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-router/huawei-bgp-l3vpn:bgp-af-ipv4-vpn-instances/bgp-af-ipv4-vpn-instance/huawei-ethernet-vpn:advertise-to-ethernet-vpn /huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn:evpn-vpn-instance-name /huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn:arp-broadcast-suppress /huawei-bd:bridge-domains/bridge-domain/huawei-ethernet-vpn:mismatch-discard /huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv4-family/huawei-ethernet-vpn:evpntargets/evpntarget/evrf-rtvalue /huawei-l3vpn:vpn-instances/vpn-instance/huawei-bgp-l3vpn:ipv4-family/huawei-ethernet-vpn:evpntargets/evpntarget/evrf-rttype |
数据需求
项目 |
数据 |
描述 |
---|---|---|
EVPN实例名 |
mm |
指定EVPN实例名为mm |
EVPN实例模式 |
bdevpn |
指定EVPN实例模式为bd-mode |
EVPN实例的RD |
10:10 |
指定EVPN实例的RD为10:10 |
EVPN实例的vpn-target的值 |
10:10 |
指定EVPN实例的vpn-target的值为10:10 |
VPN实例向EVPN实例发布IP路由功能 |
空格 |
使能VPN实例向EVPN实例发布IP路由功能 |
指定与BD绑定的EVPN实例名 |
mm |
指定与BD绑定的EVPN实例名为mm |
使能ARP广播抑制功能 |
true |
使能ARP广播抑制功能 |
ARP广播抑制功能时的不匹配丢弃动作 |
true |
使能ARP广播抑制功能时的不匹配丢弃动作 |
指定用于交叉进入EVPN实例的VPN-Target值 |
2:2 |
指定用于交叉进入EVPN实例的VPN-Target值为2:2 |
指定用于交叉进入EVPN实例的VPN-Target类型 |
both |
指定用于交叉进入EVPN实例的VPN-Target类型为both |
请求示例
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-ethvpn:vpn-instances xmlns:hw-ethvpn="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn"> <hw-ethvpn:vpn-instance> <hw-ethvpn:vpn-instance-name>mm</hw-ethvpn:vpn-instance-name> <hw-ethvpn:evpn-type>bdevpn</hw-ethvpn:evpn-type> <hw-ethvpn:route-distinguisher>10:10</hw-ethvpn:route-distinguisher> <hw-ethvpn:evpntargets> <hw-ethvpn:evpntarget> <hw-ethvpn:evrf-rtvalue>10:10</hw-ethvpn:evrf-rtvalue> <hw-ethvpn:evrf-rttype>both</hw-ethvpn:evrf-rttype> </hw-ethvpn:evpntarget> </hw-ethvpn:evpntargets> </hw-ethvpn:vpn-instance> </hw-ethvpn:vpn-instances> <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-instance> <hw-l3vpn:vpn-instance-name>kk</hw-l3vpn:vpn-instance-name> <hw-bgp-vpn:ipv4-family xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:route-distinguisher>9:9</hw-bgp-vpn:route-distinguisher> <hw-ethvpn:evpntargets xmlns:hw-ethvpn="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn"> <hw-ethvpn:evpntarget> <hw-ethvpn:evrf-rtvalue>2:2</hw-ethvpn:evrf-rtvalue> <hw-ethvpn:evrf-rttype>both</hw-ethvpn:evrf-rttype> </hw-ethvpn:evpntarget> </hw-ethvpn:evpntargets> </hw-bgp-vpn:ipv4-family> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance> <rt:name>bgp</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:huawei-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">huawei-bgp:bgp-routing-protocol</rt:type> <rt:name>bgp</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>100</hw-bgp:local-as-number> <hw-bgp-vpn:bgp-af-ipv4-vpn-instances xmlns:hw-bgp-vpn="urn:huawei:params:xml:ns:yang:huawei-bgp-l3vpn"> <hw-bgp-vpn:bgp-af-ipv4-vpn-instance> <hw-bgp-vpn:vpn-instance-name>kk</hw-bgp-vpn:vpn-instance-name> <hw-ethvpn:advertise-to-ethernet-vpn xmlns:hw-ethvpn="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn"> </hw-ethvpn:advertise-to-ethernet-vpn> </hw-bgp-vpn:bgp-af-ipv4-vpn-instance> </hw-bgp-vpn:bgp-af-ipv4-vpn-instances> </hw-bgp:bgp-router> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> <bd:bridge-domains xmlns:bd="urn:huawei:params:xml:ns:yang:huawei-bd"> <bd:bridge-domain> <bd:id>10</bd:id> <hw-ethvpn:evpn-vpn-instance-name xmlns:hw-ethvpn="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn">mm</hw-ethvpn:evpn-vpn-instance-name> <hw-ethvpn:arp-broadcast-suppress xmlns:hw-ethvpn="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn">true</hw-ethvpn:arp-broadcast-suppress> <hw-ethvpn:mismatch-discard xmlns:hw-ethvpn="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn">true</hw-ethvpn:mismatch-discard> </bd:bridge-domain> </bd:bridge-domains> <hw-vxlan:vxlan xmlns:hw-vxlan="urn:huawei:params:xml:ns:yang:huawei-vxlan"> <hw-vxlan:nve> <hw-vxlan:id>1</hw-vxlan:id> <hw-vxlan:vni-config> <hw-vxlan:vni>10</hw-vxlan:vni> <hw-vxlan:bgp> </hw-vxlan:bgp> <hw-vxlan:bdid>10</hw-vxlan:bdid> </hw-vxlan:vni-config> </hw-vxlan:nve> </hw-vxlan:vxlan> </config> </edit-config> </rpc>
响应示例
配置成功响应示例
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <ok/> </rpc-reply>
配置失败响应示例
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>The BGP protocol supports single instance only.</error-message> <error-info>Error on node /ietf-routing:routing/routing-instance[name="bgp"]/routing-protocols/routing-protocol[type="huawei-bgp:bgp-routing-protocol",name="bgp"]/huawei-bgp:bgp-routing/bgp-router/local-as-number</error-info> </rpc-error> </rpc-reply>
配置l2vpn-evpn
本章节主要介绍通过config方法来实现对l2vpn-evpn的配置。
操作 |
XPATH |
---|---|
Config |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/active /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/route-reflector-client /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor/af-specific-config/l2vpn/evpn/huawei-ethernet-vpn:advertise-host-route-mode |
数据需求
项目 |
数据 |
描述 |
---|---|---|
配置使能与指定对等体之间交换相关的路由信息 |
true |
使能与指定对等体之间交换相关的路由信息 |
配置将本机作为路由反射器,并将对等体作为路由反射器的客户 |
true |
将本机作为路由反射器,并将对等体作为路由反射器的客户 |
配置向BGP EVPN对等体发布ARP路由或者IRB路由 |
arp |
向BGP EVPN对等体发布ARP路由 |
请求示例
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance> <rt:name>bgp</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:huawei-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp">huawei-bgp:bgp-routing-protocol</rt:type> <rt:name>bgp</rt:name> <hw-bgp:bgp-routing xmlns:hw-bgp="urn:huawei:params:xml:ns:yang:huawei-bgp"> <hw-bgp:bgp-router> <hw-bgp:local-as-number>100</hw-bgp:local-as-number> </hw-bgp:bgp-router> <hw-bgp:bgp-neighbors> <hw-bgp:bgp-neighbor> <hw-bgp:peer-address>10.1.1.1</hw-bgp:peer-address> <hw-bgp:remote-as>100</hw-bgp:remote-as> <hw-bgp:af-specific-config> <hw-bgp:l2vpn> <hw-bgp:evpn> <hw-bgp:active>true</hw-bgp:active> <hw-bgp:route-reflector-client>true</hw-bgp:route-reflector-client> <hw-ethvpn:advertise-host-route-mode xmlns:hw-ethvpn="urn:huawei:params:xml:ns:yang:huawei-ethernet-vpn">arp</hw-ethvpn:advertise-host-route-mode> </hw-bgp:evpn> </hw-bgp:l2vpn> </hw-bgp:af-specific-config> </hw-bgp:bgp-neighbor> </hw-bgp:bgp-neighbors> </hw-bgp:bgp-routing> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
响应示例
配置成功响应示例
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <ok/> </rpc-reply>
配置失败响应示例
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="3"> <rpc-error> <error-type>application</error-type> <error-tag>invalid-value</error-tag> <error-severity>error</error-severity> <error-path>/ietf-routing:routing/routing-instance[name='rt']/routing-protocols/routing-protocol[type='huawei-bgp:bgp-routing-protocol'][name='bgp']/huawei-bgp:bgp-routing/bgp-neighbors/bgp-neighbor[peer-address='10.1.1.1']/af-specific-config/l2vpn/evpn/route-reflector-client</error-path> <error-message>validation failed(When condition "(../active='true') and (../../../../remote-as = ../../../../../../bgp-router/local-as-number)" not satisfied.).</error-message> </rpc-error> </rpc-reply>