-
II've recently started using TeslaUSB and really like the project! I'm trying to connect TeslaUSB to my IoT network and have set up my DHCP server to assign it a static IP address. However, I'm noticing that TeslaUSB often receives a different IP address each time it connects to the network. What’s strange is that when I log in via SSH, the welcome message shows the IP address I set in the DHCP server, but when I check the actual IP address, it’s something entirely different. Given this situation, I’m wondering how I can set a static IP address directly via SSH? I’m not sure if it’s relevant, but I’ve also enabled AP mode. I hope someone can help! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
AP mode just adds another interface (ap0) with its own IP address, and your home wifi and dhcp server aren't involved in that. Generally to set a static IP you would tell your dhcp server to use the same IP address every time for the Pi's MAC address. The important thing here is that the Pi still gets its IP address from the dhcp server, so if the Pi gets a different IP address every time, that means the dhcp server gave it a different one. This could be either because you didn't actually correctly configure the dhcp server to use a fixed address for the Pi, or the Pi is somehow using a different MAC address every time. Not sure what you mean by "set a static IP address directly via SSH". You could ssh in to the Pi and use Is there a specific reason for using a static IP? I normally just reference my devices by name. |
Beta Was this translation helpful? Give feedback.
-
I’m just guessing, since I had a similar situation: I had AP configured with same name and and IP in same subnet like device itself. Also user/pw were same. I didn’t read through completely to realize, that AP and the device itself should have at least different IP-addresses. |
Beta Was this translation helpful? Give feedback.
-
Thank you both for taking the time to respond to my question—I really appreciate it. I realize now that I wasn't entirely clear about my goal. My aim with assigning a static IP was to allow TeslaUSB to access my NAS on a different VLAN through a firewall. What I should have asked initially was which network manager TeslaUSB uses. Upon checking the diagnostics, I noticed that it appears to be using dhclient. Based on that, I added a static IP configuration in /etc/dhcp/dhclient.conf, and now it seems TeslaUSB has retained the same IP after three drives today. I also wanted to mention that I have about 150 devices on my networks, all of which receive a fixed IP address from the DHCP servers without issues. So, it's a bit strange that TeslaUSB was behaving differently. The mention of AP mode in my previous post was just to provide more context about my setup. Thanks again for your help and for the time you've taken to assist me! |
Beta Was this translation helpful? Give feedback.
Thank you both for taking the time to respond to my question—I really appreciate it. I realize now that I wasn't entirely clear about my goal. My aim with assigning a static IP was to allow TeslaUSB to access my NAS on a different VLAN through a firewall. What I should have asked initially was which network manager TeslaUSB uses.
Upon checking the diagnostics, I noticed that it appears to be using dhclient. Based on that, I added a static IP configuration in /etc/dhcp/dhclient.conf, and now it seems TeslaUSB has retained the same IP after three drives today.
I also wanted to mention that I have about 150 devices on my networks, all of which receive a fixed IP address from the DHCP servers…