SNMP::...Bayhub(3pm)
π NAME π
SNMP::Info::Layer1::Bayhub β the SNMP interface to Bay/Nortel/Avaya Hubs, bestie. This is page SNMP::...Bayhub(3pm) from the User Contributed Perl Documentation, and it's here to help you talk to your hub. π
β¨ AUTHOR β¨
Eric Miller. That's the icon, that's the legend, that's who wrote this. π
π¦ SYNOPSIS π¦
Okay so, first thing β let SNMP::Info figure out the correct subclass for you, you don't have to do it yourself:
#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";
(No, the missing semicolon is not a typo we made, and no, we are not "fixing" it. It's giving exactly-what-the-manpage-says energy. π )
πΈ DESCRIPTION πΈ
So basically, this module gives you an abstraction over all the configuration info you can pull off a Bay hub device via SNMP. And as a lil bonus it also gives you device MAC β‘οΈ port mapping through the proprietary MIB. Slay. β¨
π«Ά Inherited Classes
SNMP::Info::Layer2SNMP::Info::NortelStackSNMP::Info::SONMP
π«Ά Required MIBs
S5-ETHERNET-COMMON-MIBS5-COMMON-STATS-MIB
π«Ά Inherited MIBs
Like, these ones come from the parents, okay?
- 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 a scalar value from SNMP. Scalar, not table. Important distinction, iykyk.
$bayhub->vendor()β returns'avaya'$bayhub->os()β returns'bay_hub'$bayhub->model()β cross references$bayhub->id()to theSYNOPTICS-MIBand returns the results. It also removes eitherBaystack Hub,5000, or5005depending on the model.
π Overrides
$bayhub->layers()β returns00000011. The class emulates Layer 2 functionality through proprietary MIBs. Periodt.$bayhub->index_factor()β required bySNMP::Info::SONMP. It's a number representing the number of ports reserved per slot within the device MIB. Returns256.$bayhub->slot_offset()β also required bySNMP::Info::SONMP. It's the offset in case slot numbering does not start at 0. Returns0.
π 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. Table szn fr fr.
π Overrides
$bayhub->i_index()β returns a reference to a map of IIDs to Interface index. Now here's the tea: since hubs do not support"ifIndex", the interface index gets created using the formula(board * 256 + port).$bayhub->interfaces()β returns a reference to a map of IIDs to physical ports.$bayhub->i_duplex()β returnshalf, because hubs do not support full duplex. Not us being dramatic, that's just the hardware.$bayhub->i_duplex_admin()β returnshalf, same deal: hubs do not support full duplex.$bayhub->i_speed()β returns interface speed.$bayhub->i_up()β returns("s5EnPortLinkStatus")for each port, and translateson/offtoup/down. So cute, it's bilingual. π$bayhub->i_up_admin()β returns("s5EnPortPartStatus")for each port.$bayhub->set_i_up_admin(state, ifIndex)β sets the port state. You must supply both the state and the 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 the bridge MIB by returning a reference to a hash containing the index for both the keys and the values.$bayhub->fw_port()β returns a reference to a map of IIDs of the"S5-COMMON-STATS-MIB::s5CmSNodeTable"to the Interface index.$bayhub->fw_mac()β("s5CmSNodeMacAddr")
π§ Pseudo ENTITY-MIB Information π§
Lowkey important heads up: these devices do not support ENTITY-MIB. So instead, these methods emulate Physical Table methods using S5-CHASSIS-MIB. See "TABLE METHODS" in SNMP::Info::NortelStack for details.
$bayhub->e_index()β returnsns_e_index().$bayhub->e_class()β returnsns_e_class().$bayhub->e_descr()β returnsns_e_descr().$bayhub->e_name()β returnsns_e_name().$bayhub->e_fwver()β returnsns_e_fwver().$bayhub->e_hwver()β returnsns_e_hwver().$bayhub->e_parent()β returnsns_e_parent().$bayhub->e_pos()β returnsns_e_pos().$bayhub->e_serial()β returnsns_e_serial().$bayhub->e_swver()β returnsns_e_swver().$bayhub->e_type()β returnsns_e_type().$bayhub->e_vendor()β returnsns_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.
And that's the whole page, bestie, you ate it. π
β¨ This lil masterpiece is living in perl v5.40.1, dated 2026-02-28, and it's gonna carry you through every Bay hub in your life. Go read it again if you need to, no shame in it, we've all been there. π«Άππ¦
π¦ where this page comes from
- ubuntu stonking: libsnmp-info-perl 3.975000-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms