This section provides a sample of configuring a route monitoring group using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
Item |
Data |
---|---|
Name of a route monitoring group |
group_a |
Whether a route monitoring group is enabled |
true |
Whether the relationship between routes in a route monitoring group is set to AND |
true |
Delay after which the RM module instructs the associated service modules to perform link switchovers |
10 |
Delay after which the RM module instructs the associated service modules to perform link switchbacks |
10 |
Destination address of a route to be monitored |
10.1.1.1 |
Mask of a route to be monitored |
16 |
VPN instance to which a route to be monitored belongs |
default-routing-instance |
Destination address of a route to be monitored |
192.168.10.1 |
Mask of a route to be monitored |
16 |
VPN instance to which a route to be monitored belongs |
vpn_11 |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-l3vpn:vpn-instances xmlns:hw-l3vpn="urn:huawei:params:xml:ns:yang:huawei-l3vpn"> <hw-l3vpn:vpn-instance> <hw-l3vpn:vpn-instance-name>vpn_11</hw-l3vpn:vpn-instance-name> </hw-l3vpn:vpn-instance> </hw-l3vpn:vpn-instances> <rmg:route-monitor-group xmlns:rmg="urn:huawei:yang:huawei-route-monitor-group"> <rmg:monitor-groups> <rmg:monitor-group> <rmg:group-name>group_a</rmg:group-name> <rmg:enable-status>true</rmg:enable-status> <rmg:operator-and>true</rmg:operator-and> <rmg:trigger-up-delay>10</rmg:trigger-up-delay> <rmg:trigger-down-delay>10</rmg:trigger-down-delay> <rmg:track-routes> <rmg:track-route> <rmg:destination-ni-name>default-routing-instance</rmg:destination-ni-name> <rmg:destination>10.1.1.1</rmg:destination> <rmg:mask-length>16</rmg:mask-length> </rmg:track-route> <rmg:track-route> <rmg:destination-ni-name>vpn_11</rmg:destination-ni-name> <rmg:destination>192.168.10.1</rmg:destination> <rmg:mask-length>16</rmg:mask-length> </rmg:track-route> </rmg:track-routes> </rmg:monitor-group> </rmg:monitor-groups> </rmg:route-monitor-group> </config> </edit-config> </rpc>
Response Example
# Sample of successful response
##### Ok Reply or Operation Successful ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
# Sample of failed response
##### Error Reply or Operation Failed ##### <?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>This ip route tracking config within vpn-instance vpn_11 already exists.</error-message> <error-info>Error on node /huawei-route-monitor-group:rmg/routeMonitorGroups/routeMonitorGroup[groupName="group_a"]/trackRoutes</error-info> </rpc-error> </rpc-reply>