In this configuration example, the vpna-site1 BGP group for VPN A installs the routes learned from the BGP session into the routing tables defined in the vpna-vpnab routing table group. For VPN AB, the vpnab-site1 group installs the routes learned from the BGP session into the routing tables defined in the vpnab-vpna_and_vpnb routing table group. For VPN B, the vpnb-site1 group installs the routes learned from the BGP session into the routing tables defined in the vpnb-vpnab routing table group. Interface routes are not needed for this configuration.
The VRF import and export policies are similar to those defined in Configuring Static Routes Between the PE and CE Routers, except the export protocol is BGP instead of a static route. On all vrf-export policies, you use the from protocol bgp statement.
On Router PE1, configure BGP between the PE and CE routers:
- [edit]
- routing-instances {
-
- VPN-A {
- instance-type vrf;
- interface fe-1/0/0.0;
- route-distinguisher 10.255.14.175:3;
- vrf-import vpna-import;
- vrf-export vpna-export;
-
- protocols {
-
- bgp {
-
- group vpna-site1 {
-
- family inet {
-
- unicast {
- rib-group vpna-vpnab;
- }
- }
- peer-as 1;
- neighbor 192.168.197.141;
- }
- }
- }
- }
-
- VPN-AB {
- instance-type vrf;
- interface fe-1/1/0.0;
- route-distinguisher 10.255.14.175:9;
- vrf-import vpnab-import;
- vrf-export vpnab-export;
-
- protocols {
-
- bgp {
-
- group vpnab-site1 {
-
- family inet {
-
- unicast {
- rib-group vpnab-vpna_and_vpnb;
- }
- }
- peer-as 9;
- neighbor 192.168.197.178;
- }
- }
- }
- }
-
- VPN-B {
- instance-type vrf;
- interface fe-1/0/2.0;
- route-distinguisher 10.255.14.175:10;
- vrf-import vpnb-import;
- vrf-export vpnb-export;
-
- protocols {
-
- bgp {
-
- group vpnb-site1 {
-
- family inet {
-
- unicast {
- rib-group vpnb-vpnab;
- }
- }
-
- neighbor 192.168.197.242 {
- peer-as 10;
- }
- }
- }
- }
- }
- }