Description

Why output of SNMP walk for mplsVpnVrfDescription object goes into a loop when the length of the routing-instance name is more than 31 characters.

Symptoms

Below is the example where the output of an SNMP walk for mplsVpnVrfDescription object would go into loop when the routing-instance name length is more than 31 characters.

Routing-instance name configured as 31 characters long

[edit]
jtac@router-re0# show routing-instances
1234567891234567891234567891234 {
   instance-type vrf;
   interface lo0.10;
   route-distinguisher 100:100;
   vrf-target target:100:100;
   }

Expected output below since the length falls within the range as per RFC 4328
[edit]
jtac@router-re0# run show snmp mib walk mplsVpnVrfDescription
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 1234567891234567891234567891234


Rename the routing-instance so that the name length is 32 characters long.
[edit]
jtac@router-re0# rename routing-instances 1234567891234567891234567891234 to 12345678912345678912345678912345

[edit]
jtac@router-re0# commit
commit complete

Below output indicates the result going into a loop
[edit]
jtac@router-re0# run show snmp mib walk mplsVpnVrfDescription
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345
mplsVpnVrfDescription.31.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52.53.54.55.56.57.49.50.51.52 = 12345678912345678912345678912345


Solution

This is expected behavior.  To avoid this behavior make sure that routing-instances names are not more than 31 characters long.

Below is the explanation:

l3vpnmib.mib is an experimental version of rfc4382. The MIB object MplsVpnName in l3vpnmib.mib translates to MplsL3VpnName in rfc4382.

Below is from RFC4328, where the MplsVpnName length is restricted to 31 characters.
MplsVpnName ::= TEXTUAL-CONVENTION
STATUS current
DESCRIPTION
"An identifier that is assigned to each MPLS/BGP VPN and is used to uniquely identify it. This is assigned by the system operator or NMS and SHOULD be unique throughout the MPLS domain. If this is the case, then this identifier can then be used at any LSR within a specific MPLS domain to identify this MPLS/BGP VPN. It may also be possible to preserve the uniqueness of this identifier across MPLS domain boundaries, in which case this identifier can then be used to uniquely identify MPLS/BGP VPNs on a more global basis. This object MAY be set to the VPN ID as defined in RFC 2685." REFERENCE "RFC 2685 [VPN-RFC2685] Fox B., et al, 'Virtual Private Networks Identifier', September 1999." SYNTAX OCTET STRING(SIZE (0..31))

Since the standard MIB restricts it to 31 characters, we also restricted the routing-instance name to 31 characters in l3vpnmib.mib to comply with RFC.  Junos allows us to name the routing-instance up to 127 characters; hence we may see this issue when routing-instance name exceeds 31 characters.

The solution to this issue is to restrict the instance name to 31 characters. 

One can also make use of commit script to do a commit check if any of routing-instance’s name is more than 31 characters.