Configuring VRF and Route Targets for Import and Export Rules
Procedure
Command or Action | Purpose | |
---|---|---|
Step 1 |
configure terminal |
Enters global configuration mode. |
Step 2 |
vrf vrf-name |
Defines a VPN routing and forwarding (VRF) instance and enters the VRF configuration mode. |
Step 3 |
rd auto |
Automatically assigns a unique route distinguisher (RD) to VRF. |
Step 4 |
address-family { ipv4 | ipv6 } unicast |
Specifies either the IPv4 or IPv6 address family for the VRF instance and enters address family configuration submode. |
Step 5 |
route-target import route-target-id |
Configures importing of routes to the VRF from the L3VPN BGP NLRIs that have the matching route-target value. |
Step 6 |
route-target export route-target-id |
Configures exporting of routes from the VRF to the L3VPN BGP NLRIs and assigns the specified route-target identifiers to the L3VPN BGP NLRIs. |
Step 7 |
route-target import route-target-id evpn |
Configures importing of routes from the L3 EVPN BGP NLRI that have the matching route-target value. |
Step 8 |
route-target export route-target-id evpn |
Configures exporting of routes from the VRF to the L3 EVPN BGP NLRIs and assigns the specified route-target identifiers to the BGP EVPN NLRIs. |