Routing Instances Configuration Guidelines
You can create multiple instances of Border Gateway Protocol (BGP), Intermediate System-to-Intermediate System (IS-IS), Label Distribution Protocol (LDP), Open Shortest Path First version 2 (OSPF), Open Shortest Path First version 3 (OSPFv3), Protocol Independent Multicast (PIM), Routing Information Protocol (RIP), and static routes by including statements at the following hierarchy levels:
[edit routing-instancesrouting-instance-nameprotocols][edit logical-routerslogical-router-namerouting-instancesrouting-instance-nameprotocols]
NOTE: The default routing instance,
master, refers to the maininet.0routing table. The master routing instance is reserved and cannot be specified as a routing instance.
Each routing instance consists of sets of the following:
You can configure six types of routing instances:
- Forwarding—Use this routing instance type for filter-based forwarding applications. For this instance type, there is no one-to-one mapping between an interface and a routing instance. All interfaces belong to the default instance
inet.0.- Layer 2 VPN—Use this routing instance type for Layer 2 virtual private network (VPN) implementations.
- Nonforwarding—Use this routing instance type when a separation of routing table information is required. There is no corresponding forwarding table. All routes are installed into the default forwarding table. IS-IS instances are strictly nonforwarding instance types.
- Virtual router—Similar to a VPN routing and forwarding instance type, but used for non-VPN-related applications. There are no virtual routing and forwarding (VRF) import, VRF export, VRF target, or route distinguisher requirements for this instance type.
- VPLS—Use the virtual private local-area network service (VPLS) routing instance type for point-to-multipoint LAN implementations between a set of sites in a VPN.
- VRF—Use the VPN routing and forwarding routing (VRF) instance type for Layer 3 VPN implementations. This routing instance type has a VPN routing table as well as a corresponding VPN forwarding table. For this instance type, there is a one-to-one mapping between an interface and a routing instance. Each VRF instance corresponds with a forwarding table. Routes on an interface go into the corresponding forwarding table.
For more detailed information about configuring VPNs and Layer 2 VPNs, see the JUNOS Internet Software VPNs Configuration Guide.
This chapter describes the following tasks for configuring routing instances:
- Routing Instances Minimum Configuration on page 140
- Configure Multiple Instances of BGP on page 143
- Configure Multiple Instances of IS-IS on page 144
- Configure Multiple Instances of LDP on page 147
- Configure Multiple Instances of OSPF on page 148
- Configure Multiple Instances of PIM on page 152
- Configure Multiple Instances of RIP on page 153
- Configure an Instance on page 153
- Configure VPNs on page 154
- Configure an Instance Type on page 154
- Configure a Route Distinguisher (Address Extension) on page 155
- Configure Filter-Based Forwarding on page 155
- Configure Class of Service-Based Forwarding on page 157
- Configure Secondary VRF Import and Export Policy on page 158
- Configure Policy-based Export for Routing Instances on page 159
- Configure a VRF Table Label on page 164
- Configure a VRF Target on page 164
- Configure an OSPF Domain ID on page 164
- Configure a Route Limit for Routing Tables on page 168
- Configure an Independent Domain
To configure routing instances, include the following statements:
[edit]routing-instances {routing-instance-name{descriptiontext;forwarding-options;interfaceinterface-name;instance-type (forwarding | l2vpn | no-forwarding | virtual-router | vpls | vrf);no-vrf-advertise;route-distinguisher(as-number:number|ip-address:number);vrf-import [policy-names];vrf-export [policy--names];vrf-table-label;vrf-target {exportcommunity-name;importcommunity-name;}protocols {bgp {bgp-configuration;}isis {isis-configuration;}l2vpn {l2vpn-configuration;}ldp {ldp-configuration;}ospf {domain-iddomain-id;domain-vpn-tagnumber;route-type-community (iana | vendor);ospf-configuration;}ospf3 {domain-iddomain-id;domain-vpn-tagnumber;route-type-community (iana | vendor);ospf3-configuration;}pim {pim-configuration;}rip {rip-configuration;}vpls {vpls-configuration;}}routing-options {aggregate {defaults {aggregate-options;}routedestination-prefix{policypolicy-name;aggregate-options;}}auto-export {(disable | enable);family {inet {multicast {(disable | enable);rib-grouprib-group;}unicast {(disable | enable);rib-grouprib-group;}}}traceoptions {filename<replace> <sizesize> <filesnumber> <no-stamp> <world-readable>;flagflag<flag-modifier> <disable>;}}autonomous-systemautonomous-system<loopsnumber> } independent-domain; }confederationconfederation-autonomous-systemmembersautonomous-system;fate-sharing {groupgroup-name;costvalue;fromaddress[toaddress] ;}forwarding-table {export [policy-names];}generate {defaults {generate-options;}routedestination-prefix{policypolicy-name;generate-options;}}instance-export [policy-names];instance-import [policy-names];interface-routes {rib-groupgroup-name;}martians {destination-prefixmatch-type<allow>;}maximum-routesroute-limit<log-only | thresholdvalue>;multicast {scopescope-name{interfaceinterface-name;prefixdestination-prefix;}ssm-groups {addresses;}}options {syslog (levellevel| uptolevel);}resolution {tracefilter [policy-names];traceoptions {filename<replace> <sizesize> <filesnumber> <no-stamp><(world-readable | no-world-readable)>;flagflag<flag-modifier> <disable>;}}ribrouting-table-name{aggregate {defaults {aggregate-options;}routedestination-prefix{policypolicy-name;aggregate-options;}}generate {defaults {generate-options;}routedestination-prefix{policypolicy-name;generate-options;}}martians {destination-prefixmatch-type<allow>;}static {defaults {static-options;}rib-groupgroup-name;routedestination-prefix{lsp-next-hop {metricmetric;preferencepreference;}next-hop;qualified-next-hop {metricmetric;preferencepreference;}static-options;}}}rib-groups {group-name{import-policy [policy-names];import-rib [group-names];export-ribgroup-name;}}route-record ;router-idaddress;static {defaults {static-options;}rib-groupgroup-name;routedestination-prefix{lsp-next-hop {metricmetric;preferencepreference;}next-hop;qualified-next-hop {metricmetric;preferencepreference;}static-options;}}traceoptions {filename<replace> <sizesize> <filesnumber> <no-stamp><(world-readable | no-world-readable)>;flagflag<flag-modifier> <disable>;}}}}You can configure the statements at the following hierarchy levels: