IPv6 Static Route Management
This section describes the configuration model of IPv6 static route management and provides examples of XML packets.
Data Model
The configuration file matching IPv6 static route management is ietf-routing.yang, huawei-ipv6-static-route.yang, and ietf-ipv6-unicast-routing.yang.
Object |
Description |
Value |
Remarks |
---|---|---|---|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/static-routes/huawei-ipv6-static-route:ipv6/route/destination-prefix |
Indicates the destination IPv6 address and prefix length. |
The value is in the dest-ipv6-address/prefix-length format:
|
N/A |
/ietf-ipv6-unicast-routing:ipv6/route/next-hop/next-hop-options/simple-next-hop |
Indicates a next-hop outbound interface. |
The value is a character string in the interface-typeinterface-number format, where interface-type indicates the interface type and interface-number indicates the interface number. |
N/A |
/ietf-ipv6-unicast-routing:ipv6/route/next-hop/next-hop-options/special-next-hop |
Indicates a special next hop. |
Currently, only the blackhole next hop is supported. |
N/A |
/ietf-ipv6-unicast-routing:ipv6/route/next-hop/next-hop-options/next-hop-address |
Indicates a next-hop IPv6 address. |
The value is in dotted decimal notation. |
N/A |
/ietf-ipv6-unicast-routing:ipv6/route/next-hop/next-hop-options/description |
Configures a description for an IPv6 static route. |
The value is a string of 1 to 80 characters without question marks. It can contain spaces. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/static-routes/huawei-ipv6-static-route:ipv6/route/next-hop-options/multiple-path/ipv6-address-nexthop |
Indicates the next-hop IPv6 address information of an IPv6 static route, which is configured through the following child objects:
|
The value ranges of the child objects are as follows:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/static-routes/huawei-ipv6-static-route:ipv6/route/next-hop-options/multiple-path/egress-interface-ipv6-nexthop |
Indicates the next-hop outbound interface and next-hop IPv6 address information of an IPv6 static route, which is configured through the following child objects:
|
The value ranges of the child objects are as follows:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/static-routes/huawei-ipv6-static-route:ipv6/route/next-hop-options/multiple-path/egress-routing-instance-ipv6-nexthop |
Indicates the destination VPN and next-hop IPv6 address information of an IPv6 static route, which is configured through the following child objects:
|
The value ranges of the child objects are as follows:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/static-routes/huawei-ipv6-static-route:ipv6/route/next-hop-options/multiple-path/egress-routing-instance-nexthop |
Indicates the destination VPN information of an IPv6 static route, with no next-hop IPv6 address specified. This object is configured through the following child objects:
|
The value ranges of the child objects are as follows:
|
N/A |
Configuring an IPv6 Static Route
This section provides a sample of configuring an IPv6 static route using the edit-config method.
Operation |
XPATH |
---|---|
edit-config |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Destination IPv6 address and prefix length |
fc00:0:0:2001::1/64 |
- |
Destination VPN instance |
test2 |
- |
Next-hop IPv6 address |
fc00:0:0:2002::2 |
- |
Priority of an IPv6 static route |
100 |
- |
Tag value of an IPv6 static route |
100 |
- |
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> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="create"> <rt:name>default-routing-instance</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type>static</rt:type> <rt:name>test1</rt:name> <rt:static-routes> <hw-v6sr:ipv6 xmlns:hw-v6sr="urn:huawei:params:xml:ns:yang:hw-ipv6-static-route"> <hw-v6sr:route> <hw-v6sr:destination-prefix>fc00:0:0:2001::1/64</hw-v6sr:destination-prefix> <hw-v6sr:egress-routing-instance-ipv6-nexthop> <hw-v6sr:dest-routing-instance>test2</hw-v6sr:dest-routing-instance> <hw-v6sr:next-hop-address>fc00:0:0:2002::2</hw-v6sr:next-hop-address> <hw-v6sr:preference>100</hw-v6sr:preference> <hw-v6sr:tag>100</hw-v6sr:tag> </hw-v6sr:egress-routing-instance-ipv6-nexthop> </hw-v6sr:route> </hw-v6sr:ipv6> </rt:static-routes> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </config> </edit-config> </rpc>
Deletion 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> <rt:routing xmlns:rt="urn:ietf:params:xml:ns:yang:ietf-routing"> <rt:routing-instance xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="delete"> <rt:name>default-routing-instance</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type>static</rt:type> <rt:name>test1</rt:name> <rt:static-routes> <hw-v6sr:ipv6 xmlns:hw-v6sr="urn:huawei:params:xml:ns:yang:hw-ipv6-static-route"> <hw-v6sr:route> <hw-v6sr:destination-prefix>fc00:0:0:2001::1/64</hw-v6sr:destination-prefix> <hw-v6sr:egress-routing-instance-ipv6-nexthop> <hw-v6sr:dest-routing-instance>test2</hw-v6sr:dest-routing-instance> <hw-v6sr:next-hop-address>fc00:0:0:2002::2</hw-v6sr:next-hop-address> <hw-v6sr:preference>100</hw-v6sr:preference> <hw-v6sr:tag>100</hw-v6sr:tag> </hw-v6sr:egress-routing-instance-ipv6-nexthop> </hw-v6sr:route> </hw-v6sr:ipv6> </rt:static-routes> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> </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> The specified IPv6 VPN instance does not exist.</error-message> <error-info>Error on node /ietf-routing:routing/routing-instance[name="default-routing-insta"]/routing-protocols/routing-protocol[type="ietf-routing:static",name="test1"]/static-routes/huawei-ipv6-static-route:ipv6/route[destination-prefix="fc00:0:0:2001::1/64"]/egress-routing-instance-ipv6-nexthop[dest-routing-instance="test2",next-hop-address="fc00:0:0:2002::2"]</error-info> </rpc-error>