---
name: "SNMP::Info::Layer3::Juniper"
section: "3pm"
platform: "linux"
package: "libsnmp-info-perl"
version: "3.972002-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SNMP::Info::Layer3::Juniper"
---

# SNMP::Info::Layer3::Juniper(3pm)

SNMP Interface to L3 Juniper Devices

## NAME

SNMP::Info::Layer3::Juniper - SNMP Interface to L3 Juniper Devices

## AUTHOR

Bill Fenner

## SYNOPSIS

```
 # Let SNMP::Info determine the correct subclass for you.
 my $juniper = new SNMP::Info(
                          AutoSpecify => 1,
                          Debug       => 1,
                          DestHost    => 'myrouter',
                          Community   => 'public',
                          Version     => 2
                        )
    or die "Can't connect to DestHost.\n";
 my $class      = $juniper->class();
 print "SNMP::Info determined this device to fall under subclass : $class\n";
```

## DESCRIPTION

Subclass for Juniper Devices running JUNOS

### Inherited Classes

- SNMP::Info::Layer3

  ### Required MIBs

- *JUNIPER-VLAN-MIB* dated "200901090000Z" or later.

  - *JUNIPER-CHASSIS-DEFINES-MIB*

  - *JUNIPER-MIB*

  - *JUNIPER-VIRTUALCHASSIS-MIB*

  - *JUNIPER-L2ALD-MIB*

  ### Inherited Classes' MIBs

See "Required MIBs" in SNMP::Info::Layer3 for its own MIB requirements.

## GLOBALS

These are methods that return scalar value from SNMP

- $juniper-\>**vendor()**

  Returns 'juniper'

- $juniper-\>**os()**

  Returns 'junos'

- $juniper-\>**layers()**

  Checks forwarding table for Layer 2 support since some routers with switches do not report layers properly.

- $juniper-\>**os\_ver()**

  Returns the software version extracted first from `"sysDescr"` or `"lldpLocSysDesc"` if not available in `"sysDescr"`.

- $juniper-\>**model()**

  Returns the model from `"sysObjectID"`, with `"jnxProductName"` removed from the beginning.

- $juniper-\>**serial()**

  Returns serial number

  (`"jnxBoxSerialNo"`)

- $juniper-\>**mac()**

  Returns the MAC address used by this bridge when it must be referred to in a unique fashion.

  (`"dot1dBaseBridgeAddress"`)

- $juniper-\>**box\_descr()**

  The name, model, or detailed description of the device.

  (`"jnxBoxDescr"`)

- $juniper-\>**version()**

  (`"jnxVirtualChassisMemberSWVersion"`)

- $juniper-\>**vc\_model()**

  (`"jnxVirtualChassisMemberModel"`)

### Globals imported from SNMP::Info::Layer3

See documentation in "GLOBALS" in SNMP::Info::Layer3 for details.

## TABLE METHODS

These are methods that return tables of information in the form of a reference to a hash.

- $juniper-\>**qb\_fdb\_index()**

  Returns reference to hash: key = FDB ID, value = VLAN ID.

- $juniper-\>**v\_index()**

  Returns (`"jnxL2aldVlanTag"`) or (`"jnxExVlanTag"`) depending upon switch software version

- $juniper-\>**v\_name()**

  Returns (`"jnxL2aldVlanName"`) or (`"jnxExVlanName"`) depending upon switch software version

- $juniper-\>**v\_type()**

  Returns (`"jnxL2aldVlanType"`) or (`"jnxExVlanType"`) depending upon switch software version

- $juniper-\>**i\_trunk()**

  (`"jnxExVlanPortAccessMode"`)

- $juniper-\>**i\_vlan()**

  Returns a mapping between `"ifIndex"` and the PVID or default VLAN.

- $juniper-\>**i\_vlan\_membership()**

  Returns reference to hash of arrays: key = `"ifIndex"`, value = array of VLAN IDs.  These are the VLANs which are members of the egress list for the port.

- $juniper-\>**i\_vlan\_membership\_untagged()**

  Returns reference to hash of arrays: key = `"ifIndex"`, value = array of VLAN IDs.  These are the VLANs which are members of the untagged egress list for the port.

- $juniper-\>**peth\_port\_ifindex()**

  Returns reference to a hash: key= PowerEthernet MIB interface number, value = `"ifIndex"`. As Juniper does not provide a mapping function, this does it manually. For example, ge-0/0/1 registers as PowerEthernet interface '1.2'

### Pseudo *ENTITY-MIB* information

These methods emulate *ENTITY-MIB* Physical Table methods using *JUNIPER-MIB* and *JUNIPER-VIRTUALCHASSIS-MIB*.

- $juniper-\>**e\_index()**

  Returns reference to hash.  Key: IID, Value: Integer, Indices are combined into a eight digit integer, each index is two digits padded with leading zero if required.

- $juniper-\>**e\_class()**

  Returns reference to hash.  Key: IID, Value: General hardware type.

- $juniper-\>**e\_descr()**

  Returns reference to hash.  Key: IID, Value: Human friendly name

- $juniper-\>**e\_hwver()**

  Returns reference to hash.  Key: IID, Value: Hardware version

- $juniper-\>**e\_vendor()**

  Returns reference to hash.  Key: IID, Value: juniper

- $juniper-\>**e\_serial()**

  Returns reference to hash.  Key: IID, Value: Serial number

- $juniper-\>**e\_pos()**

  Returns reference to hash.  Key: IID, Value: The relative position among all entities sharing the same parent.

- $juniper-\>**e\_type()**

  Returns reference to hash.  Key: IID, Value: Type of component/sub-component as defined in *JUNIPER-CHASSIS-DEFINES-MIB*.

- $juniper-\>**e\_parent()**

  Returns reference to hash.  Key: IID, Value: The value of **e\_index()** for the entity which 'contains' this entity.  A value of zero indicates	this entity is not contained in any other entity.

- $entity-\>**e\_fru()**

  BOOLEAN. Is a Field Replaceable unit?

  (`"entPhysicalFRU"`)

### Table Methods imported from SNMP::Info::Layer3

See documentation in "TABLE METHODS" in SNMP::Info::Layer3 for details.
