No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
OSPF

OSPF

Data Model

The data model file matching OSPF is huawei-ospf.yang.

Table 3-467 OSPF

Object

Description

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf

Indicates that the operation request (creating, deleting, and modifying) object is the OSPF-related configurations. It is only used to contain sub-objects, but does not have any data meaning.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/process-id

Indicates the OSPF process ID. The value is an integer that ranges from 1 to 65535. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/router-id

Indicates the router ID. The value is in dotted decimal notation.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/vpn-instance-name

Indicates the VPN instance name. The value is a string of 1 to 31 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. If the name of a VPN instance is default-routing-instance, it is the public network route.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/type

Indicates the type of external routes. The value is 1 or 2. The default value is 2. The value 1 indicates Type 1 external routes, and the value 2 indicates Type 2 external routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/cost

Indicates the route cost. The value is an integer that ranges from 0 to 16777214. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/direct-protocol/direct

Indicates that OSPF imports direct routes. The value is of the Boolean type and can only be true or false. The value true indicates that OSPF imports direct routes, and the value false indicates that OSPF does not import direct routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-protocol/type

Indicates the type of external routes. The value is 1 or 2. The default value is 2. The value 1 indicates Type 1 external routes, and the value 2 indicates Type 2 external routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-prospf/instance/filter-policy/protocol/directotocol/cost

Indicates the route cost. The value is an integer that ranges from 0 to 16777214. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/static-protocol/static

Indicates that OSPF imports static routes. The value is of the Boolean type and can only be true or false. The value true indicates that OSPF imports static routes, and the value false indicates that OSPF does not import static routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/ospf-protocol/ospf/ospf-id

Indicates the ID of a route imported to OSPF. The value is an integer that ranges from 1 to 65535, and the default value is 1.

NOTE:
  • The ID of an imported OSPF route cannot be the same as the ID of the current OSPF route.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/ospf-protocol/ospf/type

Indicates the type of external routes. The value is 1 or 2. The default value is 2. The value 1 indicates Type 1 external routes, and the value 2 indicates Type 2 external routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/ospf-protocol/ospf/tag

Indicates the tag of an external LSA. The value is an integer that ranges from 0 to 4294967295. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/ospf-protocol/ospf/route-policy-name

Indicates the name of a routing policy. The value is a string of 1 to 40 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/ospf-protocol/ospf/cost

Indicates the route cost. The value is an integer that ranges from 0 to 16777214. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/type

Indicates the type of external routes. The value is 1 or 2. The default value is 2. The value 1 indicates Type 1 external routes, and the value 2 indicates Type 2 external routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/cost

Indicates the route cost. The value is an integer that ranges from 0 to 16777214. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/bgp

Indicates that OSPF imports BGP routes. The value is of the Boolean type and can only be true or false. The value true indicates that OSPF imports BGP routes, and the value false indicates that OSPF does not import BGP routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/bgp-protocol/permit-ibgp

Indicates that OSPF imports IBGP routes. The value is of the Boolean type and can only be true or false. The value true indicates that OSPF imports IBGP routes, and the value false indicates that OSPF does not import IBGP routes.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/ospf-process-id

Indicates the OSPF process ID that is enabled on an interface. The value is an integer that ranges from 1 to 65535, and the default value is 1.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/area-id

Indicates the OSPF area ID that is enabled on an interface. The value ranges from 0 to 4294967295.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/area-id

Indicates the OSPF area ID. The value can be a decimal integer or in dotted decimal notation. When the value is an integer, the value ranges from 0 to 4294967295.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/network

Indicates the network segments contained in an OSPF area. The value is in dotted decimal notation.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/default-route-advertise/enable

Indicates that default routes are advertised to a common OSPF area. The value is of the Boolean type and can only be true or false.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/default-route-advertise/type

Indicates the type of external routes. The value is of the enumerated type and can be type-one or type-two. The value type-one indicates Type 1 external routes, and the value type-two indicates Type 2 external routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/unr-protocol

Indicates that OSPF imports UNR routes. The value is of the Boolean type and can only be true or false. The value true indicates that OSPF imports UNR routes, and the value false indicates that OSPF does not import UNR routes.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policy/direction

Indicates an action defined in a route filtering policy. The value is of the enumerated type and can be export or import.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policy/ip-prefix-name/ip-prefix-name

Indicates the name of an IP prefix list. The value is a string of 1 to 169 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policy/protocol/direct

Indicates that OSPF filters direct routes. The value can be true or false. The value true indicates that OSPF filters imported direct routes based on filtering policies, and the value false indicates that OSPF does not filter imported direct routes based on filtering policies.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policy/protocol/static

Indicates that OSPF filters static routes. The value can be true or false. The value true indicates that OSPF filters imported static routes based on filtering policies, and the value false indicates that OSPF does not filter imported static routes based on filtering policies.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policy/protocol/unr

Indicates that OSPF filters UNR routes. The value can be true or false. The value true indicates that OSPF filters imported UNR routes based on filtering policies, and the value false indicates that OSPF does not filter imported UNR routes based on filtering policies.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/direction

Indicates the direction of a route filtering policy group. The value is of the enumerated type and can be export or import.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/ip-prefix-name/ip-prefix-name

Indicates the name of an IP prefix list. The value is a string of 1 to 169 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/protocol/direct

Indicates that OSPF filters direct routes. The value can be true or false. The value true indicates that OSPF filters imported direct routes based on routing policies, and the value false indicates that OSPF does not filter imported direct routes based on routing policies.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/protocol/static

Indicates that OSPF filters static routes. The value can be true or false. The value true indicates that OSPF filters imported static routes based on routing policies, and the value false indicates that OSPF does not filter imported static routes based on routing policies.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policys/protocol/unr

Indicates that OSPF filters UNR routes. The value can be true or false. The value true indicates that OSPF filters imported UNR routes based on routing policies, and the value false indicates that OSPF does not filter imported UNR routes based on routing policies.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/cost-value

Indicates the OSPF interface cost. The value is an integer that ranges from 1 to 65535.

The default OSPF interface cost varies depending on the interface type:

  • 56 kbit/s serial port: 1785.
  • 64 kbit/s serial port: 1562.
  • 2.048 Mbit/s E1 port: 48.
  • 100 Mbit/s Ethernet ports: 1
NOTE:
  • If the OSPF interface cost is not configured, OSPF calculates the interface cost based on the interface bandwidth using the following formula: Interface cost = Bandwidth reference value/Interface bandwidth (by default, the OSPF bandwidth reference value is 100 Mbit/s). The integer of the calculated result is the interface cost. If the calculated result is less than 1, the cost value is 1.
  • No default cost is configured for a trunk interface, because its cost is the total cost of all member interfaces and member interface types will change.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/timer-hello

Indicates the dead interval of OSPF neighbors. The value is an integer that ranges from 1 to 235926000, in seconds. You are advised to set the dead interval of OSPF neighbors to be larger than 20s.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/timer-dead

Indicates the interval at which an interface sends Hello packets. The value is an integer that ranges from 1 to 65535, in seconds. You are advised to set the interval to be no less than 5 seconds.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/bfd/enable

Enables BFD in an OSPF process. The value is of the Boolean type and can only be true or false.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/bfd/receive-interval

Indicates the minimum interval for receiving BFD packets from the peer end. The value is an integer that ranges from 10 to 2000 in milliseconds. The default value is 1000 milliseconds.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/bfd/transmit-interval

Indicates the minimum interval for sending BFD packets to the peer end. The value is an integer that ranges from 10 to 2000 in milliseconds. The default value is 1000 milliseconds.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/bfd/detect-multiplier

Indicates the local detection multiplier. The value is an integer that ranges from 3 to 50. The default value is 3.

NOTE:

After BFD is enabled on an interface, OSPF establishes BFD sessions only with neighbors in the Full state.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/vpn-instance-capability

Indicates that routing loop detection is disabled and route calculation is performed directly.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/nssa/enable

Sets an OSPF area as an NSSA.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/nssa/no-summary

Indicates that an ABR is prohibited from sending summary LSAs to an NSSA.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/nssa/translator-always

Configures an ABR in an NSSA as an LSA translator. Multiple ABRs in an NSSA can be configured as LSA translators.

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/network-type

Indicates the network type of an OSPF interface. The value is of the Enumerated type and can be broadcast, nbma, p2mp, or p2p.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/internal-prefer/prefer-value

Indicates the OSPF internal route preference. The value is an integer that ranges from 1 to 255. The default value is 10. A smaller value indicates a higher preference.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/internal-prefer/policy-name

Indicates the name of a routing policy. The value is a string of 1 to 40 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. This parameter is optional.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/external-prefer/prefer-value

Indicates the OSPF external route preference. The value is an integer that ranges from 1 to 255. The default value is 150s. A smaller value indicates a higher preference.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/external-prefer/policy-name

Indicates the name of a routing policy. The value is a string of 1 to 40 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string. This parameter is optional.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/opaque-capability-enable

Enables Opaque-LSA for OSPF. The value is of the Boolean type and can only be true or false.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/enable

Enables OSPF GR. The value is of the Boolean type and can only be true or false.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/period-time

Indicates the OSPF GR period. The value is an integer that ranges from 1 to 1800, in seconds. The default value is 120.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/partial

Indicates that the device supports partial GR. The value is of the Boolean type and can only be true or false. By default, the device supports totally GR.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/planned-only

Indicates that the device supports planned GR. The value is of the Boolean type and can only be true or false. By default, the device supports both planned GR and unplanned GR.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/helper-role/never

Indicates that the device does not support the Helper mode. The value is of the Boolean type and can only be true or false.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/helper-role/work-mode/ip-prefix-name

Indicates the name of an IP prefix list. The value is a string of 1 to 169 case-sensitive characters without spaces. When double quotation marks are used around the string, spaces are allowed in the string.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/helper-role/work-mode/ignore-external-lsa

Indicates that the Helper does not check AS external LSAs. The value is of the Boolean type and can only be true or false. By default, routers perform strict check on received LSAs.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/graceful-restart/helper-role/work-mode/planned-only

Indicates that a router supports only planned GR. The value is of the Boolean type and can only be true or false. By default, routers support planned GR and unplanned GR.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/default-route-advertise/permit-calculate-other

Indicates that a router generates and advertises an ASE LSA that describes the default route only when there are activated non-OSPF default routes in the routing table of the local device. The device still calculates the default routes from other devices.

NOTE:

If neither permit-calculate-other nor always is configured,

  • When there are activated non-OSPF default routes in the routing table of the local device, the device does not calculate the default routes from other devices.
  • When there are no activated non-OSPF default routes in the routing table of the local device, the device still calculates the default routes from other devices.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/default-route-advertise/always

Indicates that a router generates and advertises an LSA that describes the default route, regardless of whether there are activated non-OSPF default routes in the routing table of the local device.

  • If always is configured, the device does not calculate the default routes from other devices.
  • If always is not configured, an LSA that describes the default route can be generated only when there are activated non-OSPF default routes in the routing table of the local device.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/default-route-advertise/cost

Indicates the cost of an ASE LSA. The value is an integer that ranges from 0 to 16777214. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/default-parameters/inherit-cost

Indicates that the cost of the imported route is the cost carried in the route. The value is of the Boolean type and can only be true or false.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/default-parameters/specify-cost

Indicates the default cost of the external routes imported by OSPF. The value is an integer that ranges from 0 to 16777214. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/default-parameters/tag

Indicates the tag of an imported external route. The value is an integer that ranges from 0 to 4294967295. The default value is 1.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route/default-parameters/type

Indicates the type of external routes. The value is 1 or 2. The default value is 2. The value 1 indicates Type 1 external routes, and the value 2 indicates Type 2 external routes.

ietf-routing:interfaces/interface/huawei-ospf:ospf/dr-priority

Indicates the DR priority for an interface. The value is an integer that ranges from 0 to 255.

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/authentication-mode

Indicates the interface authentication mode between neighboring devices. The following authentication modes are available:

  • simple: simple authentication
  • md5: MD5 authentication
  • hmac-md5: HMAC-MD5 authentication
  • hmac-sha256: HMAC-SHA256 authentication
  • keychain: Keychain authentication
  • null: Null authentication

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/keychain-name

Indicates the name of keychain interface authentication between neighboring devices. 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.

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/auth-text-type

Indicates the interface authentication key between neighboring devices:

  • cipher: ciphertext password
  • plain: plaintext password

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/key-id

Indicates the interface authentication key ID used for interfaces' cipher authentication. This key ID must be the same as that configured for the peer end. The value is an integer that ranges from 1 to 255.

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/cipher-text

Indicates that the interface authentication key between neighboring devices is 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 authentication, HMAC-MD5 authentication, 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.

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/plain-text

Indicates that the interface authentication key between neighboring devices is a plaintext password. The value is a string of characters without spaces. In simple authentication, a plaintext password is a string of 1 to 8 characters. In MD5 authentication, HMAC-MD5 authentication, or HMAC-SHA256 authentication, a plaintext password is a string of 1 to 255 characters.

NOTE:

V300R003C10 and later versions support the objects listed below.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/authentication-mode

Indicates the OSPF area authentication mode between neighboring devices.

The following authentication modes are available:

  • simple: simple authentication
  • md5: MD5 authentication
  • hmac-md5: HMAC-MD5 authentication
  • hmac-sha256: HMAC-SHA256 authentication
  • keychain: Keychain authentication

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/keychain-name

Indicates the name of OSPF area keychain authentication between neighboring devices.

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.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/auth-text-type

Indicates the type of the OSPF area authentication key between adjacent devices:

  • cipher: ciphertext password
  • plain: plaintext password

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/key-id

Indicates the authentication key ID used for OSPF area cipher authentication. This key ID must be the same as that configured on the peer end. The value is an integer that ranges from 1 to 255.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/cipher-text

Indicates that the OSPF area authentication key used between neighboring devices is 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 authentication, HMAC-MD5 authentication, 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.

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/plain-text

Indicates that the OSPF area authentication key used between neighboring devices is a plaintext password.

The value is a string of characters without spaces. In simple authentication, a plaintext password is a string of 1 to 8 characters. In MD5 authentication, HMAC-MD5 authentication, or HMAC-SHA256 authentication, a plaintext password is a string of 1 to 255 characters.

Creating the OSPF Configuration

This section provides a sample of creating the OSPF.

Table 3-468 Creating the OSPF configuration

Operation

XPATH

edit-config:default

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance

Data Requirements
Table 3-469 Configuring the OSPF process 20

Item

Data

Description

OSPF process ID

20

Create the OSPF process 20. Bind a VPN instance to the OSPF process, create an OSPF area, specify the OSPF network, and configure OSPF for importing direct and static routes.

VPN instance bound to the OSPF process

vpn1

OSPF area ID

5

IP address of the network segment that includes the primary IP address of the OSPF interface

192.168.7.2/24

OSPF for importing direct routes

true

OSPF for importing static routes

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>20</process-id>
         <vpn-instance-name>vpn1</vpn-instance-name>
          <area>
     <area-id>5</area-id>
      <network >192.168.7.2/24</network>
          </area>
    <import-route>
           <direct-protocol>
            <direct>true</direct>
           </direct-protocol>
    </import-route>
    <import-route>
           <static-protocol>
            <static>true</static>
           </static-protocol>
    </import-route>
        </instance> 
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
  <ok/> 
</rpc-reply> 

Deleting the OSPF Configuration

This section provides a sample of deleting the OSPF configuration.

Table 3-470 Deleting the OSPF configuration

Operation

XPATH

edit-config:remove

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance

Data Requirements
Table 3-471 Deleting the OSPF process 20

Item

Data

Description

OSPF process ID

20

Delete the OSPF process 20 and the configuration of the process.

VPN instance bound to the OSPF process

vpn1

OSPF area ID

5

IP address of the network segment that includes the primary IP address of the OSPF interface

192.168.7.2/24

OSPF for importing direct routes

true

OSPF for importing static routes

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance xc:operation="remove">
         <process-id>20</process-id>
   <vpn-instance-name>vpn1</vpn-instance-name>
          <area>
     <area-id>5</area-id>
      <network >192.168.7.2/24</network>
          </area>
    <import-route>
           <direct-protocol>
            <direct>true</direct>
           </direct-protocol>
    </import-route>
    <import-route>
           <static-protocol>
            <static>true</static>
           </static-protocol>
    </import-route>
        </instance> 
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example
  1. Sample of successful response
    <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
      <ok/> 
    </rpc-reply> 

Enabling OSPF on an Interface

This section provides a sample of enabling OSPF on an interface.

Table 3-472 Enabling OSPF on an interface

Operation

XPATH

edit-config:default

/ietf-interfaces:interfaces/interface/huawei-ospf:ospf

Data Requirements
Table 3-473 Enabling OSPF on GigabitEthernet0/0/3

Item

Data

Description

OSPF process ID

20

Enable OSPF on GigabitEthernet0/0/3.

Interface name

GigabitEthernet0/0/3

OSPF area ID

1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf" >
      <ospf-process-id>20</ospf-process-id>
      <area-id>1</area-id>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
  <ok/> 
</rpc-reply> 

Disabling OSPF on an Interface

This section provides a sample of disabling OSPF on an interface.

Table 3-474 Disabling OSPF on an interface

Operation

XPATH

edit-config:remove

/ietf-interfaces:interfaces/interface/huawei-ospf:ospf

Data Requirements
Table 3-475 Disabling OSPF on an interface

Item

Data

Description

OSPF process ID

20

Disaable OSPF on GigabitEthernet0/0/3.

Interface name

GigabitEthernet0/0/3

OSPF area ID

1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf" xc:operation="remove">
       <ospf-process-id>20</ospf-process-id>
       <area-id>1</area-id>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example
  1. Sample of successful response
    <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
      <ok/> 
    </rpc-reply> 

Binding an OSPF Process to a VPN Instance

Binding an OSPF Process to a VPN Instance

This section provides a sample of binding an OSPF process to a VPN instance.

Table 3-476 Binding an OSPF process to a VPN instance

Operation

XPATH

edit-config:merge

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/vpn-instance-name

Data Requirements
Table 3-477 Binding an OSPF process to a VPN instance

Item

Data

Description

VPN instance bound to the OSPF process

vpn1

Bind the OSPF process to the VPN instance vpn1.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_4ef026170c654411afcc0b9e9c14ef5e">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance xc:operation="merge">
         <process-id>21</process-id>
         <vpn-instance-name>vpn1</vpn-instance-name>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_4ef026170c654411afcc0b9e9c14ef5e">
 <ok/>
</rpc-reply> 

Deleting the Binding Between the OSPF Process and VPN Instance

This section provides a sample of deleting the binding between the OSPF process and VPN instance.

Table 3-478 Deleting the binding between the OSPF process and VPN instance

Operation

XPATH

edit-config:remove

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/vpn-instance-name

Data Requirements
Table 3-479 Deleting the binding between the OSPF process and VPN instance

Item

Data

Description

VPN instance bound to the OSPF process

vpn1

Delete the binding between the OSPF process.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_4ef026170c654411afcc0b9e9c14ef5e">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance xc:operation="remove">
         <process-id>21</process-id>
         <vpn-instance-name>vpn1</vpn-instance-name>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_4ef026170c654411afcc0b9e9c14ef5e">
 <ok/>
</rpc-reply>

Configuring OSPF to Import Routes

Configuring OSPF to Import Routes

This section provides a sample of configuring OSPF to import routes.

Table 3-480 Configuring OSPF to import routes

Operation

XPATH

edit-config:merge

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route

Data Requirements
Table 3-481 Configuring OSPF to import routes

Item

Data

Description

OSPF process ID

32

In OSPF process 32, configure OSPF to import Type 2 direct routes with the cost 1, import Type 2 static routes with the cost 1, import Type 2 IBGP routes with the cost 1, and import Type 2 routes of OSPF process 31 with the cost 1.

Importing direct routes

true

Route cost

1

External route type

2

Importing static routes

true

Route cost

1

External route type

2

Importing BGP routes

true

Importing IBGP routes

true

Route cost

1

External route type

2

OSPF process ID

31

Route cost

1

External route type

2

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>      
  <target>       
   <running/> 
  </target>      
  <error-option>rollback-on-error</error-option>                   
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">   
    <routing-instance>
     <name>aaaaa</name>    
     <routing-protocols>   
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>     
       <name>adfa</name> 
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">  
        <instance>                                  
         <process-id>32</process-id>
         <router-id>1.1.1.1</router-id>
         <import-route xc:operation="merge">
          <direct-protocol>
           <direct>true</direct>
           <cost>1</cost>
           <type>2</type>
          </direct-protocol>
          <static-protocol>
           <static>true</static>
           <cost>1</cost>
           <type>2</type>
          </static-protocol>
          <bgp-protocol>
           <bgp>true</bgp>
           <permit-ibgp>true</permit-ibgp>
           <cost>1</cost>
           <type>2</type>
          </bgp-protocol>
          <ospf-protocol>
           <ospf>
            <ospf-id>31</ospf-id>
            <cost>1</cost>
            <type>2</type>
           </ospf>
          </ospf-protocol>
         </import-route>
        </instance>  
       </ospf>          
      </routing-protocol>   
     </routing-protocols>     
    </routing-instance>          
   </routing>                       
  </config>                            
 </edit-config>                           
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <ok/>
</rpc-reply>
Deleting the Routes Imported by OSPF

This section provides a sample of deleting the routes imported by OSPF.

Table 3-482 Deleting the routes imported by OSPF

Operation

XPATH

edit-config:remove

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/import-route

Data Requirements
Table 3-483 Deleting the routes imported by OSPF

Item

Data

Description

OSPF process ID

32

In OSPF process 32, delete imported external routes.

Importing direct routes

true

Route cost

1

External route type

2

Importing static routes

true

Route cost

1

External route type

2

Importing BGP routes

true

Importing IBGP routes

true

Route cost

1

External route type

2

Importing OSPF routes

true

Route cost

1

OSPF process ID

31

External route type

2

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>      
  <target>       
   <running/> 
  </target>      
  <error-option>rollback-on-error</error-option>                   
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">   
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">   
    <routing-instance>
     <name>aaaaa</name>    
     <routing-protocols>   
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>     
       <name>adfa</name> 
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">  
        <instance>                                  
         <process-id>32</process-id>
         <router-id>1.1.1.1</router-id>
         <import-route xc:operation="remove">
          <direct-protocol>
           <direct>true</direct>
           <cost>1</cost>
           <type>2</type>
          </direct-protocol>
          <static-protocol>
           <static>true</static>
           <cost>1</cost>
           <type>2</type>
          </static-protocol>
          <bgp-protocol>
           <bgp>true</bgp>
           <permit-ibgp>true</permit-ibgp>
           <cost>1</cost>
           <type>2</type>
          </bgp-protocol>
          <ospf-protocol>
           <ospf>
            <ospf-id>31</ospf-id>
            <cost>1</cost>
            <type>2</type>
           </ospf>
          </ospf-protocol>
         </import-route>
        </instance>  
       </ospf>          
      </routing-protocol>   
     </routing-protocols>     
    </routing-instance>          
   </routing>                       
  </config>                            
 </edit-config>                           
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <ok/>
</rpc-reply>

Configuring the OSPF Default Route

Configuring the OSPF Default Route

This section provides a sample of configuring the OSPF default route.

Table 3-484 Configuring the OSPF default route

Operation

XPATH

edit-config:default

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/default-route-advertise

Data Requirements
Table 3-485 Creating the OSPF process 21 and importing the default route to the process

Item

Data

Description

OSPF process ID

21

Create the OSPF process 21 and advertise the default route to the OSPF process.

Advertising the default route to the OSPF process

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>21</process-id>
         <default-route-advertise>
          <enable>true</enable>
         </default-route-advertise>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the OSPF Default Route Configuration

This section provides a sample of deleting the OSPF default route configuration.

Table 3-486 Deleting the OSPF default route configuration

Operation

XPATH

edit-config:remove

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/default-route-advertise

Data Requirements
Table 3-487 Delete the default route configuration of the OSPF process 21

Item

Data

Description

OSPF process ID

21

Delete the default route configuration of the OSPF process 21.

Advertising the default route to the OSPF process

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance xc:operation="remove">
         <process-id>21</process-id>
         <default-route-advertise>
          <enable>true</enable>
         </default-route-advertise>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring OSPF Policy Routes

Configuring OSPF Policy Routes

This section provides a sample of configuring OSPF policy routes.

Table 3-488 Configuring OSPF policy routes

Operation

XPATH

edit-config:default

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policy

Data Requirements
Table 3-489 Configuring OSPF policy routes for the OSPF process 21

Item

Data

Description

OSPF process ID

21

Create the OSPF process 21 and perform the following configuration: Import the IP address prefix test, UNR routes, and the OSPF route 21. Set the policy action to export.

Policy action

export

Name of an imported IP address prefix

test

ID of an imported OSPF route

23

Importing UNR routes

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>21</process-id>
         <filter-policy>
          <ip-prefix-name>test</ip-prefix-name>
          <direction>export</direction>
          <protocol>
           <unr>true</unr>
           <direct>true</direct>
           <static>true</static>
           <ospf>
            <ospf-id>23</ospf-id>
           </ospf>
          </protocol>
         </filter-policy>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the OSPF Policy Route Configuration

This section provides a sample of deleting the OSPF policy route configuration.

Table 3-490 Deleting the OSPF policy route configuration

Operation

XPATH

edit-config:remove

/ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/filter-policy

Data Requirements
Table 3-491 Deleting the OSPF policy route configuration of the OSPF process 21

Item

Data

Description

OSPF process ID

21

Delete the OSPF policy route configuration of the OSPF process 21.

Policy action

export

Name of an imported IP address prefix

Test

ID of an imported OSPF route

23

Importing UNR routes

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>21</process-id>
         <filter-policy xc:operation="remove">
          <ip-prefix-name>test</ip-prefix-name>
          <direction>export</direction>
          <protocol>
           <unr>true</unr>
           <direct>true</direct>
           <static>true</static>
           <ospf>
            <ospf-id>23</ospf-id>
           </ospf>
          </protocol>
         </filter-policy>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the OSPF Interface Cost

Configuring the OSPF Interface Cost

This section provides a sample of configuring the OSPF interface cost.

Table 3-492 Configuring the cost of an OSPF interface

Operation

XPATH

edit-config:default

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/cost-value

Data Requirements
Table 3-493 Configuring the OSPF interface cost

Item

Data

Description

Interface name

GigabitEthernet0/0/4

Set the OSPF cost of GigabitEthernet0/0/4 to 30.

OSPF interface cost

30

NOTE:

The OSPF interface cost cannot be configured on NULL interfaces.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
    <interface> 
     <name>GigabitEthernet0/0/4</name> 
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf" > 
       <cost-value>30</cost-value> 
     </ospf> 
    </interface> 
   </interfaces> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">  
 <ok/>  
</rpc-reply> 
Restoring the Default OSPF Interface Cost

This section provides a sample of restoring the default OSPF interface cost.

Table 3-494 Restoring the default OSPF interface cost

Operation

XPATH

edit-config:remove

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/cost-value

Data Requirements
Table 3-495 Restoring the default OSPF interface cost

Item

Data

Description

Interface name

GigabitEthernet0/0/4

Restore the default OSPF interface cost.

OSPF interface cost

30

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> 
    <interface> 
     <name>GigabitEthernet0/0/4</name> 
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type> 
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf" xc:operation="remove"> 
       <cost-value>30</cost-value> 
     </ospf> 
    </interface> 
   </interfaces> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">  
 <ok/>  
</rpc-reply> 

Configuring the OSPF Internal Route Preference

Configuring the OSPF Internal Route Preference

This section provides a sample of configuring the OSPF internal route preference.

Table 3-496 Configuring the OSPF internal route preference

Operation

XPATH

edit-config:merge

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/internal-prefer

Data Requirements
Table 3-497 Configuring the OSPF internal route preference

Item

Data

Description

OSPF process ID

32

Set the internal route preference to 80 in OSPF process 32.

Routing policy name

test1

OSPF route preference

80

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="merge">
     <name>test1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <cost-value>12</cost-value>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>32</process-id>
         <internal-prefer xc:operation="merge">
          <prefer-value>80</prefer-value>
          <policy-name>test1</policy-name>
         </internal-prefer>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Changing the OSPF Internal Route Preference

This section provides a sample of changing the OSPF internal route preference.

Table 3-498 Changing the OSPF internal route preference

Operation

XPATH

edit-config:replace

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/internal-prefer

Data Requirements
Table 3-499 Changing the OSPF internal route preference

Item

Data

Description

OSPF process ID

32

Change the internal route preference to 90 in OSPF process 32.

Routing policy name

test1

OSPF route preference

90

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="merge">
     <name>test1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <cost-value>12</cost-value>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>32</process-id>
         <internal-prefer xc:operation="replace">
          <prefer-value>90</prefer-value>
          <policy-name>test1</policy-name>
         </internal-prefer>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Restoring the Default OSPF Internal Route Preference

This section provides a sample of restoring the default OSPF internal route preference.

Table 3-500 Restoring the default OSPF internal route preference

Operation

XPATH

edit-config:remove

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/internal-prefer

Data Requirements
Table 3-501 Restoring the default OSPF internal route preference

Item

Data

Description

OSPF process ID

32

Restore the default OSPF internal route preference.

Routing policy name

test1

OSPF route preference

90

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="remove">
     <name>test1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <cost-value>12</cost-value>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>32</process-id>
         <internal-prefer xc:operation="remove">
          <prefer-value>90</prefer-value>
          <policy-name>test1</policy-name>
         </internal-prefer>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the OSPF External Route Preference

Configuring the OSPF External Route Preference

This section provides a sample of configuring the OSPF external route preference.

Table 3-502 Configuring the OSPF external route preference

Operation

XPATH

edit-config:merge

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/external-prefer

Data Requirements
Table 3-503 Configuring the OSPF external route preference

Item

Data

Description

OSPF process ID

32

Set the external route preference to 100 in OSPF process 32.

Routing policy name

test2

OSPF route preference

100

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="merge">
     <name>test2</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <cost-value>12</cost-value>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>32</process-id>
         <external-prefer xc:operation="merge">
          <prefer-value>100</prefer-value>
          <policy-name>test2</policy-name>
         </external-prefer>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Changing the OSPF External Route Preference

This section provides a sample of changing the OSPF external route preference.

Table 3-504 Changing the OSPF external route preference

Operation

XPATH

edit-config:replace

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/external-prefer

Data Requirements
Table 3-505 Changing the OSPF external route preference

Item

Data

Description

OSPF process ID

32

Change the external route preference to 110 in OSPF process 32.

Routing policy name

test2

OSPF route preference

110

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="merge">
     <name>test2</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <cost-value>12</cost-value>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>32</process-id>
         <external-prefer xc:operation="replace">
          <prefer-value>110</prefer-value>
          <policy-name>test2</policy-name>
         </external-prefer>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Restoring the Default OSPF External Route Preference

This section provides a sample of restoring the default OSPF external route preference.

Table 3-506 Restoring the default OSPF external route preference

Operation

XPATH

edit-config:remove

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/external-prefer

Data Requirements
Table 3-507 Restoring the default OSPF external route preference

Item

Data

Description

OSPF process ID

32

Restore the default OSPF external route preference.

Routing policy name

test2

OSPF route preference

110

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="merge">
     <name>test2</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <cost-value>12</cost-value>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">
    <routing-instance>
     <name>aaaaa</name>
     <routing-protocols>
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>
       <name>adfa</name>
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
        <instance>
         <process-id>32</process-id>
         <external-prefer xc:operation="remove">
          <prefer-value>110</prefer-value>
          <policy-name>test2</policy-name>
         </external-prefer>
        </instance>
       </ospf>
      </routing-protocol>
     </routing-protocols>
    </routing-instance>
   </routing>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Enabling BFD and Configuring BFD Session Parameters on an Interface

Enabling BFD and Configuring the Local Detection Multiplier on an Interface

This section provides a sample of enabling BFD and configuring the local detection multiplier on an interface.

Table 3-508 Enabling BFD and configuring the local detection multiplier on an interface

Operation

XPATH

edit-config:merge

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/bfd

Data Requirements
Table 3-509 Enabling BFD and configuring the local detection multiplier on an interface

Item

Data

Description

Enabling BFD

true

Enable BFD on GigabitEthernet0/0/0 and set the local detection multiplier to 11.

Local detection multiplier

11

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/0</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
      <bfd xc:operation="merge">
       <enable>true</enable>
       <detect-multiplier>11</detect-multiplier>
      </bfd>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Disabling BFD on an Interface

This section provides a sample of disabling BFD on an interface.

Table 3-510 Disabling BFD on an interface

Operation

XPATH

edit-config:remove

ietf-interfaces:interfaces/interface/huawei-ospf:ospf/bfd

Data Requirements
Table 3-511 Disabling BFD on an interface

Item

Data

Description

Enabling BFD

true

Disable BFD on GigabitEthernet0/0/0.

Local detection multiplier

11

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/0</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
      <bfd xc:operation="remove">
       <enable>true</enable>
       <detect-multiplier>11</detect-multiplier>
      </bfd>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the DR Priority for an Interface

Configuring the DR Priority for an Interface

This section provides a sample of setting the DR priority for an interface.

Table 3-512 Setting the DR priority for an interface

Operation

XPATH

edit-config:default

ietf-routing:interfaces/interface/huawei-ospf:ospf/dr-priority

Data Requirements
Table 3-513 Setting the DR priority for an interface

Item

Data

Description

DR priority of an interface

87

Set the DR priority 87 for GigabitEthernet0/0/3.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
      <ospf-process-id>111</ospf-process-id>      
      <dr-priority>87</dr-priority>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the DR Priority Configured for an Interface

This section provides a sample of deleting the DR priority configured for an interface.

Table 3-514 Deleting the DR priority configured for an interface

Operation

XPATH

edit-config:remove

ietf-routing:interfaces/interface/huawei-ospf:ospf/dr-priority

Data Requirements
Table 3-515 Deleting the DR priority configured for an interface

Item

Data

Description

DR priority of an interface

87

Delete the DR priority configured for GigabitEthernet0/0/3.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana="urn:ietf:params:xml:ns:yang:iana-if-type">iana:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">     
      <dr-priority xc:operation="remove">87</dr-priority>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the Interface Authentication Mode and Authentication Key Between Neighboring Devices

Configuring the Keychain Authentication Name

This section provides a sample of configuring the keychain authentication name.

Table 3-516 Configuring the keychain authentication name

Operation

XPATH

edit-config:replace

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/keychain-name

Data Requirements
Table 3-517 Configuring the keychain authentication name

Item

Data

Description

Authentication mode between neighboring devices

Keychain

Configure keychain authentication between neighboring devices and set the keychain authentication name to 123.

Keychain authentication name

123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication-mode_keychain">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
      <authentication xc:operation="replace">
       <authentication-mode>keychain</authentication-mode>
       <keychain-name>123</keychain-name>
      </authentication>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication-mode_keychain"> 
 <ok/> 
</rpc-reply> 
Configuring the Authentication Mode and Ciphertext Password Between Neighboring Devices

This section provides a sample of configuring the authentication mode and ciphertext password between neighboring devices.

Table 3-518 Configuring the authentication mode and ciphertext password between neighboring devices

Operation

XPATH

edit-config:replace

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/authentication-mode

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/cipher-text

Data Requirements
Table 3-519 Configuring the authentication mode and ciphertext password between neighboring devices

Item

Data

Description

Authentication mode between neighboring devices

simple

Configure simple authentication between neighboring devices, set the authentication key type to cipher, and set the ciphertext password to test_pwd.

Authentication key type

cipher

Ciphertext password

test_pwd

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication-mode_simple_password-mode_cipher">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
      <authentication xc:operation="replace">
       <authentication-mode>simple</authentication-mode>
       <auth-text-type>cipher</auth-text-type>
       <cipher-text>test_pwd</cipher-text>
      </authentication>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication-mode_simple_password-mode_cipher"> 
 <ok/> 
</rpc-reply> 
Configuring the Authentication Mode and Plaintext Password Between Neighboring Devices

This section provides a sample of configuring the authentication mode and plaintext password between neighboring devices.

Table 3-520 Configuring the authentication mode and plaintext password between neighboring devices

Operation

XPATH

edit-config:replace

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/authentication-mode

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/plain-text

Data Requirements
Table 3-521 Configuring the authentication mode and plaintext password between neighboring devices

Item

Data

Description

Authentication mode between neighboring devices

simple

Configure simple authentication between neighboring devices, set the authentication key type to plain, and set the plaintext password to plainpwd.

Authentication key type

plain

Plaintext password

plainpwd

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication-mode_simple_password-mode_plain">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
      <authentication xc:operation="replace">
       <authentication-mode>simple</authentication-mode>
       <auth-text-type>plain</auth-text-type>
       <plain-text>plainpwd</plain-text>
      </authentication>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication-mode_simple_password-mode_plain"> 
 <ok/> 
</rpc-reply> 
Deleting the Authentication Mode Configured on an Interface

This section provides a sample of deleting the authentication mode configured on an interface.

Table 3-522 Deleting the authentication mode configured on an interface

Operation

XPATH

edit-config:remove

ietf-routing:interfaces/interface/huawei-ospf:ospf/authentication/authentication-mode

Data Requirements
Table 3-523 Deleting the authentication mode configured on an interface

Item

Data

Description

Authentication mode between neighboring devices

simple

Delete the following configuration from an interface: simple authentication between neighboring devices, the authentication key type plain, and the plaintext password plainpwd.

Authentication key type

plain

Plaintext password

plainpwd

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication_remove">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
    <interface>
     <name>GigabitEthernet0/0/3</name>
     <type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</type>
     <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">
      <authentication xc:operation="remove">
      </authentication>
     </ospf>
    </interface>
   </interfaces>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_authentication_remove"> 
 <ok/> 
</rpc-reply>

Configuring the OSPF Area Authentication Mode and Authentication Key Between Neighboring Devices

Configuring the Keychain Authentication Name

This section provides a sample of configuring the keychain authentication name.

Table 3-524 Configuring the keychain authentication name

Operation

XPATH

edit-config:replace

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/authentication-mode

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/keychain-name

Data Requirements
Table 3-525 Configuring the keychain authentication name

Item

Data

Description

Authentication mode between neighboring devices

Keychain

Configure keychain authentication between neighboring devices and set the keychain authentication name to 123.

Keychain authentication name

123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>      
  <target>       
   <running/> 
  </target>      
  <error-option>rollback-on-error</error-option>                   
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">      
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">   
    <routing-instance>
     <name>aaaaa</name>    
     <routing-protocols>   
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>     
       <name>adfa</name> 
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">  
        <instance>                                  
         <process-id>32</process-id>
         <area>
          <area-id>2</area-id>
          <authentication xc:operation="replace">
           <authentication-mode>keychain</authentication-mode>
           <keychain-name>123</keychain-name>
          </authentication>
         </area>
        </instance>  
       </ospf>          
      </routing-protocol>   
     </routing-protocols>     
    </routing-instance>          
   </routing>                       
  </config>                            
 </edit-config>                           
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Configuring the Authentication Mode and Ciphertext Password Between Neighboring Devices

This section provides a sample of configuring the authentication mode and ciphertext password between neighboring devices.

Table 3-526 Configuring the authentication mode and ciphertext password between neighboring devices

Operation

XPATH

edit-config:replace

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication

Data Requirements
Table 3-527 Configuring the authentication mode and ciphertext password between neighboring devices

Item

Data

Description

Authentication mode between neighboring devices

simple

Configure simple authentication between neighboring devices, set the authentication key type to cipher, and set the ciphertext password to test_pwd.

Authentication key type

cipher

Ciphertext password

test_pwd

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>      
  <target>       
   <running/> 
  </target>      
  <error-option>rollback-on-error</error-option>                   
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">      
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">   
    <routing-instance>
     <name>aaaaa</name>    
     <routing-protocols>   
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>     
       <name>adfa</name> 
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">  
        <instance>                                  
         <process-id>32</process-id>
         <area>
          <area-id>2</area-id>
          <authentication xc:operation="replace">
           <authentication-mode>simple</authentication-mode>
           <auth-text-type>cipher</auth-text-type>
           <cipher-text>test_pwd</cipher-text>
          </authentication>
         </area>
        </instance>  
       </ospf>          
      </routing-protocol>   
     </routing-protocols>     
    </routing-instance>          
   </routing>                       
  </config>                            
 </edit-config>                           
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Configuring the Authentication Mode and Plaintext Password Between Neighboring Devices

This section provides a sample of configuring the authentication mode and plaintext password between neighboring devices.

Table 3-528 Configuring the authentication mode and plaintext password between neighboring devices

Operation

XPATH

edit-config:replace

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication

Data Requirements
Table 3-529 Configuring the authentication mode and plaintext password between neighboring devices

Item

Data

Description

Authentication mode between neighboring devices

simple

Configure simple authentication between neighboring devices, set the authentication key type to plain, and set the plaintext password to plainpwd.

Authentication key type

plain

Plaintext password

plainpwd

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>      
  <target>       
   <running/> 
  </target>      
  <error-option>rollback-on-error</error-option>                   
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">      
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">   
    <routing-instance>
     <name>aaaaa</name>    
     <routing-protocols>   
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>     
       <name>adfa</name> 
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">  
        <instance>                                  
         <process-id>32</process-id>
         <area>
          <area-id>2</area-id>
          <authentication xc:operation="replace">
           <authentication-mode>simple</authentication-mode>
           <auth-text-type>plain</auth-text-type>
           <plain-text>plainpwd</plain-text>
          </authentication>
         </area>
        </instance>  
       </ospf>          
      </routing-protocol>   
     </routing-protocols>     
    </routing-instance>          
   </routing>                       
  </config>                            
 </edit-config>                           
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the Authentication Mode Configured in an OSPF Area

This section provides a sample of deleting the authentication mode configured in an OSPF area.

Table 3-530 Deleting the authentication mode configured in an OSPF area

Operation

XPATH

edit-config:remove

ietf-routing:routing/routing-instance/routing-protocols/routing-protocol/huawei-ospf:ospf/instance/area/authentication/authentication-mode

Data Requirements
Table 3-531 Deleting the authentication mode configured in an OSPF area

Item

Data

Description

OSPF area

2

Delete the authentication mode configured between neighboring devices in an OSPF area.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>      
  <target>       
   <running/> 
  </target>      
  <error-option>rollback-on-error</error-option>                   
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">      
   <routing xmlns="urn:ietf:params:xml:ns:yang:ietf-routing">   
    <routing-instance>
     <name>aaaaa</name>    
     <routing-protocols>   
      <routing-protocol>
       <type xmlns:hw-ospf="urn:huawei:params:xml:ns:yang:huawei-ospf">hw-ospf:ospf-routing-protocol</type>     
       <name>adfa</name> 
       <ospf xmlns="urn:huawei:params:xml:ns:yang:huawei-ospf">  
        <instance>                                  
         <process-id>32</process-id>
         <area>
          <area-id>2</area-id>
          <authentication xc:operation="remove">
          </authentication>
         </area>
        </instance>  
       </ospf>          
      </routing-protocol>   
     </routing-protocols>     
    </routing-instance>          
   </routing>                       
  </config>                            
 </edit-config>                           
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 9702

Downloads: 69

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next