The following section describes how to enable BGP route target filtering on Router PE3 for this example.
Configure the routing options on Router PE3 as follows:
- [edit]
- routing-options {
- route-distinguisher-id 10.255.14.178;
- autonomous-system 200;
- }
Configure the BGP protocol on Router PE3 as follows:
- [edit]
- protocols {
-
- bgp {
-
- group to_vpn04 {
- type internal;
- local-address 10.255.14.178;
- peer-as 200;
-
- neighbor 10.255.14.174 {
-
- family inet-vpn {
- unicast;
- }
- family route-target;
- }
- }
- }
- }
Configure the vpn1 routing instance on Router PE3 as follows:
- [edit]
- routing-instances {
-
- vpn1 {
- instance-type vrf;
- interface t3-0/0/0.0;
- vrf-target target:200:101;
-
- protocols {
-
- rip {
-
- group vpn1 {
- export bgp-routes;
- neighbor t3-0/0/0.0;
- }
- }
- }
- }
- }
Configure the vpn3 routing instance on Router PE3 as follows:
- [edit]
- routing-instances {
-
- vpn3 {
- instance-type vrf;
- interface t3-0/0/0.1;
- vrf-target target:200:103;
-
- protocols {
-
- rip {
-
- group vpn3 {
- export bgp-routes;
- neighbor t3-0/0/0.1;
- }
- }
- }
- }
- }
Configure the vpn4 routing instance on Router PE3 as follows:
- [edit]
- routing-instances {
-
- vpn4 {
- instance-type vrf;
- interface t3-0/0/0.2;
- vrf-target target:200:104;
-
- protocols {
-
- rip {
-
- group vpn4 {
- export bgp-routes;
- neighbor t3-0/0/0.2;
- }
- }
- }
- }
- }
Once you have configured Router PE3 in this manner, you should see the following when you issue the show route table bgp.rtarget.0 command:
user@host> show route table bgp.rtarget.0
bgp.rtarget.0: 4 destinations, 7 routes (4 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
200:200:101/96
*[RTarget/5] 00:29:42
Local
[BGP/170] 00:29:30, localpref 100, from
10.255.14.174
AS path: I
> via t3-0/0/1.0
200:200:102/96
*[BGP/170] 00:29:29, localpref 100, from
10.255.14.174
AS path: I
> via t3-0/0/1.0
200:200:103/96
*[RTarget/5] 00:29:42
Local
[BGP/170] 00:29:30, localpref 100, from
10.255.14.174
AS path: I
> via t3-0/0/1.0
200:200:104/96
*[RTarget/5] 00:29:42
Local
[BGP/170] 00:29:30, localpref 100, from
10.255.14.174
AS path: I
> via t3-0/0/1.0