You can configure multiple instances of BGP at the following hierarchy levels:
Multiple instances of BGP are primarily used for Layer 3 VPN support.
Currently, EBGP (nonmultihop) peers are supported under the routing-instances hierarchy. EBGP peering is established over one of the interfaces configured under the routing-instances hierarchy. Routes learned from the EBGP peer are added to the instance-name.inet.0 table by default. You can configure import and export policies to control the flow of information into and out of the instance routing table.
For Layer 3 VPN support, configure BGP on the provider edge (PE) router to receive routes from the customer edge (CE) router and to send the instances’ routes to the CE router if necessary. You can use multiple instances of BGP to maintain separate per-site forwarding tables for keeping VPN traffic separate on the PE router. For more detailed information about configuring VPNs, see the JUNOS VPNs Configuration Guide.
You can configure import and export policies that allow the service provider to control and rate-limit traffic to and from the customer.
Configure multiple instances of BGP:
- [edit]
- routing-instances {
-
-
routing-instance-name {
- interface so-1/1/1.0;
- interface so-1/1/1.1;
- instance-type vrf;
- route distinguisher (as-number:number | ip-address:number);
-
- protocols {
-
- bgp {
-
- group group-name {
- peer-as 01;
- type external;
- import route-name;
- export route-name;
- neighbor 10.0.0.1;
- }
- }
- }
- }
- }
You can configure an EBGP multihop session for a VRF routing instance. Also, you can set up the EBGP peer between the PE and CE routers by using the loopback address of the CE router instead of the interface addresses.
![]() |
Note: BGP route reflection is not supported for VRF routing instances. |