route-distinguisher

Function

The route-distinguisher command configures a route distinguisher (RD) for the IPv4 or IPv6 address family of a VPN instance.

By default, no RD is configured for the IPv4 or IPv6 address family of a VPN instance. VPN configurations can be performed in the view of the IPv4 or IPv6 address family of a VPN instance only after an RD is configured for the address family.

Format

route-distinguisher route-distinguisher

Parameters

Parameter Description Value
route-distinguisher Specifies the RD.

The RD formats are divided into the following types:

  • 2-byte AS number:32-bit user-defined number, for example, 101:3. An AS number ranges from 0 to 65535. A user-defined number ranges from 0 to 4294967295. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0:0.

  • Integral 4-byte AS number:2-byte user-defined number, for example, 65537:3. An AS number ranges from 65536 to 4294967295. A user-defined number ranges from 0 to 65535.

  • 4-byte AS number in dotted notation:2-byte user-defined number, for example, 0.0:3 or 0.1:0. A 4-byte AS number in dotted notation is in the format of x.y, where x and y are integers that range from 0 to 65535 and from 0 to 65535, respectively. A user-defined number ranges from 0 to 65535. The AS number and user-defined number cannot be both 0s. That is, an RD cannot be 0.0:0.

  • 32-bit IP address:16-bit user-defined number, for example, 192.168.122.15:1. An IP address ranges from 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.

-

Views

VPN instance view, VPN instance IPv4 address family view or VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After creating a VPN instance and enabling the IPv4 or IPv6 address family for the VPN instance, you need to run the route-distinguisher command to configure an RD for the address family.

Different VPN instances may have the same route prefix. To allow a PE to determine to which VPN instance a route belongs, run the route-distinguisher command to configure an RD for an address family of a VPN instance on the PE. After the configuration, the PE will add an RD to the route received from the VPN instance, and then the route prefix becomes a globally unique VPNv4 or VPNv6 route.

Configuration Impact

An RD configured for the IPv4 or IPv6 address family of a VPN instance cannot be directly modified or deleted. Before modifying an RD, you need to disable the IPv4 or IPv6 address family of the VPN instance or delete the VPN instance and then reconfigure the address family or the VPN instance.

Precautions

Configuring a unique RD for the IPv4 or IPv6 address family of a VPN instance is recommended; otherwise, route overlap may occur.

When the route-distinguisher command is run in the VPN instance view, an ipv4-family command is created at the same time by default. The command results are equivalent to running the ipv4-family command in the VPN instance view and then running the route-distinguisher command in the VPN instance IPv4 address family view. For example:
[sysname-vpn-instance-vpn1] route-distinguisher 200:1
[sysname-vpn-instance-vpn1-af-ipv4] display this 
#  
 ipv4-family
  route-distinguisher 200:1
#
return

Example

# Configure the RD 22:1 for the IPv4 address family of the VPN instance named vpn1.

<sysname> system-view
[sysname] ip vpn-instance vpn1
[sysname-vpn-instance-vpn1] ipv4-family
[sysname-vpn-instance-vpn1-af-ipv4] route-distinguisher 22:1

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.