route-tag

Function

The route-tag command sets the VPN route tag for imported VPN routes.

The undo route-tag command restores the default setting.

By default, the first two bytes of a tag value are fixed at 0xD000, and the last two bytes are the local BGP AS number. For example, if the local BGP AS number is 100, the default tag value in decimal notation is 3489661028; if the BGP AS number is greater than 65535, the tag value is 0, and you can manually change the tag value. If BGP is not configured, the default tag value is 0.

Format

route-tag tag-value

undo route-tag

Parameters

Parameter Description Value
tag-value

Specifies the VPN route tag.

The value is an integer ranging from 0 to 4294967295.

Views

OSPFv3 view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ospf write

Usage Guidelines

Usage Scenario

On a PE, the VPN instance associated with an OSPFv3 instance is configured with a VPN route tag. This route tag must be carried in Type 5 or Type 7 LSAs. You are advised to configure the same route tag for PEs in the same area. Not carried in BGP extended community attributes, the VPN route tag is configured and takes effect only on the PEs that receive BGP routes and generate OSPFv3 LSAs. Different OSPFv3 processes can be configured with the same route tag.

The priority of VPN route tags varies with the command.

  • The priority of the VPN route tag configured using the import-route command is the highest.
  • The priority of the VPN route tag configured using the route-tag command is medium.
  • The priority of the VPN route tag configured using the default command is the lowest.

    If a Type 5 or Type 7 LSA whose tag is the same as the local tag is received, this LSA is ignored during route calculation.

Example

# Set the VPN route tag in OSPFv3 process 100 to 100.
<HUAWEI> system-view
[~HUAWEI] ip vpn-instance huawei
[*HUAWEI-vpn-instance-huawei] ipv6-family
[*HUAWEI-vpn-instance-huawei-af-ipv4] quit
[*HUAWEI-vpn-instance-huawei] quit
[*HUAWEI] ospfv3 100 vpn-instance huawei
[*HUAWEI-ospfv3-100] route-tag 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >