This section describes how to configure the VPN target to control route advertisement and acceptance.
system-view
ip vpn-instance vpn-instance-name1
ipv4-family
vpn-target vpn-target1 &<1-8> import-extcommunity
vpn-target1 lists the Export VPN targets advertised by all the Spoke-PEs.
import route-policy policy-name
In addition to using a VPN target to control VPN route sending and receiving, an import routing policy can be configured to better control VPN route receiving. The routing policy filters routes before they are imported into the VPN instance IPv4 address family.
export route-policy policy-name
Besides using a VPN target to control VPN route sending and receiving, an export routing policy can be configured to better control VPN route sending. The export routing policy filters routes before they are advertised to other PEs.
quit
ip vpn-instance vpn-instance-name2
ipv4-family
vpn-target vpn-target2 &<1-8> export-extcommunity
vpn-target2 lists the Import VPN targets advertised by all the Spoke-PEs.
import route-policy policy-name
In addition to using a VPN target to control VPN route sending and receiving, an import routing policy can be configured to better control VPN route receiving. The routing policy filters routes before they are imported into the VPN instance IPv4 address family.
export route-policy policy-name
Besides using a VPN target to control VPN route sending and receiving, an export routing policy can be configured to better control VPN route sending. The export routing policy filters routes before they are advertised to other PEs.
system-view
ip vpn-instance vpn-instance-name1
ipv4-family
vpn-target vpn-target2 &<1-8> import-extcommunity
vpn-target2 should be included in the export VPN target list of the Hub-PE.
vpn-target vpn-target1 &<1-8> export-extcommunityvpn-target1 should be included in the import VPN target list of the Hub-PE.
import route-policy policy-name
In addition to using a VPN target to control VPN route sending and receiving, an import routing policy can be configured to better control VPN route receiving. The routing policy filters routes before they are imported into the VPN instance IPv4 address family.
export route-policy policy-name
Besides using a VPN target to control VPN route sending and receiving, an export routing policy can be configured to better control VPN route sending. The export routing policy filters routes before they are advertised to other PEs.