This article describes an error in the configuration file that causes the commit command to fail with the following error message:
commit
error: [rib VR1.inet.0 routing-options static] next-table may loop
This article explains that the error is caused by an unsupported configuration, and provides an alternative that allows routing information to be shared between routing instances.
When a commit is attempted in the following configuration snippet, the command fails with the following error message:
VR1 { instance-type virtual-router; routing-options { static { route 10.0.0.0/24 next-table VR2.inet.0; } } } VR2 { instance-type virtual-router; routing-options { static { route 192.168.1.0/24 next-table VR1.inet.0; } } } root@B8_42# commit check error: [rib VR1.inet.0 routing-options static] next-table may loop error: configuration check-out failed
This is caused by an error in the configuration file. As shown in the above configuration, there is a route for 10.0.0.0/24 with the next-table as VR2.inet.0, and there is a route in the VR2 routing-instance for network 192.168.1.0/24 with the next-table as VR1.inet.0. This is not a supported configuration.
The use of next-table from one routing instance (VR1) to another routing instance (V. VR2) is allowed only in one direction, not in both directions. This is to prevent any route lookup loops. The network subnets do not need to be the same.
next-table
As an alternative, use either Rib-groups or the Policy option to share routing information between routing instances. Refer to KB19787: [SRX, J Series] Example - Importing Routes to and from virtual routers on SRX and J Series [juniper.net] for more information.
2020-06-09: Article checked for accuracy and validity; no changes made; article relevant