|
From: Simon H. <li...@th...> - 2016-10-03 11:51:42
|
Oliver Gorwits <ol...@cp...> wrote: > Marvellous! Could you do me a favour and send over any LLDP and SNMP > config you used (off list is fine)? OK, here goes - but I've just been through the same steps on another box and it's not working properly. These all apply to Debian Wheezy. As will probably be obvious, I'm "no expert" in most of this. Basic steps : apt-get install --no-install-recommends snmpd lldpd edit /etc/default/lldpd DAEMON_ARGS="-k -x -l -m <IP>" where <IP> is the main IP address you want to report as the device management address. This is in an HP switch environment so I'm using LLDP. restart lldpd edit /etc/snmp/snmpd.conf Under AGENT BEHAVIOUR, comment out agentAddress udp:127.0.0.1:161 and uncomment agentAddress udp:161,udp6:[::1]:161 Under ACCESS CONTROL Where it has #rocommunity secret 10.0.0.0/16 add rocommunity <your secret> <your management device IP/net> Under SYSTEM INFORMATION, change sysServices to suit the host sysServices 76 Default is 72, 74 is suitable for a host that's supporting level 2 (eg Xen host running virtual switches (aka bridges)), 76 for a device that's also doing level 3 routing https://tools.ietf.org/html/rfc3418 And if running a firewall, allow SNMP traffic in. Now, at one location this is working just fine(ish - see below on VLANs). I did have a bit of a hiccup as one of our providers is sending CDP packets up the wire, these were being passed through one HP switch and picked up by another that shouldn't have even been able to see the traffic (different VLAN) ! Disabling CDP on that latter device worked around the problem - though I think it's a problem with the first switch which is one of the "not very smart" models. Now, here's where it gets interesting ! This morning I tried to do the same steps on a box I have at another site, linked via a VPN - changing the lldpd config to do CDP instead of LLDP. I deleted the Pseudo device in NetDisco and tried to discover this device. The device is found, but not it's interfaces or any neighbour information. If I do "netdisco-do discover -d <IP> -DI", on a working device I see entries like this : debug [a.a.a.a] device - aliased as *.*.*.* ... debug resolving 12 aliases with max 50 outstanding requests ... debug [a.a.a.a] interfaces - removed 8 interfaces debug [a.a.a.a] interfaces - added 8 new interfaces ... <some LLDP stuff> and a few "SNMP::Info::_validate_autoload_method(hasCDP) Unable to resolve method." On the device that doesn't discover properly, I see entries like : debug resolving 0 aliases with max 50 outstanding requests ... SNMP::Info::_validate_autoload_method(hasCDP) Unable to resolve method. ... debug [b.b.b.b] neigh - CDP/LLDP not enabled! As a test, I enabled LLDP on the switch this remote system is connected to, and get the same results "debug [b.b.b.b] neigh - CDP/LLDP not enabled!" lldpctl shows the switch from the Linux box, and show lldp neighbors on the switch shows the Linux box. As an aside ... On checking another device that uses VLANs, I see that has "SNMP::Info::_validate_autoload_method(i_vlan_type) Unable to resolve method." in the discover debug as well. To add, this seems to be the case for all 4 devices I've looked at today. Finally, I'll add that some obvious differences between the systems are : amd64 vs i686, kernel 2.6.32 vs 3.2.0, using backports or not (snmpd and lldpd both same versions). To summarise : Router 1: 2.6.32-5-xen-686 running as PV guest on Xen, no VLANs present, aliases detected, interfaces detected, neighbours detected Router 2: 3.2.0-4-amd64 bare metal, VLANs not detected, aliases not detected, interfaces not detected, neighbours not detected Host 1: 3.2.0-4-amd64, VLANs not detected, aliases interfaces and neighbours detected Host 2 (hosts router 1): 3.2.0-4-686-pae, VLANs not detected, aliases interfaces and neighbours detected |