Score:0

DHCP Discover Packets don't reach server

au flag

I have a dumb IoT device that simply asks for a DHCP lease and gets no answer. I figured out that the request never reaches my routers DHCP server and I have no clue on why that happens. If I run a DHCP server on a PC right next to the IoT device on the same switch everything works as expected. Running a DHCP server right next to the upstream router (on a Raspi connected to the router) also shows no evidence of DHCP packets on tcpdump. Sending DHCP packets from PC to Raspi works.

IoT ----|------|            |------|
        |switch|------------|router|-----Raspi
PC  ----|------|            |------|

What's happening here? Where do the DHCP packets drop? Any idea?

Edit:

Carrying the IoT device physically and connecting it directly to the router doesn't work either. Now neither the PC nor the Raspi (and obviously the router) get any DHCP packets on tcpdump. Weird!

        |------|            |------|-----IoT
        |switch|------------|router|-----Raspi
PC  ----|------|            |------|

Edit 2: this is all on consumer hardware, no managed switches, no vlan, simple Fritzbox router with a /24 private subnet.

Edit 3: I realized the IoT service is using the MAC address 01:02:03:04:05:06 which looks like fake or might even be a multicast MAC address. Any ideas?

jabbson avatar
sb flag
Without knowing how your switch and router are configured it is difficult to tell you the exact answer. Switch could have its ports in different vlans, router could have it's ports in routed or switched mode, dhcp could be service addresses only off of one of the interfaces. You mentioned that you see no evidence of dhcp on raspi connected to the router, what if you connect raspi **instead** of the router, do you see dhcp requests then?
Hokascha avatar
au flag
Thanks @jabbson I added some info on my environment. As I can successfully send and see DHCP packets from the PC, which is on the same switch, upstream router and Raspi shouldn't see any difference...
Raf avatar
sx flag
Raf
One way to go about sniffing is to set up Internet Connection Sharing (ICS) on the PC on a second ethernet port, then check if the IoT device connected to the PC requests an IP from the PCs DHCP server.
Hokascha avatar
au flag
@Raf the PC can receive the DHCP request and answer them successfully. Looks like the Fritzbox router somehow filters the packets.
Raf avatar
sx flag
Raf
I meant that the pc with wireshark can be used as a router with ICS if it has two ethernet ports, or one ethernet port and Wi-Fi. then the device can be connected to the PC and the ICS interface can be monitored with wireshark.
Hokascha avatar
au flag
@Raf for what reason? I already know the PC can answer DHCP requests successfully. Why should it share the internet connection. No need for internet here, DHCP is purely local. The PC can receive DHCP requests when connected to the same switch.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.