Usage Scenario
In a 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 public 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 public command to import public network routes to each VPN instance routing table.
Traffic forwarding relies on direct routes (Vlink direct routes) generated based on user entries. When VLAN tag termination sub-interfaces are used for route import between VPN and public network, Vlink direct routes cannot be imported. As a result, traffic forwarding is interrupted. To solve this problem, route import between VPN and public network newly supports import of Vlink direct routes.
Precautions
If you run the import-rib public command on a device without adding the valid-route keyword, the device will import all routes of the specified type from the public network instance's corresponding routing table to the specified VPN instance. If an imported route is preferred in this routing table, the device will advertise the route to other devices and deliver the route to the VPN instance's IP routing table to guide traffic forwarding.
If you run the
import-rib public command with only the valid-route keyword added, the device will import the valid IP routes of the specified type from the public network instance's corresponding routing table to the specified VPN instance. If the imported routes are preferred in this routing table, the device will advertise these routes to other devices and deliver these routes to the VPN instance's IP routing table to guide traffic forwarding.