VPN target: A VPN target controls route learning between VPN instances, isolating routes of VPN instances from each other. VPN targets include export and import ones. Before advertising Virtual Private Network version 4 (VPNv4) or Virtual Private Network version 6 (VPNv6) routes to a remote Multiprotocol Extensions for Border Gateway Protocol (MP-BGP) peer, a PE adds export VPN targets to the routes. After receiving the VPNv4 or VPNv6 routes, the remote MP-BGP peer determines which routes can be added to its local VPN instance routing table based on whether the export VPN targets carried in the routes match the import VPN target of the local VPN instance.
Source of Origin (SoO): Several CEs at a VPN site may be connected to different PEs. Routes advertised from the CEs to the PEs may be advertised back to the VPN site after the routes traverse the VPN backbone network. This may cause routing loops at the VPN site. To prevent routing loops, SoO attributes can be configured for routes from different VPN sites for differentiation.
The matching condition of an extcommunity filter can be specified using an extcommunity ID or a regular expression.
An extcommunity filter is used to filter only BGP routes because the extcommunity attribute is also a private attribute of BGP.
The system view is displayed.
Configure a VPN-Target extcommunity filter:
To configure a basic VPN-Target extcommunity filter, run the ip extcommunity-filter { basic-extcomm-filter-num | basic basic-extcomm-filter-name } [ index index-number ] { deny | permit } { rt { as-number:nn | 4as-number:nn | ipv4-address:nn } } &<1-16> command.
To configure an advanced VPN-Target extcommunity filter, run the ip extcommunity-filter { advanced-extcomm-filter-num | advanced advanced-extcomm-filter-name }[ index index-number ] { deny | permit } regular-expression command.
Configure an SoO extcommunity filter:
To configure a basic SoO extcommunity filter, run the ip extcommunity-list soo basic basic-extcomm-filter-name [ index index-number ] { permit | deny } { site-of-origin } &<1-16> command.
To configure an advanced SoO extcommunity filter, run the ip extcommunity-list soo advanced advanced-extcomm-filter-name [ index index-number ] { permit | deny } regular-expression command.
Configure an encapsulation extcommunity filter:
To configure a basic encapsulation extcommunity filter, run the ip extcommunity-list encapsulation basic encapsulation-name [ index index-number ] { permit | deny } { encapsulation-value } &<1-16> command.
To configure an advanced encapsulation extcommunity filter, run the ip extcommunity-list encapsulation advanced encapsulation-name [ index index-number ] { permit | deny } regular command.
Configure a segmented-nh extcommunity filter:
To configure a basic segmented-nh extcommunity filter, run the ip extcommunity-list segmented-nh basic segmented-nh-name [ index index-number ] { permit | deny } { segmented-nh-value } &<1-16> command.
To configure an advanced segmented-nh extcommunity filter, run the ip extcommunity-list segmented-nh advanced segmented-nh-name [ index index-number ] { permit | deny } regular command.
Multiple entries (or rules) can be defined in an extcommunity filter, and the relationship between them is OR, which means that the route matches the extcommunity filter if it matches one of the rules.
The configuration is committed.
Run the display ip extcommunity-filter command to check information about the configured extcommunity filters.