---
name: "SNMP::Info::Layer2::Bay"
section: "3pm"
platform: "linux"
package: "libsnmp-info-perl"
version: "2.06-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/SNMP::Info::Layer2::Bay"
---

# SNMP::Info::Layer2::Bay(3pm)

SNMP Interface to old Bay Network BayStack Switches

## NAME

SNMP::Info::Layer2::Bay - SNMP Interface to old Bay Network BayStack Switches

## AUTHOR

Max Baker

## SYNOPSIS

This module is Deprecated.  Please use Layer2::BayStack instead.

## DESCRIPTION

Provides abstraction to the configuration information obtainable from a  Bay device through SNMP.

For speed or debugging purposes you can call the subclass directly, but not after determining a more specific class using the method above.

```
 my $bay = new SNMP::Info::Layer2::Bay(...);
```

### Inherited Classes

- SNMP::Info::Layer2

  ### Required MIBs

- *SYNOPTICS-ROOT-MIB*

  - *S5-ETH-MULTISEG-TOPOLOGY-MIB*

  - Inherited classes

  MIBs required by "Required MIBs" in SNMP::Info::Layer2 and its superclasses.

## GLOBALS

These are methods that return scalar value from SNMP

- $bay-\>*vendor()*

  Returns 'bay' :)

- $bay-\>*model()*

  Cross references `$bay`-\>*id()* to the *SYNOPTICS-MIB* and returns the results.  303s and 304s have the same ID, so we have a hack to return depending on which it is.

  Removes `"sreg-"` from the model name

- $baystack-\>*os()*

  Returns 'bay'.

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

  Returns the os version extracted from `"sysDescr"`.

- $bay-\>*os\_bin()*

  Returns the firmware version extracted from `"sysDescr"`.

- $bay-\>*cdp\_id()*

  Returns the IP that the device is sending out for its Nmm topology info.

  (`"s5EnMsTopIpAddr"`)

- $bay-\>*cdp\_run()*

  Returns if the *S5-ETH-MULTISEG-TOPOLOGY* info is on for this device.

  (`"s5EnMsTopStatus"`)

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

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

## TABLE METHODS

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

### Overrides

- $bay-\>*interfaces()*

  Returns reference to map of IIDs to physical ports.

  Currently simply returns the `"ifIndex"`

- $bay-\>*i\_ignore()*

  Returns reference to hash of IIDs to ignore.

  Simply calls the *SNMP::Info::Layer2::i\_ignore()* for this.

- $bay-\>*i\_mac()*

  Returns the `"ifPhysAddress"` table entries.

  Removes all entries matching '00:00:00:00:00:00' -- Certain  older revisions of Bay 303 and 304 firmware report all zeros for each port mac.

### Pseudo CDP information

All entries with port=0 are local and ignored.

- $bay-\>*c\_if()*

  Returns reference to hash.  Key: port.1 Value: port (iid)

- $bay-\>*c\_ip()*

  Returns reference to hash.  Key: port.1

  The value of each hash entry can either be a scalar or an array. A scalar value is most likely a direct neighbor to that port.  It is possible that there is a non-bay device in between this device and the remote device.

  An array value represents a list of seen devices.  The only time you will get an array of neighbors, is if there is a non-bay device in between two or more devices.

  Use the data from the Layer2 Topology Table below to dig deeper.

- $bay-\>*c\_port()*

  Returns reference to hash. Key: IID, Value: Remote port (interfaces)

- $bay-\>*c\_platform()*

  Returns reference to hash. Key: IID, Value: Remote device type

- $bay-\>*port()*

  Returns reference to hash. Key: port.1 Value: port

- $bay-\>*platform()*

  Returns reference to hash. Key: port.1 Value: Remote Device Type

### Layer2 Topology info ("s5EnMsTopNmmTable")

- $bay-\>*bay\_topo\_slot()*

  Returns reference to hash.  Key: Table entry, Value:slot number

  (`"s5EnMsTopNmmSlot"`)

- $bay-\>*bay\_topo\_port()*

  Returns reference to hash.  Key: Table entry, Value:Port Number (interface iid)

  (`"s5EnMsTopNmmPort"`)

- $bay-\>*bay\_topo\_ip()*

  Returns reference to hash.  Key: Table entry, Value:Remote IP address of entry

  (`"s5EnMsTopNmmIpAddr"`)

- $bay-\>*bay\_topo\_seg()*

  Returns reference to hash.  Key: Table entry, Value:Remote Segment ID

  (`"s5EnMsTopNmmSegId"`)

- $bay-\>bay\_topo\_mac ("s5EnMsTopNmmMacAddr")

  Returns reference to hash.  Key: Table entry, Value:Remote MAC address

- $bay-\>bay\_topo\_platform

  Returns reference to hash.  Key: Table entry, Value:Remote Device Type

  (`"s5EnMsTopNmmChassisType"`)

- $bay-\>bay\_topo\_localseg

  Returns reference to hash.  Key: Table entry, Value:Boolean, if *bay\_topo\_seg()* is local

  (`"s5EnMsTopNmmLocalSeg"`)

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

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