#configure terminal | Enter Configure mode. |
(config)# ip vrf VRF1 | Create a VRF, vrf1. |
(config-vrf)#rd 100:10 | Configure a route distinguisher value. |
(config-vrf)#route-target both 100:10 | Configure a route target both value to VRF. |
(config-vrf)#exit | Exit from VRF configuration mode. |
(config)#interface eth1 | Enter Interface configuration mode. |
(config-if)#ip vrf forwarding VRF1 | Configure the interface to a VRF. |
(config-if)#ip address 30.30.30.30/24 | Assign an IP address to the interface. |
(config-if)#ipv6 address 2ffe::10/64 | Assign an IPV6 address to the interface. |
(config-if)#exit | Exit from interface configuration mode. |
(config)#ip route vrf VRF1 50.50.50.0/24 eth1 | Create a VRF static route. |
(config)#interface eth2 Enter | Interface configuration mode. |
(config-if)#ipv6 address 3ffe::10/64 | Assign an IPV6 address to the interface. |
(config-if)#exit | Exit from interface configuration mode. |
(config)#router bgp 100 Define the routing process. | The number 100 specifies the AS number of R1. |
(config-router)#bgp router-id 1.1.1.1 | Configure a fixed Router ID (1.1.1.1) for the BGP4+ routing process. |
(config-router)#neighbor 2.2.2.2 remote-as 200 | Define BGP neighbors, and establish a TCP session. 2.2.2.2 is the IP address of the neighbor (R1), and 200 is the neighbor’s AS number. |
(config-router)#neighbor 3ffe::11 remote-as 200 | Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe::11)and the AS number(200)of neighbor R2. |
(config-router)#address-family vpnv4 unicast | Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes. |
(config-router-af)#neighbor 2.2.2.2 activate | Activate the neighbor R2(2.2.2.2), and enable exchange of IP address prefix types with this neighbor. |
(config-router-af)#neighbor 3ffe::11 allow-ebgp-vpn | Apply allow-ebgp-vpn to allow an eBGP neighbor to be a VPN peer. |
(config-router-af)#neighbor 3ffe::11 activate | Activate the neighbor R2(3ffe::11), and enable exchange of IPv6 address prefix types with this neighbor. |
(config-router-af)#neighbor 3ffe::11 capability extended-nexthop-encode | Enable capability to encode IPv6 nexthop in VPNv4 NLRI. |
(config-router-af)#exit-address-family | Exit Address Family mode, and return to Router mode. |
(config-router)#address-family ipv4 vrf VRF1 | Enter IPv4 VRF address family. |
(config-router-af)#redistribute static | Redistribute static into the IPv4 VRF address family. |
(config-router-af)#exit-address-family | Exit Address Family mode, and return to Router mode. |
(config-router)#exit | Exit Router mode, and return to Configure mode. |
(config)#commit | Apply commit. |
(config)#exit | Exit the config mode. |
#configure terminal | Enter Configure mode. |
(config)# ip vrf VRF1 | Create a VRF, vrf1. |
(config-vrf)#rd 100:10 | Configure a route distinguisher value. |
(config-vrf)#route-target both 100:10 | Configure a route target both value to VRF. |
(config-vrf)#exit | Exit from VRF configuration mode. |
(config)#interface eth1 | Enter Interface configuration mode. |
(config-if)#ip vrf forwarding VRF1 | Configure the interface to a VRF. |
(config-if)#ip address 40.40.40.40/24 | Assign an IP address to the interface. |
(config-if)#ipv6 address 4ffe::10/64 | Assign an IPV6 address to the interface. |
(config-if)#exit | Exit from interface configuration mode. |
(config)#ip route vrf VRF1 66.66.66.0/24 eth1 | Create a VRF static route. |
(config)#interface eth2 | Enter Interface configuration mode. |
(config-if)#ipv6 address 3ffe::11/64 | Assign an IPV6 address to the interface. |
(config-if)#exit | Exit from interface configuration mode. |
(config)#router bgp 200 Define the routing process. | The number 200 specifies the AS number of R1. |
(config-router)#bgp router-id 2.2.2.2 | Configure a fixed Router ID (2.2.2.2) for the BGP4+ routing process. |
(config-router)#neighbor 1.1.1.1 remote-as 100 | Define BGP neighbors, and establish a TCP session. 1.1.1.1 is the IP address of the neighbor (R1), and 100 is the neighbor’s AS number. |
(config-router)#neighbor 3ffe::10 remote-as 100 | Define the BGP neighbor (R2), and establish a TCP session by specifying the IPv6 address (3ffe::10)and the AS number(100)of neighbor R2. |
(config-router)#address-family vpnv4 unicast | Enter Address Family mode for configuring routing sessions that use IPv6 address prefixes. |
(config-router-af)#neighbor 1.1.1.1 activate | Activate the neighbor R2(1.1.1.1), and enable exchange of IP address prefix types with this neighbor. |
(config-router-af)#neighbor 3ffe::10 allow- ebgp-vpn | Apply allow-ebgp-vpn to allow an eBGP neighbor to be a VPN peer. |
(config-router-af)#neighbor 3ffe::10 activate | Activate the neighbor R2(3ffe::10), and enable exchange of IPv6 address prefix types with this neighbor. |
(config-router-af)#neighbor 3ffe::10 capability extended-nexthop-encode | Enable capability to encode IPv6 nexthop in VPNv4 NLRI. |
(config-router-af)#exit-address-family | Exit Address Family mode, and return to Router mode. |
(config-router)#address-family ipv4 vrf VRF1 | Enter IPv4 VRF address family. |
(config-router-af)#redistribute static | Redistribute static into the IPv4 VRF address family. |
(config-router-af)#exit-address-family | Exit Address Family mode, and return to Router mode. |
(config-router)#exit | Exit Router mode, and return to Configure mode. |
(config)#commit | Apply commit. |
(config)#exit | Exit the config mode. |