Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Wi-Fi DHCP Issue

karbomusic

Member
Aug 23, 2020
110
90
Charlotte NC,
Picked my M3 up yesterday Yaaaayyyy! However... The software seems a little under-baked/buggy with Wi-Fi as mine refused to connect and either says no internet or can't get an IP address but that's bogus based on my testing. I finally broke down and took a network capture from my DHCP server today.

It's handing out an IP to the M3 just fine, then a few seconds later the Tesla does a Release/Renew all over again, it constantly does this while the car is awake. If you are familiar with networking you can see this behavior below, where I can actually ping my car for the few seconds it has the IP assigned - didn't see too much while searching around this forum. Any ideas? ...since I've mostly ruled out my network other than the M3 being potentially as I said, not that robust with negotiating its IP config - I also gave the M3 a DHCP reservation to make things simpler to no avail...

x09gr4I.png
 

jjrandorin

Moderator, Model 3, Tesla Energy Forums
Nov 28, 2018
8,232
9,083
Riverside Co. CA
I use 2.4 g connection to my wireless network instead of 5 ghz, even though it connects on the 5ghz connection. I had more problems with it on 5ghz. I also use WPA2 with a pre shared key, and no mac filtering.

The car doesnt stay connected at all times, so if you are expecting it to stay connected it doesnt. Never dug into it because all I wanted it online for was getting its updates on my wifi, and it does that fine.
 

dmurphy

Woof.
Dec 7, 2018
3,478
4,687
New Jersey - Morris County
Picked my M3 up yesterday Yaaaayyyy! However... The software seems a little under-baked/buggy with Wi-Fi as mine refused to connect and either says no internet or can't get an IP address but that's bogus based on my testing. I finally broke down and took a network capture from my DHCP server today.

It's handing out an IP to the M3 just fine, then a few seconds later the Tesla does a Release/Renew all over again, it constantly does this while the car is awake. If you are familiar with networking you can see this behavior below, where I can actually ping my car for the few seconds it has the IP assigned - didn't see too much while searching around this forum. Any ideas? ...since I've mostly ruled out my network other than the M3 being potentially as I said, not that robust with negotiating its IP config - I also gave the M3 a DHCP reservation to make things simpler to no avail...

Interesting - what are you using for access points? I wonder if it's re-requesting a DHCP address if the connection drops? That's bizarre behavior.

And don't get me started on Tesla's IP stack... they use underscores in the car's hostname. Not RFC 1035 compliant!
 
  • Informative
Reactions: Phlier

karbomusic

Member
Aug 23, 2020
110
90
Charlotte NC,
Interesting - what are you using for access points? I wonder if it's re-requesting a DHCP address if the connection drops? That's bizarre behavior.

And don't get me started on Tesla's IP stack... they use underscores in the car's hostname. Not RFC 1035 compliant!

All I could think of is similar, maybe it's too aggressive/sensitive with the connection health - What I can't see is what it tries to do once it gets the IP, my guess is it makes some HTTP request that errors out and tries a release/renew to fix it - I don't know what that would be as it certainly has access to the net at that moment unless it does something silly. Oddly enough I have a Raspberry Pi sitting 6 feet from my M3 and it's been happily connected to the same access point since 2016.

The access point is a Netgear Nighthawk X6 R8000 - DHCP is coming from a VM being hosted on my server. I have had some similar issues in the past, usually the secondary AP between router/DHCP server being a little wiggy but that's usually that AP refusing to pass packets which a reboot always fixes - this doesn't seem to be that. It happily gives the M3 an IP, the Tesla actually uses it for a few seconds (aka successful ping).

I will try a different Wi-Fi access point when I get a chance but I'd really hate put an AP in my garage just to handle this because I'd be just creating more wireless noise to kill a gnat with a sledgehammer.
 
Last edited:

karbomusic

Member
Aug 23, 2020
110
90
Charlotte NC,
OK, it's been up for the last 45 minutes. Here's what I did...

Knowing it is having issues with the DHCP response in some capacity, I noticed in the network trace that I had quite a few more scope options in the response than most simple setups would normally have. I was curious if Tesla's network stack could choke on all that. I trimmed them down as much as I could, tested again but no luck - constant release/renew. :(

I also realized my DHCP server is handing out my internal DNS server IP as the primary - that's generally fine, it has forwarders to the outside world. But unlike most of my other devices on my LAN, the M3 has no need at all to resolve names on my LAN, it just needs to get external. So I started thinking it might be better if it could just query my ISP DNS directly to simplify things.

Then I had the idea of placing a explicit scope directly on the DHCP reservation for the M3, where I only allowed gateway/router, it's IP and the ISP DNS server and nothing more - that simplifies the M3's DHCP response while allowing other devices on my network to continue receive the enhanced response.

It's been connected ever since and those changes fixed it.... if it doesn't break again but it certainly has never been as stably connected like it is now. This is clearly in the corner-case category but FYI if anyone else ever hits it.
 
Last edited:

dmurphy

Woof.
Dec 7, 2018
3,478
4,687
New Jersey - Morris County
OK, it's been up for the last 45 minutes. Here's what I did...

Knowing it is having issues with the DHCP response in some capacity, I noticed in the network trace that I had quite a few more scope options in the response than most simple setups would normally have. I was curious if Tesla's network stack could choke on all that. I trimmed them down as much as I could, tested again but no luck - constant release/renew. :(

I also realized my DHCP server is handing out my internal DNS server IP as the primary - that's generally fine, it has forwarders to the outside world. But unlike most of my other devices on my LAN, the M3 has no need at all to resolve names on my LAN, it just needs to get external. So I started thinking it might be better if it could just query my ISP DNS directly to simplify things.

Then I had the idea of placing a explicit scope directly on the DHCP reservation for the M3, where I only allowed gateway/router, it's IP and the ISP DNS server and nothing more - that simplifies the M3's DHCP response while allowing other devices on my network to continue receive the enhanced response.

It's been up ever since and those changes fixed it.... if it doesn't break again but it certainly has never been as stably connected like it is now. This is clearly in the corner-case category but FYI if anyone else ever hits it.

Interesting! What DHCP options do you have turned on in your general LAN scope? Curious to distill down what it's choking on. And what DHCP software are you using? Curious if we have some kind of malformed packet or munged data in the options field ...?

Great detective work!
 

karbomusic

Member
Aug 23, 2020
110
90
Charlotte NC,
Interesting! What DHCP options do you have turned on in your general LAN scope? Curious to distill down what it's choking on. And what DHCP software are you using? Curious if we have some kind of malformed packet or munged data in the options field ...?

It didn't have anything' that' unusual except I had 4 NTP servers and 4 DNS servers and 1 domain namespace. I am mildly baffled because while I was making the new scope changes, I still had Wireshark running and you can see the very last DHCP response where things began working - the only difference in that response is it has the ISP DNS IP, and non-working had my internal DNS IP HOWEVER...

Looking at the WS trace I took earlier in the day, which was also handing out the the internal DNS - the Tesla was making DNS queries like crazy and my internal DNS server was returning all the IPs like a champ, so at this point, I really have no idea. Then again, the scope reduction and the DNS change were applied at the same time, I'm going to guess the M3 got confused with the larger scope opts or the list of 4 DNS servers. I don't feel like breaking it again right now LOL.
 
  • Like
Reactions: dmurphy

Battpower

Supporting Member
Oct 10, 2019
1,968
1,942
Uk
It didn't have anything' that' unusual except I had 4 NTP servers and 4 DNS servers and 1 domain namespace. I am mildly baffled because while I was making the new scope changes, I still had Wireshark running and you can see the very last DHCP response where things began working - the only difference in that response is it has the ISP DNS IP, and non-working had my internal DNS IP HOWEVER...

Looking at the WS trace I took earlier in the day, which was also handing out the the internal DNS - the Tesla was making DNS queries like crazy and my internal DNS server was returning all the IPs like a champ, so at this point, I really have no idea. Then again, the scope reduction and the DNS change were applied at the same time, I'm going to guess the M3 got confused with the larger scope opts or the list of 4 DNS servers. I don't feel like breaking it again right now LOL.

That's all interesting stuff and certainly will be useful when tracing problems. Thanks!
 

dmurphy

Woof.
Dec 7, 2018
3,478
4,687
New Jersey - Morris County
It didn't have anything' that' unusual except I had 4 NTP servers and 4 DNS servers and 1 domain namespace. I am mildly baffled because while I was making the new scope changes, I still had Wireshark running and you can see the very last DHCP response where things began working - the only difference in that response is it has the ISP DNS IP, and non-working had my internal DNS IP HOWEVER...

Looking at the WS trace I took earlier in the day, which was also handing out the the internal DNS - the Tesla was making DNS queries like crazy and my internal DNS server was returning all the IPs like a champ, so at this point, I really have no idea. Then again, the scope reduction and the DNS change were applied at the same time, I'm going to guess the M3 got confused with the larger scope opts or the list of 4 DNS servers. I don't feel like breaking it again right now LOL.

I wonder if Tesla's network stack has some packet size limitation on the DHCP reply or some such? IOW - having all those options enabled overflows some buffer or another?

Very interesting stuff - could be neat to play games with - pad the DHCP packet with a meaningless option and see what it does... increase the DNS server list to 10, 20, etc... very interesting - you see where I'm going with that, right?
 

SigNC

Active Member
Aug 23, 2017
1,485
1,304
NC
my question is why you have what I assume are for domain controllers (DNS and NTP servers) setup at your house. Even if you are nerding out at home you only need 2.
 

karbomusic

Member
Aug 23, 2020
110
90
Charlotte NC,
my question is why you have what I assume are for domain controllers (DNS and NTP servers) setup at your house. Even if you are nerding out at home you only need 2.

I don't remember, I do an awful lot of IoT, microprocessor programming and other stuff here, the entries were leftovers from something I was testing a couple years ago best I can tell. That said, it's compliant AFAIK, and I have $99.00 printers than can handle my network better than a 60k car. ;)

I don't have DCs here I use but... I do need internal DNS and DHCP because the router doesn't have the functionality I need. The NTP servers are public external servers, I use them to keep all my machines and IoT devices that are aware in sync time wise. Providing via DHCP is much simpler than doing each manually.
 
Last edited:

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top