---
name: "SNMP::Info::Layer1::Bayhub"
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::Layer1::Bayhub"
---

# SNMP::Info::Layer1::Bayhub(3pm)

SNMP Interface to Bay/Nortel/Avaya Hubs

## NAME

SNMP::Info::Layer1::Bayhub - SNMP Interface to Bay/Nortel/Avaya Hubs

## AUTHOR

Eric Miller

## SYNOPSIS

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

## DESCRIPTION

Provides abstraction to the configuration information obtainable from a Bay hub device through SNMP.  Also provides device MAC to port mapping through the proprietary MIB.

### Inherited Classes

- SNMP::Info::Layer2

  - SNMP::Info::NortelStack

  - SNMP::Info::SONMP

  ### Required MIBs

- *S5-ETHERNET-COMMON-MIB*

  - *S5-COMMON-STATS-MIB*

  ### Inherited MIBs

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

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

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

## GLOBALS

These are methods that return scalar value from SNMP

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

  Returns 'avaya'

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

  Returns 'bay\_hub'

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

  Cross references `$bayhub`-\>**id()** to the *SYNOPTICS-MIB* and returns the results.

  Removes either Baystack Hub, 5000, or 5005 depending on the model.

### Overrides

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

  Returns 00000011.  Class emulates Layer 2 functionality through proprietary MIBs.

- $bayhub-\>**index\_factor()**

  Required by SNMP::Info::SONMP.  Number representing the number of ports reserved per slot within the device MIB.  Returns 256.

- $bayhub-\>**slot\_offset()**

  Required by SNMP::Info::SONMP.  Offset if slot numbering does not start at 0.  Returns 0.

### Globals imported from SNMP::Info::Layer2

See "GLOBALS" in SNMP::Info::Layer2 for details.

### Global Methods imported from SNMP::Info::NortelStack

See "GLOBALS" in SNMP::Info::NortelStack for details.

### Global Methods imported from SNMP::Info::SONMP

See "GLOBALS" in SNMP::Info::SONMP for details.

## TABLE METHODS

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

### Overrides

- $bayhub-\>**i\_index()**

  Returns reference to map of IIDs to Interface index.

  Since hubs do not support `"ifIndex"`, the interface index is created using the formula (board \* 256 + port).

- $bayhub-\>**interfaces()**

  Returns reference to map of IIDs to physical ports.

- $bayhub-\>**i\_duplex()**

  Returns half, hubs do not support full duplex.

- $bayhub-\>**i\_duplex\_admin()**

  Returns half, hubs do not support full duplex.

- $bayhub-\>**i\_speed()**

  Returns interface speed.

- $bayhub-\>**i\_up()**

  Returns (`"s5EnPortLinkStatus"`) for each port.  Translates on/off to up/down.

- $bayhub-\>**i\_up\_admin()**

  Returns (`"s5EnPortPartStatus"`) for each port.

- $bayhub-\>set\_i\_up\_admin(state, ifIndex)

  Sets port state, must be supplied with state and port `"ifIndex"`

  State choices are 'up' or 'down'

  Example:\
     my `%if_map` = reverse %{$bayhub-\>**interfaces()**};\
     `$bayhub`-\>set\_i\_up\_admin('down', `$if_map`{'1.1'})\
         or die "Couldn't change port state. ",$bayhub-\>**error**(1);

- $bayhub-\>**bp\_index()**

  Simulates bridge MIB by returning reference to a hash containing the index for both the keys and values.

- $bayhub-\>**fw\_port()**

  Returns reference to map of IIDs of the `"S5-COMMON-STATS-MIB::s5CmSNodeTable"` to the Interface index.

- $bayhub-\>**fw\_mac()**

  (`"s5CmSNodeMacAddr"`)

### Pseudo *ENTITY-MIB* Information

These devices do not support *ENTITY-MIB*.  These methods emulate Physical Table methods using *S5-CHASSIS-MIB*.  See "TABLE METHODS" in SNMP::Info::NortelStack for details.

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

  Returns **ns\_e\_index()**.

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

  Returns **ns\_e\_class()**.

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

  Returns **ns\_e\_descr()**.

- $bayhub-\>**e\_name()**

  Returns **ns\_e\_name()**.

- $bayhub-\>**e\_fwver()**

  Returns **ns\_e\_fwver()**.

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

  Returns **ns\_e\_hwver()**.

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

  Returns **ns\_e\_parent()**.

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

  Returns **ns\_e\_pos()**.

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

  Returns **ns\_e\_serial()**.

- $bayhub-\>**e\_swver()**

  Returns **ns\_e\_swver()**.

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

  Returns **ns\_e\_type()**.

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

  Returns **ns\_e\_vendor()**.

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

See "TABLE METHODS" in SNMP::Info::Layer2 for details.

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

See "TABLE METHODS" in SNMP::Info::NortelStack for details.

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

See "TABLE METHODS" in SNMP::Info::SONMP for details.
