Can the SNMP manager access data for routing instances?
Yes, Junos OS enables SNMP managers for all routing instances to request and manage SNMP data related to the corresponding routing instances and logical system networks.
Two different routing instance behaviors can occur, depending on where the clients originate:
- Clients from routing instances other than the default can access MIB objects and perform SNMP operations only on the logical system networks to which they belong.
- Clients from the default routing instance can access information related to all routing instances and logical system networks.
Routing instances are identified by either the context field in SNMPv3 requests or encoded in the community string in SNMPv1 or SNMPv2c requests. When encoded in a community string, the routing instance name appears first and is separated from the actual community string by the @ character.
To avoid conflicts with valid community strings that contain the @ character, the community is parsed only if typical community string processing fails. For example, if a routing instance named RI is configured, an SNMP request with RI@public is processed within the context of the RI routing instance. Access control (including views, source address restrictions, and access privileges) is applied according to the actual community string (the set of data after the @ character—in this case public). However, if the community string RI@public is configured, the PDU is processed according to that community, and the embedded routing instance name is ignored.
Logical systems perform a subset of the actions of a physical router and have their own unique routing tables, interfaces, policies, and routing instances. When a routing instance is defined within a logical system, the logical system name must be encoded along with the routing instance using a slash ( / ) to separate the two. For example, if the routing instance RI is configured within the logical system LS, that routing instance must be encoded within a community string as LS/RI@public. When a routing instance is configured outside a logical system (within the default logical system), no logical system name, or / character, is needed.
Additionally, when a logical system is created, a default routing instance named default is always created within the logical system. This name should be used when querying data for that routing instance, for example LS/default@public. For SNMPv3 requests, the name logical system/routing instance should be identified directly in the context field.
For more information, click Understanding SNMP implementation in Junos OS,