router-id
Syntax router-id address;
Hierarchy Level [edit logical-systems logical-system-name routing-instances routing-instance-name
routing-options],
[edit logical-systems logical-system-name routing-options],
[edit routing-instances routing-instance-name routing-options],
[edit routing-options]
Release Information Statement introduced before Junos OS Release 7.4.
Statement introduced in Junos OS Release 9.0 for EX Series switches.
Statement introduced in Junos OS Release 11.3 for the QFX Series.
Statement introduced in Junos OS Release 12.3 for ACX Series routers.
Statement introduced in Junos OS Release 14.1X53-D20 for the OCX Series.
Description Specify the routing device’s IP address.
The router identifier is used by BGP and OSPF to identify the routing device from which
a packet originated. The router identifier usually is the IP address of the local routing
device. If you do not configure a router identifier, the IP address of the first interface to
come online is used. This is usually the loopback interface. Otherwise, the first hardware
interface with an IP address is used.
NOTE: We strongly recommend that you configure the router identifier under
the [edit routing-options] hierarchy level to avoid unpredictable behavior if
the interface address on a loopback interface changes.
You must configure a router-id in order for BGP and OSPF to function in a routing instance.
Use the show route instance detail command to display the router-id value for a routing
instance. If the router-id is 0.0.0.0, then the routing instance has no router-id.
For more information about the router identifier in OSPF, see Example: Configuring an
OSPF Router Identifier.
NOTE: If you run OSPF for IPv6 or BGP for IPv6 in a routing instance, you
must configure an IPv4 router identifier (router-id) in the routing instance
itself. In other words, the IPv4 router-id in the main routing instance is not
inherited by other routing instances. Even if you run only IPv6 OSPF or BGP
in a routing instance, the IPv4 router-id must be configured because OSPF
and BGP, even when used exclusively with IPv6, use the IPv4 router-id for
handshaking. If you do not configure the IPv4 router-id in the IPv6 OSPF or
BGP routing instance, then the IPv6 protocols will use invalid IPv4 address
0.0.0.0 and the adjacencies and connections will fail.
1705Copyright © 2017, Juniper Networks, Inc.
Chapter 41: Configuration Statements