I have a Cisco 6509 switch that I'm monitoring with SNMP from a CentOS5 machine. SNMP polls are the only access I have to this device, we are not allowed to log on via telnet. How can I find out which port on the switch a particular server is connected to? I was hoping that this is somehow possible using the mac address and the data gathered from snmpwalk/snmpget requests but I'm not having much luck. How would you tackle this problem?
Quoting Sean Carolan <scarolan at gmail.com>:> I have a Cisco 6509 switch that I'm monitoring with SNMP from a > CentOS5 machine. SNMP polls are the only access I have to this > device, we are not allowed to log on via telnet. > > How can I find out which port on the switch a particular server is > connected to? I was hoping that this is somehow possible using the > mac address and the data gathered from snmpwalk/snmpget requests but > I'm not having much luck. How would you tackle this problem?This might help: <http://www.linuxdynasty.org/howto-find-the-port-on-a-switch-that-a-host-belongs-to-the-easy-way-part-1.html>
David.Mackintosh at xdroop.com
2009-Apr-21 17:15 UTC
[CentOS] One for the Cisco experts...
On Tue, Apr 21, 2009 at 11:44:47AM -0500, Sean Carolan wrote:> How can I find out which port on the switch a particular server is > connected to? I was hoping that this is somehow possible using the > mac address and the data gathered from snmpwalk/snmpget requests but > I'm not having much luck. How would you tackle this problem?My notes: http://wiki.xdroop.com/space/snmp/Switching+Tables Basically there are at least two places in snmp where this might be stored. The most obvious is the classic MIB-II Bridge. The wrinkle with this MIB is that some switches maintain separate tables for each VLAN, which means in order to query the switch properly, you have to query the MIB for each VLAN. Newer switches populate the Q-Bridge-MIB instead of or as well as the MIB-II Bridge. This table contains the VLAN that the target MAC is reachable through, which is useful since you don't have to know it ahead of time. We have a six- or seven- year old cisco 3750 which is running an IOS which doesn't have the newer MIB; for this switch, we must explicitly query the MIB-II Bridge for each VLAN. I would hope that newer relesaes of IOS wouldn't have this limitation. -- /\oo/\ / /()\ \ David Mackintosh | dave at xdroop.com | http://www.xdroop.com -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://lists.centos.org/pipermail/centos/attachments/20090421/7e7a1fa8/attachment-0002.sig>
Sean Carolan wrote:> I have a Cisco 6509 switch that I'm monitoring with SNMP from a > CentOS5 machine. SNMP polls are the only access I have to this > device, we are not allowed to log on via telnet. > > How can I find out which port on the switch a particular server is > connected to? I was hoping that this is somehow possible using the > mac address and the data gathered from snmpwalk/snmpget requests but > I'm not having much luck. How would you tackle this problem?Uncomment the Linkd service in service-configuration.xml. Then, at least if the connected device is also monitored the 'View Node Link Detailed Info' link on the node screen will show the connected device. -- Les Mikesell lesmikesell at gmail.com
> We have a six- or seven- year old cisco 3750 which is running an IOS > which doesn't have the newer MIB; for this switch, we must explicitly > query the MIB-II Bridge for each VLAN. ?I would hope that newer > relesaes of IOS wouldn't have this limitation.This is exactly what I was missing. Thank you, I am now able to track down which port each device is on.
> My notes: http://wiki.xdroop.com/space/snmp/Switching+Tables >Hi Dave, so using the example from your site above I tested a mac address against one of our switches: [scarolan at host:~]$ snmpwalk -v1 -c public at 200 10.100.3.6 .1.3.6.1.2.1.17.4.3 | grep `hexmac2decoid 00:B0:D0:E1:BF:52` SNMPv2-SMI::mib-2.17.4.3.1.1.0.176.208.225.191.82 = Hex-STRING: 00 B0 D0 E1 BF 52 SNMPv2-SMI::mib-2.17.4.3.1.2.0.176.208.225.191.82 = INTEGER: 389 SNMPv2-SMI::mib-2.17.4.3.1.3.0.176.208.225.191.82 = INTEGER: 3 Does this mean that the machine is plugged into port 389? I didn't think there were 389 ports on the switch.
> How can I find out which port on the switch a particular server is > connected to? I was hoping that this is somehow possible using the > mac address and the data gathered from snmpwalk/snmpget requests but > I'm not having much luck. How would you tackle this problem? >Take a look at Netdisco. I seem to remember it's a little tricky to set up on CentOS but I wouldn't live without it now. http://www.netdisco.org/ Dan
Antonio da Silva Martins Junior
2009-Apr-24 16:43 UTC
[CentOS] One for the Cisco experts...
----- "Daniel Bird" <dbird at sgul.ac.uk> escreveu:> > How can I find out which port on the switch a particular server is > > connected to? I was hoping that this is somehow possible using the > > mac address and the data gathered from snmpwalk/snmpget requests > but > > I'm not having much luck. How would you tackle this problem? > > > Take a look at Netdisco. I seem to remember it's a little tricky to > set > up on CentOS but I wouldn't live without it now. > > http://www.netdisco.org/ >Hi List, Well after following the "little tricky" :D install scripts on this address: http://www.auburn.edu/~gouldwp/netdisco/ I had this error: "failed to resolve handler `netdisco::Mason': Can't locate netdisco/Mason.pm in @INC" on my httpd error_log file. Anyone had sucess on made netdisco running ? My problem (apparently) was only on the WebCli. And after I had the work to put it all together I was hopping I can see their face :D On the other hand, I will try OpenNMS and ZenoOS ASAP :D Thanks in advance, Antonio. -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - Support Analist | "Only The Shadow Knows | | Universidade Estadual de Maring?? - Brasil| what evil lurks in the | | NPD - N??cleo de Processamento de Dados | Heart of Men!" | | E-Mail: asmartins at uem.br / shadow at uem.br | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ "Real Programmers don???t need comments ??? the code is obvious." -- Esta mensagem foi verificada pelo sistema de antiv?rus e acredita-se estar livre de perigo.
Antonio da Silva Martins Junior
2009-Apr-24 17:49 UTC
[CentOS] One for the Cisco experts...
----- "Antonio da Silva Martins Junior" <asmartins at uem.br> escreveu:> ----- "Daniel Bird" <dbird at sgul.ac.uk> escreveu: > > > > How can I find out which port on the switch a particular server > is > > > connected to? I was hoping that this is somehow possible using > the > > > mac address and the data gathered from snmpwalk/snmpget requests > > but > > > I'm not having much luck. How would you tackle this problem? > > > > > Take a look at Netdisco. I seem to remember it's a little tricky to > > set > > up on CentOS but I wouldn't live without it now. > > > > http://www.netdisco.org/ > > > Well after following the "little tricky" :D install scripts on > this address: http://www.auburn.edu/~gouldwp/netdisco/ > > I had this error: "failed to resolve handler `netdisco::Mason': > Can't locate netdisco/Mason.pm in @INC" > on my httpd error_log file. Anyone had sucess on made netdisco running? >Hi List, Well nothing better than post an email to the list to find the solution: The install script I was using (following) from the site above, put two include lines (from netdisco_apache.conf and netdisco_apache_dir.conf) on the end of "/etc/httpd/conf/httpd.conf". But it generates some errors on the httpd programa, and I moved them to links on "/etc/httpd/conf.d" to the netdisco config files. The problem was "netdisco*" was load before "perl*" and then the errors. Quick solution: rename "netdisco*" to "zz_netdisco*", now the load order are OK and the WebCli are running. Thanks for the help, Antonio. -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Antonio S. Martins Jr. - Support Analist | "Only The Shadow Knows | | Universidade Estadual de Maring?? - Brasil| what evil lurks in the | | NPD - N??cleo de Processamento de Dados | Heart of Men!" | | E-Mail: asmartins at uem.br / shadow at uem.br | !!! Linux User: 52392 !!! | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ "Real Programmers don???t need comments ??? the code is obvious." -- Esta mensagem foi verificada pelo sistema de antiv?rus e acredita-se estar livre de perigo.
Maybe Matching Threads
- Socomec ITYS 3000 + Netvision upsmon output
- Socomec ITYS 3000 + Netvision upsmon output
- Tripplite UPS (SU10KRT3/1X) through snmp-ups (nut 2.6.5)
- Tripplite UPS (SU10KRT3/1X) through snmp-ups (nut 2.6.5)
- Issue with On Line Status (APC MGE Galaxy 5500 + AP9635CH)