# Set static IP on ModalAI M500

Source: https://forum.modalai.com/topic/676/set-static-ip-on-modalai-m500
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2022-01-21 15:50:00 UTC by vmassague
Replies: 4 · Views: 1139

## vmassague · 2022-01-21 15:50:00 UTC

Hi!
I'm trying to set a static IP for a WiFi interface on my ModalAI M500. To do that I've been checking the forum because I didn't know how to start. 
I have experience doing this in other OS like Ubuntu 20.04, in which I just have to create a new interface using nmtui, setting the static and the gateway. However, to do that in yocto I'm facing some issues.
I tried to do it like in this [post](https://forum.modalai.com/topic/377/setting-up-network-interfaces/2):
1. I have voxl-wifi set  on station mode. Should change the mode or is it ok? It is not clear to me on the post I have been looking.
2. I have created the folder network and script interfaces in /etc because I didn't have it on my drone by default.
3. I have set up my interface like this:
```
iface wlan0 inet static
	address 10.42.0.25
	netmask 255.255.255.0
	gateway 10.42.0.1
```
4. I rebooted the drone to see the changes but wlan0 interface is not set with the static IP.

I also tried doing a ifconfig wlan0 down  and then ifconfig wlan0 up.
Maybe this is not the way to go, so I would really appreciate some advise on this. Thank you in advance!

## Reply by Eric Katzfey (ModalAI staff) · 2022-01-21 16:13:30 UTC

@vmassague You can try this: https://www.howtogeek.com/118337/stupid-geek-tricks-change-your-ip-address-from-the-command-line-in-linux/

## Reply by tom (ModalAI staff) · 2022-01-21 18:46:27 UTC

@vmassague Another thing to look at is `/etc/systemd/system/wlan_daemon.service` which is default linux service that controls WiFi. You can look there to see if anything is hardcoded WiFi-wise.

## Reply by vmassague · 2022-01-24 17:14:19 UTC (in reply to Eric Katzfey)

@Eric-Katzfey 
It works following the steps of the tutorial. Thank you!

## Reply by Tal Risin · 2022-01-24 17:47:21 UTC (in reply to Eric Katzfey)

@Eric-Katzfey said in [Set static IP on ModalAI M500](/post/3133):
> @vmassague You can try this: https://www.howtogeek.com/118337/stupid-geek-tricks-change-your-ip-address-from-the-command-line-in-linux/

Is there a way to set the static IP permanently?

I saw that in the WiFi guide you recommend reserving the IP in the WiFi router, unfortunately that's not an option for me.
