I’ve had my rogue dhcp detector script running for a while. It’s been pretty handy. However, every now and then it would detect a rogue dhcp server which would disappear again before I could track it down. I could tell it was in our building from mac address tables on the switches and it appeared to be on wifi. Strangely the response was coming from an Apple mac address with an IP of 0.0.0.0. I checked a couple of nearby iBooks but they had very different mac addresses.
This evening, before I left work, I got another email suggesting a rogue dhcp server had been detected. I’d just put my iPhone down. Ooh! That would have an Apple mac address. Surely not the iPhone? Yes indeed, my own phone has been sending me on wild goose chases.
Playing around now at home, it’s completely reproducible. I can run tcpdump on both the phone and my laptop (both on wifi). When I tell the laptop to renew its dhcp lease, I always see two replies from my wap’s dhcp server and, strangely, two from my iPhone. This is the tcpdump output:
22:01:34.195127 00:14:7f:15:2a:48 > 00:16:6f:7c:25:8a, ethertype IPv4 (0x0800), length 321: 192.168.1.254.67 > 192.168.1.70.68: BOOTP/DHCP, Reply, length 279
22:01:34.207787 00:14:7f:15:2a:48 > 00:16:6f:7c:25:8a, ethertype IPv4 (0x0800), length 321: 192.168.1.254.67 > 192.168.1.70.68: BOOTP/DHCP, Reply, length 279
22:01:34.551867 00:21:e9:23:0b:53 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 0.0.0.0.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 548
22:01:34.557164 00:21:e9:23:0b:53 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 0.0.0.0.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 548
In fairness, it doesn’t appear to do much harm that I can see, but I’d love to understand a little better what’s going on here.
This is the full packet from my own dhcp server:
22:01:34.207792 00:14:7f:15:2a:48 > 00:16:6f:7c:25:8a, ethertype IPv4 (0x0800), length 321: 192.168.1.254.67 > 192.168.1.70.68: BOOTP/DHCP, Reply, length 279
0x0000: 0016 6f7c 258a 0014 7f15 2a48 0800 4500
0x0010: 0133 12e8 0000 4011 e23d c0a8 01fe c0a8
0x0020: 0146 0043 0044 011f 91fa 0201 0600 a51d
0x0030: 0725 0000 0000 0000 0000 c0a8 0146 0000
0x0040: 0000 c0a8 01fe 0016 6f7c 258a 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000
0x0100: 0000 0000 0000 0000 0000 0000 0000 0000
0x0110: 0000 0000 0000 6382 5363 3501 0536 04c0
0x0120: a801 fe33 0400 0151 8001 04ff ffff 000f
0x0130: 036c 616e 0604 c0a8 01fe 0304 c0a8 01fe
0x0140: ff
This is the one that comes from the iPhone:
22:01:34.557171 00:21:e9:23:0b:53 > ff:ff:ff:ff:ff:ff, ethertype IPv4 (0x0800), length 590: 0.0.0.0.67 > 255.255.255.255.68: BOOTP/DHCP, Reply, length 548
0x0000: ffff ffff ffff 0021 e923 0b53 0800 4500
0x0010: 0240 0041 4000 2e11 4a6d 0000 0000 ffff
0x0020: ffff 0043 0044 022c 4c7a 0201 0600 a51d
0x0030: 0725 0000 0000 0000 0000 0000 0000 0000
0x0040: 0000 0000 0000 0016 6f7c 258a 0000 0000
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000
0x0060: 0000 0000 0000 0000 0000 0000 0000 0000
0x0070: 0000 0000 0000 0000 0000 0000 0000 0000
0x0080: 0000 0000 0000 0000 0000 0000 0000 0000
0x0090: 0000 0000 0000 0000 0000 0000 0000 0000
0x00a0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00b0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00c0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00d0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00e0: 0000 0000 0000 0000 0000 0000 0000 0000
0x00f0: 0000 0000 0000 0000 0000 0000 0000 0000
0x0100: 0000 0000 0000 0000 0000 0000 0000 0000
0x0110: 0000 0000 0000 6382 5363 3501 0636 04a9
0x0120: fe6f 6fff 0000 0000 0000 0000 0000 0000
0x0130: 0000 0000 0000 0000 0000 0000 0000 0000
0x0140: 0000 0000 0000 0000 0000 0000 0000 0000
0x0150: 0000 0000 0000 0000 0000 0000 0000 0000
0x0160: 0000 0000 0000 0000 0000 0000 0000 0000
0x0170: 0000 0000 0000 0000 0000 0000 0000 0000
0x0180: 0000 0000 0000 0000 0000 0000 0000 0000
0x0190: 0000 0000 0000 0000 0000 0000 0000 0000
0x01a0: 0000 0000 0000 0000 0000 0000 0000 0000
0x01b0: 0000 0000 0000 0000 0000 0000 0000 0000
0x01c0: 0000 0000 0000 0000 0000 0000 0000 0000
0x01d0: 0000 0000 0000 0000 0000 0000 0000 0000
0x01e0: 0000 0000 0000 0000 0000 0000 0000 0000
0x01f0: 0000 0000 0000 0000 0000 0000 0000 0000
0x0200: 0000 0000 0000 0000 0000 0000 0000 0000
0x0210: 0000 0000 0000 0000 0000 0000 0000 0000
0x0220: 0000 0000 0000 0000 0000 0000 0000 0000
0x0230: 0000 0000 0000 0000 0000 0000 0000 0000
0x0240: 0000 0000 0000 0000 0000 0000 0000
Is this some sort of peer-to-peer ip address agreement that kicks in when there’s no dhcp server?
Answers on a postcard, or preferably, in the box below.