OSPF Routing Management
This section describes the configuration model of OSPF route management and provides examples of XML packets.
Data Model
The configuration model file matching OSPF routing management is huawei-ospf.yang
Object |
Description |
Value |
Remarks |
---|---|---|---|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/process-id |
Creates and runs an OSPF process. |
The value is an integer that ranges from 1 to 65535. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/router-id |
Indicates a router ID. |
The value is in dotted decimal notation. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/vpn-instance-name |
Indicates the name of a VPN instance that runs OSPF. |
The value is a string of 1 to 31 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
The value must be an existing VPN instance name. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/area-id |
Creates an OSPF area. |
The value is a decimal integer or in dotted decimal notation. When the value is an integer, it ranges from 0 to 4294967295. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/network |
Specifies the interface that runs OSPF and the area to which the interface belongs. |
The value is in the format network address/mask length, where the network address is in dotted decimal notation and the mask length ranges from 0 to 32. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/ospf-process-id |
Enables OSPF on an interface. |
The value is an integer that ranges from 1 to 65535. |
This object must be configured together with the /ietf-interfaces:interfaces/interface/huawei-ospf:ospf/area-id object. |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/area-id |
Enables an OSPF area on an interface. |
The value is a decimal integer or an IP address. When the value is an integer, it ranges from 0 to 4294967295. |
This object must be configured together with the /ietf-interfaces:interfaces/interface/huawei-ospf:ospf/ospf-process-id object. |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/network-type |
Sets the network type of an OSPF interface. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/timer-hello |
Sets the interval for sending Hello packets on an interface. |
The value is an integer that ranges from 1 to 65535, in seconds. |
The value of this object must be smaller than that of the /ietf-interfaces:interfaces/interface/huawei-ospf:ospf/timer-dead object. |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/timer-dead |
Sets the dead interval after which an interface considers its OSPF neighbor invalid. |
The value is an integer that ranges from 1 to 235926000, in seconds. |
The value of this object must be larger than that of the /ietf-interfaces:interfaces/interface/huawei-ospf:ospf/timer-hello object. |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/authentication-mode |
Sets the authentication mode between neighboring devices. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/key-id |
Specifies the authentication key ID of the interface's cipher authentication. |
The value is an integer that ranges from 1 to 255. |
N/A |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/auth-text-type |
Indicates the plaintext or ciphertext password. |
The value is of the enumerated type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/plain-text |
Specifies a plaintext password. |
The value is a string of characters without spaces. In simple authentication, the value is a string of 1 to 8 characters. In MD5, HMAC-MD5, or HMAC-SHA256 authentication, the value is a string of 1 to 255 characters. |
This object can be configured only when the /ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/auth-text-type object value is plain. |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/cipher-text |
Specifies a ciphertext password. |
The value is a string of characters without spaces. In simple authentication, a plaintext password is a string of 1 to 8 characters, and a ciphertext password is a string of 24, 32, or 48 characters. In MD5, HMAC-MD5, or HMAC-SHA256 authentication, a plaintext password is a string of 1 to 255 characters, and a ciphertext password is a string of 20 to 392 characters. |
This object can be configured only when the /ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/auth-text-type object value is cipher. |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/keychain-name |
Specifies the keychain name. |
The value is a string of 1 to 47 case-insensitive characters without question marks (?) and spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
This object can be configured only when the /ietf-interfaces:interfaces/interface/huawei-ospf:ospf/authentication/authentication-mode object value is keychain. |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/dr-priority |
Specifies a priority for an interface that participates in the DR election. |
The value is an integer ranging from 0 to 255. If the DR priority of an interface on a device is 0, the device cannot be elected as a DR or a BDR. The default value is 1. |
This object can be configured only under the VLANIF interface. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/filter-policy/direction |
Indicates whether to filter received or advertised routes. |
The value is of the enumerated type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/filter-policy/acl-name-or-num |
Indicates the number or name of the ACL used to filter routes. |
|
This object cannot be configured together with the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/filter-policy/ip-prefix-name object and the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/filter-policy/policy-name object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/filter-policy/ip-prefix-name |
Indicates the name of an IP prefix list used to filter routes. |
The value is a string of 1 to 169 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/filter-policy/policy-name |
Indicates the name of the route-policy used to filter routes. |
The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/direct |
Indicates whether to import direct routes. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/cost |
Indicates the cost of imported direct routes. |
The value is an integer in the range from 0 to 16777214. The default value is 1. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/type |
Indicates the type of imported direct routes. |
The value is 1 or 2.
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/tag |
Indicates the tag in the LSA of an imported direct route. |
The value is an integer in the range from 0 to 4294967295. The default value is 1. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/route-policy-name |
Indicates the name of the route-policy used to filter imported direct routes. |
The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
Before configuring this object, you need to configure the /huawei-route-policy:route-policys/route-policy/name object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-protocol/static |
Indicates whether to import static routes. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-protocol/cost |
Indicates the cost of imported static routes. |
The value is an integer in the range from 0 to 16777214. The default value is 1. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-protocol/type |
Indicates the type of imported static routes. |
The value is 1 or 2.
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-protocol/tag |
Indicates the tag in the LSA of an imported static route. |
The value is an integer in the range from 0 to 4294967295. The default value is 1. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-protocol/route-policy-name |
Indicates the name of the route-policy used to filter imported static routes. |
The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
Before configuring this object, you need to configure the /huawei-route-policy:route-policys/route-policy/name object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/filters/filter/direction |
Filters incoming or outgoing Type 3 LSAs in a specific area. |
The value is of the enumerated type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/filters/filter/acl-name-or-num |
Indicates the number or name of the ACL used to filter Type 3 LSAs. |
|
This object cannot be configured together with the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/filters/filter/ip-prefix-name object and the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/filters/filter/policy-name object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/filters/filter/ip-prefix-name |
Indicates the name of an IP prefix list used to filter Type 3 LSAs. |
The value is a string of 1 to 169 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/filters/filter/policy-name |
Indicates the name of the route-policy used to filter Type 3 LSA. |
The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
|
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/area-type |
Indicates the area type. |
The value is of the enumerated type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/translator-always |
Indicates whether to specify an ABR in an NSSA as a translator. |
The value is of the Boolean type:
|
This object can be configured only when the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/area-type object value is nssa. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/no-summary |
Indicates whether to prohibit ABRs from sending summary LSAs to NSSAs. |
The value is of the Boolean type:
|
This object can be configured only when the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/area-type object value is nssa. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/ip-address |
Indicates the IP address and mask length configured on an ABR for route summarization. |
The format is ipv4-address/mask-length:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/cost |
Indicates the cost of a summary route. |
The value is an integer in the range from 0 to 16777214. |
This object cannot be configured together with the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/inherit-minimum object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/inherit-minimum |
Indicates whether to use the smallest cost of specific routes as the cost of the summary route. |
The value is of the Boolean type:
|
This object cannot be configured together with the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/cost object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/advertise |
Indicates whether to advertise the summary route. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/generate-null0-route |
Indicates whether to generate blackhole routes to prevent routing loops. |
The value is of the Boolean type:
|
This object can be configured only when the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/abr-summarys/advertise object value is true. |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/asbr-summarys/ip-address |
Indicates the IP address and mask length configured on an ASBR for route summarization. |
The format is ipv4-address/mask-length:
|
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/asbr-summarys/cost |
Indicates the cost of a summary route. |
The value is an integer that ranges from 0 to 16777214. |
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/asbr-summarys/tag |
Indicates the tag of a summary route. |
The value is an integer that ranges from 0 to 4294967295. The default value is 1. |
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/asbr-summarys/distribute-delay |
Indicates the delay in advertising the summarized route. |
The value is an integer that ranges from 1 to 65535, in seconds. |
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/asbr-summarys/advertise |
Indicates whether to advertise the summary route. |
The value is of the Boolean type:
|
N/A |
/ietf-interfaces:interfaces/interface/huawei-ospf:ospf/cost-value |
Indicates the cost of an OSPF-enabled interface. |
The value is an integer in the range from 1 to 65535. |
N/A |
/if:interfaces/interface/hw-ospf:ospf/bfd/enable |
Enables BFD on an interface. |
The value is of the Boolean type:
|
On an Ethernet interface, you need to first run the undo portswitch command to change the interface to Layer 3 mode. |
/if:interfaces/interface/hw-ospf:ospf/bfd/receive-interval |
Indicates the minimum interval at which an interface receives BFD packets from the peer end. |
The value is an integer, in milliseconds. If the MPU is equipped with the ES0D00FSUA00 or the MPU is SRUHX1, the value ranges from 3 to 1000. The default value is 10 ms. Otherwise, the value ranges from 100 to 1000. The default value is 1000 ms. |
N/A |
/if:interfaces/interface/hw-ospf:ospf/bfd/transmit-interval |
Indicates the minimum interval at which an interface sends BFD packets to the peer end. |
The value is an integer, in milliseconds. If the MPU is equipped with the ES0D00FSUA00 or the MPU is SRUHX1, the value ranges from 3 to 1000. The default value is 10 ms. Otherwise, the value ranges from 100 to 1000. The default value is 1000 ms. |
N/A |
/if:interfaces/interface/hw-ospf:ospf/bfd/detect-multiplier |
Indicates the local detection multiplier on an interface. |
The value is an integer in the range from 3 to 50. The default value is 3. |
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/bfd/enable |
Indicates whether to enable BFD. |
The value is of the Boolean type:
|
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/bfd/receive-interval |
Indicates the minimum interval for receiving BFD packets from the peer end. |
The value is an integer, in milliseconds. If the MPU is equipped with the ES0D00FSUA00 or the MPU is SRUHX1, the value ranges from 3 to 1000. The default value is 10 ms. Otherwise, the value ranges from 100 to 1000. The default value is 1000 ms. |
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/bfd/transmit-interval |
Indicates the minimum interval for sending BFD packets to the peer end. |
The value is an integer, in milliseconds. If the MPU is equipped with the ES0D00FSUA00 or the MPU is SRUHX1, the value ranges from 3 to 1000. The default value is 10 ms. Otherwise, the value ranges from 100 to 1000. The default value is 1000 ms. |
N/A |
/rt:routing/routing-instance/routing-protocols/routing-protocol/hw-ospf:ospf/instance/bfd/detect-multiplier |
Indicates the local detection multiplier. |
The value is an integer in the range from 3 to 50. The default value is 3. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/vpn-instance-capability |
Disables routing loop detection. |
- |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/bgp |
Indicates whether BGP routes are imported. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/permit-ibgp |
Indicates whether IBGP routes are imported. |
The value is of the Boolean type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/cost |
Indicates the cost of imported BGP routes. |
The value is an integer in the range from 0 to 16777214. The default value is 1. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/type |
Indicates the type of imported BGP routes. |
The value is 1 or 2.
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/tag |
Indicates the tag in the LSA of an imported BGP route. |
The value is an integer in the range from 0 to 4294967295. The default value is 1. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/route-policy-name |
Indicates the name of the route-policy used to filter imported BGP routes. |
The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces. |
Before configuring this object, you need to configure the /hw-route-policy:route-policys/hw-route-policy:route-policy/hw-route-policy:name object. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/authentication-mode |
Indicates the authentication mode used in an OSPF area. |
The value is of the enumerated type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/auth-text-type |
Indicates the authentication password type used in an OSPF area. |
The value is of the enumerated type:
|
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/key-id |
Indicates the authentication key ID for cipher authentication on interfaces in an OSPF area. |
The value is an integer in the range from 1 to 255. |
N/A |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/plain-text |
Indicates the plaintext password used for OSPF area authentication. |
The value is a string of characters without spaces. In simple authentication, the value is a string of 1 to 8 characters. In MD5, HMAC-MD5, or HMAC-SHA256 authentication, the value is a string of 1 to 255 characters. |
This object can be configured only when the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/auth-text-type object value is plain. |
/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/cipher-text |
Indicates the ciphertext password used for OSPF area authentication. |
The value is a string of characters without spaces. In simple authentication, a plaintext password is a string of 1 to 8 characters, and a ciphertext password is a string of 24, 32, or 48 characters. In MD5, HMAC-MD5, or HMAC-SHA256 authentication, a plaintext password is a string of 1 to 255 characters, and a ciphertext password is a string of 20 to 392 characters. |
This object can be configured only when the /ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/auth-text-type object value is cipher. |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/opaque-capability-enable |
Indicates whether the Opaque-LSA capability is enabled. |
The value is of the Boolean type:
The default value is false. |
N/A |
/ietf-routing:routing/routing-instance/routing protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/enable |
Whether the OSPF GR function is enabled. |
The value is of the Boolean type:
|
This object can be configured only when the /rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/opaque-capability-enable object value is true. |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/graceful-restart/period-time |
Specifies the GR period. |
The value is an integer in the range from 1 to 1800, in seconds. The default value is 120s. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/graceful-restart/partial |
Indicates whether the switch supports partial GR. By default, the switch supports totally GR. |
The value is of the Boolean type:
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/graceful-restart/planned-only |
Indicates whether the switch supports only planned GR. By default, the switch supports both planned GR and unplanned GR. |
The value is of the Boolean type:
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/dn-bit-set-disable/summary |
Indicates whether setting the DN bit in summary LSAs is prohibited. |
The value is of the Boolean type:
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/dn-bit-set-disable/ase |
Indicates whether setting the DN bit in AS-external LSAs is prohibited. |
The value is of the Boolean type:
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/dn-bit-set-disable/nssa |
Indicates whether setting the DN bit in NSSA LSAs is prohibited. |
The value is of the Boolean type:
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/internal-prefer/prefer-value |
Indicates a preference for an OSPF route. |
The value is an integer ranging from 1 to 255. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/external-prefer/prefer-value |
Indicates the preference of an OSPF AS external route. |
The value is an integer ranging from 1 to 255. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/default-route-advertise/enable |
Indicates whether advertising default routes to a common OSPF area. |
The value is of the Boolean type:
The default value is false. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/default-route-advertise/mode |
Indicates the mode of generating and advertising default routes. |
The value is of the enumerated type:
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/default-route-advertise/cost |
Indicates the cost of default routes advertised to a common OSPF area. |
The value is an integer that ranges from 0 to 16777214. The default value is 1. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/default-route-advertise/type |
Indicates the type of default routes advertised to a common OSPF area. |
The value is 1 or 2. The default value is 2.
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/import-route/ospf-protocol/ospf/ospf-id |
Indicates the process ID of imported OSPF routes |
The value is an integer ranging from 1 to 65535. The default value is 1. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/import-route/ospf-protocol/ospf/cost |
Indicates the cost of imported OSPF routes. |
The value is an integer ranging from 0 to 16777214. The default value is 1. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/import-route/ospf-protocol/ospf/type |
Indicates the type of imported OSPF routes. |
The value is 1 or 2. The default value is 2.
|
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/import-route/ospf-protocol/ospf/tag |
Indicates the tag of imported OSPF routes. |
The value is an integer ranging from 0 to 4294967295. The default value is 1. |
N/A |
/rt:routing/rt:routing-instance/rt:routing-protocols/rt:routing-protocol/hw-ospf:ospf/instance/area/default-cost |
Indicates the cost for the Type3 default route that is transmitted to a stub or NSSA by OSPF. |
The value is an integer ranging from 0 to 16777214. |
N/A |
Configuring OSPF
This section provides a sample of configuring OSPF using the edit-config:merge method.
Operation |
XPATH |
---|---|
edit-config:merge |
|
Data Requirements
Item |
Data |
Description |
---|---|---|
Creating and running an OSPF process |
2 |
Create and run OSPF process 2. |
Creating an OSPF area |
0.0.0.2 |
Create OSPF area 0.0.0.2. |
Interface that runs OSPF and the area to which the interface belongs |
10.0.0.0/8 |
Specify the interface that runs OSPF and the area to which the interface belongs as 10.0.0.0 0.255.255.255. |
Static routing protocol from which routes are imported |
true |
Import static routes. |
Route cost |
2 |
Set the route cost to 2. |
Type of external routes |
1 |
Set the type of external routes to Type 1. |
Tag of an external LSA |
2 |
Set the tag of an external LSA to 2. |
Enabling an OSPF process on an interface |
2 |
Enable OSPF process 2 on an interface. |
Enabling an OSPF area on an interface |
2 |
Enable an OSPF area 0.0.0.2 on an interface. |
Network type of an OSPF interface |
nbma |
Set the network type of an OSPF interface to NBMA. |
Interval for sending Hello packets on an interface |
40 |
Set the interval for sending Hello packets on an interface to 40s. |
Dead interval after which an interface considers its OSPF neighbor invalid |
50 |
Set the dead interval after which an interface considers its OSPF neighbor invalid to 50s. |
Authentication mode between neighboring devices |
md5 |
Set the authentication mode between neighboring devices to MD5 authentication. |
Authentication key ID for cipher authentication on an interface |
2 |
Set the authentication key ID to 2 for cipher authentication on an interface. |
Specifying a plaintext or ciphertext password |
cipher |
Set a ciphertext password. |
Ciphertext password |
password |
Set the ciphertext password as password. |
Request Example
<?xml version='1.0' encoding='UTF-8'?> <rpc message-id="8" 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>1</rt:name> <rt:routing-protocols> <rt:routing-protocol> <rt:type xmlns:huawei-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">huawei-ospf:ospf-routing-protocol</rt:type> <rt:name>ospf</rt:name> <hw-ospf:ospf xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf"> <hw-ospf:instance> <hw-ospf:process-id>2</hw-ospf:process-id> <hw-ospf:import-route> <hw-ospf:static-protocol> <hw-ospf:static>true</hw-ospf:static> <hw-ospf:cost>2</hw-ospf:cost> <hw-ospf:type>1</hw-ospf:type> <hw-ospf:tag>2</hw-ospf:tag> </hw-ospf:static-protocol> </hw-ospf:import-route> <hw-ospf:area> <hw-ospf:area-id>0.0.0.2</hw-ospf:area-id> <hw-ospf:network>10.0.0.0/8</hw-ospf:network> </hw-ospf:area> </hw-ospf:instance> </hw-ospf:ospf> </rt:routing-protocol> </rt:routing-protocols> </rt:routing-instance> </rt:routing> <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <if:interface> <if:name>Vlanif10</if:name> <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:propVirtual</if:type> <hw-ospf:ospf xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf"> <hw-ospf:ospf-process-id>2</hw-ospf:ospf-process-id> <hw-ospf:area-id>2</hw-ospf:area-id> <hw-ospf:network-type>nbma</hw-ospf:network-type> <hw-ospf:timer-hello>40</hw-ospf:timer-hello> <hw-ospf:timer-dead>50</hw-ospf:timer-dead> <hw-ospf:authentication> <hw-ospf:authentication-mode>md5</hw-ospf:authentication-mode> <hw-ospf:auth-text-type>cipher</hw-ospf:auth-text-type> <hw-ospf:key-id>2</hw-ospf:key-id> <hw-ospf:cipher-text>password</hw-ospf:cipher-text> </hw-ospf:authentication> </hw-ospf:ospf> </if:interface> </if:interfaces> </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="8"> <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="8"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>OSPF area id cannot be empty.</error-message> <error-info>Error on node /ietf-interfaces:interfaces/interface[name="Vlanif10"]/huawei-ospf:ospf</error-info> </rpc-error> </rpc-reply>