snmp address ranges

Stephen Isard suovmbg02 at sneakemail.com
Mon Aug 11 12:14:32 PDT 2008


Cups snmp discovery seems to be restricted to the 255 addresses corresponding to the broadcast address on the LOCAL interface, plus other individual addresses specified in the snmp.conf file.  In particular, it doesn't seem to work for the entire range of addresses covered by the combination of broadcast address and netmask on the LOCAL interface.  Is this correct?  If so, is it because of some feature of the snmp protocol, or just because the cups implementation hasn't taken the netmask into account?

I'm in a department with a network whose ip addresses are spread over the ranges abc.def.8.xxx and abc.def.9.xxx.  My machine (running Centos 5 and cups 1.2.4-11.18) is abc.def.8.27 and dhcp assigns it a broadcast address of abc.def.9.255 and netmask 255.255.254.0.  The printers I want to use have addresses in the abc.def.8.xxx range and cups snmp discovery doesn't find them with "Address @LOCAL" in the snmp.conf file.  If I run /usr/lib/cups/backend/snmp without arguments from the command line, it says "Sending 46 bytes to abc.def.9.255" (presumably because that's the broadcast address) and doesn't find the printers.  If I give it the address abc.def.8.123, where one of the printers is, it sends to that address and eventually comes back with 'network socket://abc.def.8.123 "HP LaserJet 4050 Series " "HP LaserJet 4050 Series  abc.def.8.123'.  However, I don't see any way of getting it to tell me about what printers are in the abc.def.8.xxx range, without specifying all 255 addresses by hand.

This doesn't actually matter in my home department, where I can discover the addresses of printers by asking computer support and type them into the cups web interface for myself, but if my department is set up this way, there seems a fair chance that I'll hit the same problem when I travel and connect to other people's networks, where it would be nice to have cups discover the local printers on its own.  So is there any way of getting snmp discovery to check all of the addresses specified by the combination of broadcast address and netmask on the LOCAL interface?

Thanks.





More information about the cups mailing list