Related Documentation
- J Series
- Routing Instances Overview
- LN Series
- Routing Instances Overview
- M Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview
- MX Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview
- PTX Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview
- SRX Series
- Routing Instances Overview
- T Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview
Introduction to Routing Instances for OSPF
A routing instance is a collection of routing tables, interfaces, and routing protocol parameters. The set of interfaces belongs to the routing tables, and the OSPF routing protocol parameters control the information in the routing tables. You can further install routes learned from OSPF routing instances into routing tables in the OSPF routing table group.
![]() | Note: The default routing instance, master, refers to the main inet.0 routing table. The master routing instance is reserved and cannot be specified as a routing instance. |
You can configure the following types of routing instances:
- OSPFv2—Forwarding, Layer 2 virtual private network (VPN), nonforwarding, VPN routing and forwarding (VRF), virtual router, and virtual private LAN service (VPLS).
- OSPFv3—Nonforwarding, VRF, and virtual router.
Each routing instance has a unique name and a corresponding IP unicast table. For example, if you configure a routing instance with the name my-instance, the corresponding IP unicast table is my-instance.inet.0. All routes for my-instance are installed into my-instance.inet.0.
You can also configure multiple routing instances of OSPF.
Minimum Routing-Instance Configuration for OSPFv2
To configure a routing instance for OSPFv2, you must include at least the following statements in the configuration:
![]() | Note: You can configure a logical interface under only one routing instance. |
Minimum Routing-Instance Configuration for OSPFv3
To configure a routing instance for OSPFv3, you must include at least the following statements in the configuration:
![]() | Note: You can configure a logical interface under only one routing instance. |
Multiple Routing Instances of OSPF
Multiple instances of OSPF are used for Layer 3 VPN implementations. The multiple instances of OSPF keep routing information for different VPNs separate. The VRF instance advertises routes from the customer edge (CE) router to the provider edge (PE) router and advertises routes from the PE router to the CE router. Each VPN receives only routing information belonging to that VPN.
You can create multiple instances of OSPF by including statements at the following hierarchy levels:
- [edit routing-instances routing-instance-name (ospf | ospf3)]
- [edit logical-systems logical-system-name routing-instances routing-instance-name (ospf | ospf3)]
Related Documentation
- J Series
- Routing Instances Overview
- LN Series
- Routing Instances Overview
- M Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview
- MX Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview
- PTX Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview
- SRX Series
- Routing Instances Overview
- T Series
- Example: Configuring Multiple Routing Instances of OSPF
- Routing Instances Overview


