Thanks Christian and Jarrod. This got me started. But I rean into an issue with snmpv3.
switchdiscovery (switchdiscovery.pm) appears to only support snmpv1. All snmpwalk commands are hard coded to -v1. The documentation mentions snmpv3 support. https://xcat-docs.readthedocs.io/en/stable/advanced/networks/switchdiscover/switch_based_switch_discovery.html?highlight=switch%20discovery here is a grep of the module: #grep snmpwalk switchdiscover.pm # snmpwalk command has to be available for snmp_scan if (-x "/usr/bin/snmpwalk" ){ send_msg($request, 0, "Discovering $device using snmpwalk for @$ranges ....."); send_msg($request, 0, "snmpwalk is not available, please install snmpwalk command first"); send_msg($request, 0, "Run snmpwalk command to get information for $ip"); return vendor info from snmpwalk command my $snmpwalk_vendor; $ccmd = "snmpwalk -Os -v1 -c $comms $ip 1.3.6.1.2.1.1.1"; send_msg($request, 1, "Could not process snmpwalk command to get sysDescr, please verify community string" ); return $snmpwalk_vendor; return $snmpwalk_vendor; return mac address from snmpwalk command my $ccmd = "snmpwalk -Os -v1 -c $community $ip 1.3.6.1.2.1.4.22.1.2 | grep $ip"; return hostname from snmpwalk command my $ccmd = "snmpwalk -Os -v1 -c $community $ip 1.3.6.1.2.1.1.5"; The switches table supports snmpversion=3, and setting the privacy and auth protocols, but not the privacy and auth keys which are required for snmp v3 privAuth. The v3 setup seems to be incomplete, and not implemented into switchdiscovery. switches.5 - xCAT 2.16.3 documentation (xcat-docs.readthedocs.io)<https://xcat-docs.readthedocs.io/en/stable/guides/admin-guides/references/man5/switches.5.html?highlight=switches> For reference, the pdu.pm has v3 support that matches the info that comes from the pdu table ... } elsif ($seclevel eq "authPriv") { $snmpcmd = "snmpwalk -v3 -u $snmpuser -a $authtype -A $authkey -l $seclevel -x $privtype -X $privkey"; -Keith ____________________ Keith Hannum keith.han...@lmco.com<mailto:keith.han...@lmco.com> From: Jarrod Johnson <jjohns...@lenovo.com> Sent: Tuesday, April 12, 2022 1:03 PM To: xCAT Users Mailing list <xcat-user@lists.sourceforge.net> Subject: EXTERNAL: Re: [xcat-user] [External] xCAT getmacs from Cisco via SNMP? The switch discovery code switches to cisco's vtp/vlan membership mibs as needed to handle various vlans when connected to a cisco From: Christian Caruthers <ccaruth...@lenovo.com<mailto:ccaruth...@lenovo.com>> Sent: Tuesday, April 12, 2022 12:49 PM To: xCAT Users Mailing list <xcat-user@lists.sourceforge.net<mailto:xcat-user@lists.sourceforge.net>> Subject: Re: [xcat-user] [External] xCAT getmacs from Cisco via SNMP? xCAT should be able to pull SNMP invo from a Cisco switch just like it would any other switch. You'll want to make sure you have SNMP configured properly in the switches table. It also might be necessary to get the switchport name correct. Sometimes, you can just use, for example "1," but I've seen cases where you need to spell out the port as the switch knows it. Like: "Ethernet1/1." You should be able to use the following snmpwalk command (with the right SNMP version settings) to see how the switch names the ports. The following works with snmpv1. snmpwalk -v 1 -c {COMMUNITY} {SWITCH_NAME} .1.3.6.1.2.1.31.1.1.1.1 Regards, Christian Caruthers Lenovo Professional Services Mobile: 757-289-9872 From: Hannum, Keith <keith.han...@lmco.com<mailto:keith.han...@lmco.com>> Sent: Tuesday, April 12, 2022 11:39 To: xcat-user@lists.sourceforge.net<mailto:xcat-user@lists.sourceforge.net> Subject: [External] [xcat-user] xCAT getmacs from Cisco via SNMP? Does xcat getmacs have a built-in way to get macs for a node from a cisco switch via snmp? Or via any other method from a cisco switch?
_______________________________________________ xCAT-user mailing list xCAT-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xcat-user