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

NE40E V800R010C10SPC500 Configuration Guide - IP Routing 01

This is NE40E V800R010C10SPC500 Configuration Guide - IP Routing
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).
Configuring a Global Variable Set

Configuring a Global Variable Set

A global variable set is a group of frequently used values that are defined as global variables. Global variables can be referenced by all route-filters configured on a device. This section describes how to configure global variable sets.

Context

NOTE:

The data type of each value in a global variable set may vary with the route-filter that references the set.

The global variables on a device must be unique. A new global variable will override an existing global variable with the same name.

To enable a route-filter or a set to reference a global variable, enter $+variable name, for example, $globvar.

Procedure

  • Configure a global variable set using the paragraph editing mode.
    1. Run the edit xpl global-value command to enter the global variable set paragraph editing interface view.
    2. Press i to enter the text editing mode.

      NOTE:

      Sets or route-filters can be configured only in the text editing mode. If you exit from the text editing mode, you can perform shortcut key operations only.

    3. Configure a start clause (xpl global-value) for a global variable set.
    4. Configure set elements in the format of variable name+'value', for example, aaa '12', bbb'34', ccc '1.2.3.4'. Separate every two neighboring elements with a comma (,).
    5. Configure an end clause (end-global-value) for the global variable set.
    6. Press Esc to exit from the text editing mode.
    7. Press :wq and Enter to save the configurations and exit from the global variable set paragraph editing interface view.

      NOTE:

      A message is displayed for you to confirm whether to commit the configurations when you attempt to exit from the global variable set paragraph editing interface view. To commit the configurations, press Y.

      To exit from the global variable set paragraph editing interface view without saving the configurations, press :q! and Enter.

  • Configure a global variable set using the line editing mode.
    1. Run the system-view command to enter the system view.
    2. Run the xpl global-value command to enter the global variable set view.
    3. Configure elements in the format of variable name+'value' in the global variable set view, for example, aaa'12', bbb'34', and aaa'1.2.3.4'. Separate every two neighboring elements with a comma (,).
    4. Run the end-global-value command to conclude the configuration of the global variable set.
    5. Run the commit command to commit the configuration.

Example

NOTE:

If only paragraph editing is used as an example, the corresponding line editing is similar. To use the line editing mode, perform the operations described in paragraph editing.

For detailed set and route-filter configuration steps, see Configuration Procedures of Sets and Route-Filters Using the Paragraph Editing Mode. For details about XPL clauses, see XPL Paragraph Editing Clauses.

Objective Configure a global variable set that includes two values: 100 and ip-prefix.
Configuration Example
<HUAWEI> edit xpl global-value

xpl global-value
aaa '100',
bbb 'ip-prefix',
end-global-value

The global variable set includes a set named aaa with value 100 and another set named bbb with value ip-prefix.

Objective Configure a route-filter to permit only the routes with the MED value less than 100 and the routes that match the IPv4 prefix set named bbb.
Reference Example
<HUAWEI> edit xpl ip-prefix-list r1

xpl route-filter r1
if ip med le $aaa then
approve
elseif ip route-destination in  $bbb  then
approve
else
refuse
endif
end-filter

The route-filter r1 uses two global variables (aaa and bbb), in which aaa represents a MED value and bbb represents an IPv4 destination address prefix set. The route-filter permits only the routes with the MED value less than 100 and the routes that match bbb.

Translation
Download
Updated: 2019-01-03

Document ID: EDOC1100055018

Views: 49731

Downloads: 201

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