Bug Report: Ez-b In Client Mode Still Running Dhcp

 
#1

EDIT EDIT EDIT: See post 16 for explanation of the cause, and a possible solution

I have mentioned this in a few conversations about network issues, but I don't know if DJ saw it since the issues were marked a resolved before he commented, so I am opening an explicit thread for this bug report.

While troubleshooting some strange issues on my 802.11g and n network when running multiple EZ-B's (specifically, EZ-B's and the few other G or N devices I have refusing their reserved IP addresses and getting other addresses, not showing up in the DHCP client list of my router, and some strange error messages in the router log) I ran wireshark on a computer connected to my 802.11n network with a display filter looking at bootp messages then powering on EZ-B's.

The first EZ-B come up normally and connects to my network with normal messaging.

When I power up the second one, and it sends out a discover, both my router, and the first EZ-B send out an offer. The EZ-B accepts one of the offers (usually the one from the first EZ-B), and rejects the other (and the router sends out a reject and logs an error because it is seeing another DHCP server on the network).

When I power up a 3rd EZ-B, the first 2 send offers.

4th EZ-B, the first 3 send offers.

Any other device also get DHCP offers from the EZ-B's as well as the router.

Thankfully most of my network is on 802.11ac or wired and not impacted by this, but the few 802.11n devices behave very strangely when the EZ-Bs are on (losing their internet connection, or restarting their network connections).

Hopefully this will be an easy firmware fix, because it is actually fairly serious and unfortunately validates the few network administrators who have told users here that they can't put the EZ-Bs on their networks. Having more than one DHCP server on a network is a major networking policy violation.

Alan

#2

We have many ez-b's on the same network with dhcp without similar issues - including schools. Perhaps your router interface is not ideal for debugging and helping you understand how dhcp works - specifically at the broadcast level.

#3

Maybe you should run wirshark on the network and see the same thing instead of dismissing my troubleshooting. A lot of people have complained about unusual situations, particularly when using reserved IP addresses on their EZ-B's. I took the time to figure it out rather than blaming their routers. Wirshark distinctly shows that the EZ-B's are responding to DHCP requests when in client mode. They should only do this in AP mode.

Alan

#4

There's also a lot of strangeness on routers as well - the funny thing we have noticed with networking protocols is the lack of standardization between manufacturers. Remember the HP issue we had with the first bunch of EZ-B's and DHCP? That was due to the driver being used by HP not using DHCP correctly - and not following the dhcp guideline. We had to update the next release with a fix, just for HP computers because they refused to fix their mistake. It ended up costing EZ-Robot many thousands of dollars in R&D and reprogramming modules.

We follow the guideline for DHCP - and test it on our ASUS router at the office, as well as the router at each of our homes.

#5

The EZ-B's are sending DHCP offers to any device that attaches to the network. That is not a router issue other than that sometimes the router sends it's offer a few millisecond after the EZ-B's do. Another router may respond faster and therefore mask the issue, but the fact remains that the EZ-B's are sending messages that they should not be sending when in client mode.

After work tomorrow I'll charge up the batteries and duplicate it with three or four different brand routers and I can send you the capture files if that is what you need.

Alan

#6

OK, here are some screen shots of what Wireshark sees happening. I'll do one post per shot. So far, I have tested with two routers, both by TP-Link, but very different models. I can also test with several different D-Links, a Tenda, and an Actiontech, but I will need to spend some time setting them up and I think I have enough evidence here that there is an issue and it isn't with my routers. But, if you disagree, I'll do the additional tests. I'll also set up a Windows DHCP server and disable my router DHCP server, and after the first EZ-B gets an address, I'll disable the Windows one and you will see that the EZ-B is still handing out addresses.


Here is the screen shot, and I will explain what it is showing below:


User-inserted image

OK. Packet 1060 and 1213 are all the first EZ-B coming online. It successfully gets its reserved IP address, 192.168.1.4 from my router.

Packet 1961 was when I booted the second EZ-B. ou can see that in packet 1963, there is a DHCP Offer coming from 192.168.1.4 (the first EZ-B). The second EZ-B then sends a request in packet 1964 which the first EZ-B sends an ACK and the router sends a NAK. (Router log showed errors about Server ID not found and request an invalid IP. That was in response to the Offer sent from the first EZ-B and is the reason you don't see an offer from the router). This EZ-B received IP address 192.168.1.2 even though the router has that address reserved for a different EZ-B's MAC address.

The second EZ-B does not appear in the router's DHCP client list, but I can router packets to it (not shown since I am filtering on bootp).

OK, now with packet 2185 I boot up the third EZ-B and it sends a discover. The second one (192.168.1.2) sends an offer, the EZ-B sends a request, both original EZ-B's send ACKs, the 3rd EZ-B declines one of those. The router is unhappy and sends a NAK. This bounces around for a while before the EZ-B finally settles in with an address (happens to be 192.168.1.3, the next available according to whichever EZ-B won the DHCP fight, but not the address that EZ-B should have receive from my router based on its MAC reservation which was 192.168.1.2..... Obviously could not have received that because there was already one on the network.

Next post will have the screen shot from the same test but with a different router.

Alan



Packet

#7

OK. Next screenshot, description below.


User-inserted image

This one is a little simpler, I think because I only have one of the EZ-B's defined with a reserved IP in this router.

Packets 29, 32 are a normal transaction. This EZ-B does not have a reserved address in this router, so the router assigned it 192.168.1.5.

Packet 83 the second EZ-B comes online. This one also does not have a reserved IP in the router. The first EZ-B offers it an IP address which it accepts. 192.168.1.2 this all happens before the router even thinks about responding.... Again, the second EZ-B does not show in the router's client list, and in fact, the EZ-B has the IP address that is reserved for a different MAC address. However, EZ-Builder can see it.

Packet 138 the 3rd EZ-B comes online and both the first and second send offers. One of them wins and finally the router gets involved and sends a NAK because it is totally lost now that there are multiple DHCP servers on its network......

The 3rd EZ-B again get IP address 192.168.1.3 when by its router reservation it should have received 192.168.1.2.

Clearly, the EZ-B's are still running DHCP server in client mode.

I did one final test as well. I rebooted a computer on the network with 2 EZ-Bs running, and it was also assigned its IP address by the EZ-B and not the router (in fact, it again was given 192.168.1.2 rather than its reserved IP address of 192.168.1.103. It was also assigned a single DNS server of 192.168.1.1. My router specifies DNS servers in its DHCP offers of 208.67.222.222 and 208.67.220.220. I turned off the EZ-B's and restarted the NIC and the computer connected back to my network correctly.

Let me know what other tests you need to prove that you have left DHCP server running on the EZ-B's when they are in client mode.

If you need instructions on running Wireshark, contact me.

Alan

#8

thetechguru

Thank you for the detailed information.

After reading your posts I did some investigation my self as i have been having some DHCP problems with a few mobile network devices and gave up on them.

After looking at your post and doing some investigation , I see this happening when my wife reconnects her network on her moblie device.

So i changed it to not search for a wifi but hardwired the wifi name in the device and all is good now.

It never really affected my EZB 4 boards and I ran them together all the time and never though that could be an issue with the mobile device.

Thanks again.

#9

If you aren't trying to have reserved addresses, or you reserve the lowest octets in your range and start them in low to high order, you won't see a problem with the EZ-B's, but any other device on the G or N network could see an issue.

My network is a mix of G, N, and AC devices. The AC devices are fine, but the G and N ones are affected if they are started after the EZ-B's.

Alan

#10

DJ, Have you looked into this issue yet? It is still causing irritating issues if I don't start my EZ-B's in the same order every time, and I believe it is causing the issue I am helping @oldbotbuilder troubleshoot where his wife's PC disconnects from the network whenever he connects his EZ-B to his router.

Alan