Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The situation:

Our company is spread between two floors in a building. Every employee has a laptop (macbook Air or MacbookPro) and an iPhone. We have static DHCP mappings and DNS resolution so every mobile gets a name like employeeiphone.example.com, every macbook air gets a employeelaptop.example.com and every macbook pro gets a employeelaptop.example.com on the Ethernet interface (the wifi gets a dynamic IP from a small range dedicated for the purpose). We know each and every MAC address of phones and laptops, since we do DHCP static mapping (ISC DHCP server runs on linux). At each floor we have a Netgear stack of two switches, connected via 10GB fiber to each other. No VLANs so far. At every floor there are 4 Airport Extreme making a single SSID network with WPA2 authentication.

The request:

Our CTO wants to know who is present at which floor.

My solution (so far):

Every switch contains an table listing MAC address and originating port. On each switch stack, all the MAC addresses coming from the other floor are listed as coming on port 48 (the fiber link). So I came up with:

1) Get the table from each switch via SNMP 2) Filter out the ones associated with port 48 3) Grep dhcpd.conf, removing all entries not *laptop and not *iphone 4) Match the two lists for each switch, output in JSON or XML 5) present the results on a dashboard for all to see

I wrote it in bash with a lot of awk and sed, it kinda works but I always have for some reason stale entries in the switch lookup tables, making it unreliable; some people may have put their laptop to sleep, their iphones drop connections after a while, if not woken up and so on..I searched left and right, we are prepared to spend a little on the project too (RFIDs?), does anybody do something similar? I can provide with the script if needed (although it's really specific to our switches and naming scheme). Thanks!

p.s. perhaps is this a question for stackoverflow? please move if it so.

share|improve this question
    
Similar question: serverfault.com/questions/411689/… –  Shane Madden Sep 4 '12 at 0:22

1 Answer 1

Your CTO sounds like a world-class PHB, but that aside, if he's willing to spend the money, RFIDs would be the way to go. No problems with locating a laptop that's gone to sleep, because the RFIDs don't. And anyway, I'd point out that you're just not going to get a good, 100% reliable solution relying on WiFi with mobile devices - they do shut down things like their WiFi antenna to save power, and there's no really good way around that.

However, the problem you'll have is that if you put the RFIDs on the laptops (or do what Shane suggests) is that you're ultimately tracking the device, not the person, and people have been known to separate from their devices from time to time. It's more accurate to tag the employees than the employees' devices. This works best if everyone has a security badge they have to keep with them at all times, and you can attach the RFID to that, given that people will generally resist and resent having to carry a separate device around for ease of the CTO's employee-location efforts.

I personally think it's kind of creepy, and a dumbass way to waste to company resources on something completely trivial and irrelevant, but if the CTO really thinks it's worth devoting the time to, that's how I'd go about it. RFID tag the employee security badges, or failing that, the devices. And, I'd feel particularly brilliant if I could somehow set it to "accidentally" light up the CTO's phone at 4 in the morning, or during a board meeting, and so on.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.