How My Printer Caused Excessive Syscalls and UDP Traffic(zinascii.com) |
How My Printer Caused Excessive Syscalls and UDP Traffic(zinascii.com) |
At work, we had a problem where a computer was spamming the network with DHCP requests. It ended up physically locking us out; the embedded system which controls the card reader and unlocks the door locked up due to the load. I had to use an alternative way to get in, isolated the maglock, and later power-cycled the embedded system.
Needless to say, we enabled storm control on the switch after that.
Not only does that help prevent stuff like this, it turns out that a lot of embedded hardware isn't that great from a network security perspective.
And even then, the storm control is useful; the same broadcast storm also made the office wireless unusable (most APs use a basic rate for broadcast and multicast).
Funny that these happened to appear on the same day :)
Apparently Canon's wireless printers are well known for doing mDNS floods:
http://digitalhome.ca/forum/showthread.php?t=148153
http://forums.anandtech.com/archive/index.php/t-2171044.html
There is a beauty in the ability to just have all of your computers, printers, and peripheral devices otherwise plug into a switch (without any additional network service equipment — no router/dns/dhcp multi-combo device added in the mix) and that everything just ends up working. Link-local addressing takes care of IPs, mDNS takes care of names, and DNS-SD through mDNS takes care of automatic service advertisement — "Hey, I'm a printer, use me if ya wanna!"
Further, failure of proper mDNS implementation in a device (perhaps resulting in malformed packets or over-zealous flooding) is just a failure of that device's design, not mDNS per se.
Having said that, still... yes, I think the home/SOHO router/switch/access-point/dns/dhcp multi-combo device should handle DNS-SD registrations and DNS, and that mDNS shouldn't be needed.
In medium/large networks (those actually managed by someone putting on an IT hat), it's perhaps not as appropriate, but still shouldn't be a problem assuming everything is subnetted with mDNS in mind. Of course, name resolution is handled by unicast DNS, and with regard to service discovery in this context, someone manages the DNS-SD records on the unicast DNS server so you don't need mDNS to be the mule for DNS-SD to ride on in those circumstances.
Are you talking about TXT records for services or something like that? I thought that most of the consumer level tools (for adding printers) were only looking for records via mDNS.
That said, in $CURRENTJOB, network printers are found via whatever the current version of NETBIOS is called - I don't think I've seen any mDNS traffic around.
Instead of hacking your /etc/hosts file, just let the VM publish relevant DNS entries using mDNS.
For example, in one network, multicast was completely disabled — no mDNS happening there — and so on our local (unicast) DNS server (BIND on a 'BSD), we added DNS-SD entries (PTR + TXT records) for printers (to a CUPS print server with Active Directory authentication) which gave all the iOS devices AirPrint capability to all the printers on the network (even AirPrint to old dot-matrix printers), entries for Apple TV/AirPlay, etc. Apple calls it "Wide-Area Bonjour" and it works with Macs and iOS devices just fine — it's Bonjour with no mDNS involved (more specifically, it's just DNS-SD with a unicast DNS server).
In a sense (and completely avoiding all of the details and particulars of the matter here, because that opens up a whole can of worms and a much longer discussion), mDNS is basically supposed to be the modern IETF Internet Standards branded replacement for the name service aspect of NetBIOS (and other local network name service protocols). See also http://lwn.net/Articles/252323/ ... Also, in a sense, Zeroconf (an umbrella term which includes IPv4 link local addressing + mDNS + DNS-SD) is replacement for SLP ... and SSDP & UPnP in a sense too (although they're not directly comparable concepts)... Read http://www.zeroconf.org/zeroconfandupnp.html for a better explanation on the UPnP side of things... (Again, using a really vague phrase "in a sense" here and glossing over the details and doing a hand-wavy gesture.) There are different matters of naming, service discovery, and higher layer protocols — and drawing lines of correlation aren't always direct nor as clear cut as some would like.
For HTTP services in a browse domain called example.com, you'd query for _http._tcp.example.com PTR records and get back a list of instance names such as HN._http._tcp.example.com. If you then wanted to connect to the "HN" HTTP service you'd then lookup the SRV and TXT records at HN._http._tcp.example.com.
For anyone interested, dns-sd.org hosts some example services — try `dig -t ptr _http._tcp.dns-sd.org` and go from there.