GRE-Netconf
Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /gres/{name} | Y | merge, replace, create, delete | — |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage GRE tunnel configurations on AsterNOS devices.
Get GRE Tunnel Configurations
Section titled “Get GRE Tunnel Configurations”Request example to get all GRE tunnel configurations via get-config with subtree filter.
<filter type="subtree"> <top> <gres/> </top></filter>Response example
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <top> <gres xmlns="http://asterfusion.com/ns/yang/asternos-gre"> <gre> <name>Gre1</name> <vrf>default</vrf> <local-ip>10.1.2.3</local-ip> <remote-ip>10.1.4.5</remote-ip> <underlay-vrf>default</underlay-vrf> </gre> </gres> </top></data>Create GRE Tunnel
Section titled “Create GRE Tunnel”Request example to create a GRE tunnel via edit-config.
<config> <top> <gres operation="create"> <gre> <name>Gre1</name> <vrf>Vrf1</vrf> <local-ip>10.11.11.11</local-ip> <remote-ip>10.22.22.22</remote-ip> <underlay-vrf>Vrf2</underlay-vrf> </gre> </gres> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <ok/></rpc-reply>Delete GRE Tunnel
Section titled “Delete GRE Tunnel”Request example to delete a GRE tunnel via edit-config.
<config> <top> <gres operation="delete"> <gre> <name>Gre1</name> </gre> </gres> </top></config>For detailed fields and YANG definitions, please refer to yang/asternos-gre.yang.
Properties Descriptions
Section titled “Properties Descriptions”Tree Diagram
module: asternos-gre +--rw gres +--rw gre* [name] +--rw name string +--rw vrf? vrf:vrf-ref +--rw local-ip? union +--rw remote-ip? union +--rw underlay-vrf? vrf:vrf-refTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| gres | M | Path-only node, has no configurable value. | |
| gre | M | Path-only node, has no configurable value. GRE Tunnel name. eg. Gre0 | |
| name | O | None | GRE Tunnel interface name |
| vrf | O | vrf:vrf-ref | GRE Tunnel interface vrf |
| local-ip | O | The ipv4-address type represents an IPv4 address in dotted-quad notation. The IPv4 address may include a zone index, separated by a % sign. If a system uses zone names that are not represented in UTF-8, then an implementation needs to use some mechanism to transform the local name into UTF-8. The definition of such a mechanism is outside the scope of this document. The zone index is used to disambiguate identical address values. For link-local addresses, the zone index will typically be the interface index number or the name of an interface. If the zone index is not present, the default zone of the device will be used. The canonical format for the zone index is the numerical format The ipv6-address type represents an IPv6 address in full, mixed, shortened, and shortened-mixed notation. The IPv6 address may include a zone index, separated by a % sign. If a system uses zone names that are not represented in UTF-8, then an implementation needs to use some mechanism to transform the local name into UTF-8. The definition of such a mechanism is outside the scope of this document. The zone index is used to disambiguate identical address values. For link-local addresses, the zone index will typically be the interface index number or the name of an interface. If the zone index is not present, the default zone of the device will be used. The canonical format of IPv6 addresses uses the textual representation defined in Section 4 of RFC 5952. The canonical format for the zone index is the numerical format as described in Section 11.2 of RFC 4007. | GRE Tunnel underlay local IP address |
| remote-ip | O | The ipv4-address type represents an IPv4 address in dotted-quad notation. The IPv4 address may include a zone index, separated by a % sign. If a system uses zone names that are not represented in UTF-8, then an implementation needs to use some mechanism to transform the local name into UTF-8. The definition of such a mechanism is outside the scope of this document. The zone index is used to disambiguate identical address values. For link-local addresses, the zone index will typically be the interface index number or the name of an interface. If the zone index is not present, the default zone of the device will be used. The canonical format for the zone index is the numerical format The ipv6-address type represents an IPv6 address in full, mixed, shortened, and shortened-mixed notation. The IPv6 address may include a zone index, separated by a % sign. If a system uses zone names that are not represented in UTF-8, then an implementation needs to use some mechanism to transform the local name into UTF-8. The definition of such a mechanism is outside the scope of this document. The zone index is used to disambiguate identical address values. For link-local addresses, the zone index will typically be the interface index number or the name of an interface. If the zone index is not present, the default zone of the device will be used. The canonical format of IPv6 addresses uses the textual representation defined in Section 4 of RFC 5952. The canonical format for the zone index is the numerical format as described in Section 11.2 of RFC 4007. | GRE Tunnel underlay remote IP address |
| underlay-vrf | O | vrf:vrf-ref | GRE Tunnel underlay vrf |