The import-rib protocol direct command imports public network or other VPN instance routes to a VPN instance routing table.
The undo import-rib protocol direct command restores the default configuration.
By default, public network or other VPN instance routes are not imported to VPN instance routing tables.
Parameter | Description | Value |
---|---|---|
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance. |
The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string. |
public |
Imports public network routes. |
- |
protocol |
Specifies a protocol type of route to be imported to a VPN instance routing table. |
- |
direct |
Imports direct routes, excluding direct VLINK routes. |
- |
route-policy route-policy-name |
Specifies a route-policy to filter routes to be imported. |
The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string. |
route-filter route-filter-name |
Specifies the name of a route-filter. |
The value is a string of 1 to 200 case-sensitive characters, spaces not supported. If parameters are included in the referenced route-filter, specify values for them in the format of (var1, var2, ...var8) behind the route-filter name. A maximum of eight parameters can be specified, and each value ranges from 1 to 200 characters. |
Usage Scenario
In a BGP/MPLS IP VPN scenario, one VPN can communicate with another VPN if they have matching VPN targets, but VPNs cannot communicate with the public network. To enable a VPN to communicate with the public network, you have to ensure that the VPN and public network can obtain routes to each other. To import public network routes to a VPN instance, run the import-rib protocol direct command.
In an intelligent traffic control scenario, traffic of different users are distributed to different VPNs. To enable the traffic to reach the public network, run the import-rib protocol direct command to import public network routes to each VPN instance routing table.