This section provides a sample of configuring L2VPN EVPN using the config method.
Operation |
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 |
Data Requirements
Item |
Data |
Description |
---|---|---|
Function of enabling the local device to exchange routing information with specified peers |
true |
Enable the local device to exchange routing information with specified peers. |
Function of enabling the local device as a route reflector and its peers as the clients of the route reflector |
true |
Enable the local device as a route reflector and its peers as the clients of the route reflector. |
Function of enabling the local device to advertise ARP routes or IRB routes to its BGP EVPN peers |
arp |
Enable the local device to advertise ARP routes or IRB routes to its BGP EVPN peers. |
Request Example
<?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>
Response Example
Sample of successful response
<?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>
Sample of failed response
<?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>