How to set a static IP
The Ouster lidar sensor is not automatically configured with a static IP address. This article will show you how to set a static IP to a sensor so that you can access the sensor over the same IP address between power cycles. All HTTP commands listed here are found in our sensor documentation and user guides https://ouster.com/resources/.
Setting a static IP on your Ouster sensor
Connect to your sensor over one of its other addresses – IPv4 link-local, IPv6, an address given from a DHCP server, or its hostname. (Learn more networking tips here.) Let’s call this address
x.x.x.x/24
, assuming it’s on the/24
subnet.Use the
PUT system/network/ipv4/override
API to give your sensor a new static IP address.Using the sensor hostname:
The curl command to assign a static IP of
y.y.y.y
to your sensor with hostnameos-991900123456.local
is:curl -i -X PUT http://os-991900123456.local/api/v1/system/network/ipv4/override -H 'Content-Type: application/json' --data-raw '"y.y.y.y/24"'
Using the IPv4 sensor address:
The curl command to assign a static IP of
y.y.y.y
to your sensor currently atx.x.x.x/24
is:curl -i -X PUT http://x.x.x.x/api/v1/system/network/ipv4/override -H 'Content-Type: application/json' --data-raw '"y.y.y.y/24"'
Using the IPv6 sensor address:
The curl command to assign a static IP of
y.y.y.y
to your sensor currently atfe80:xxxx:xxxx:xxxx:xxxx:xxxx
on a network interface namedeth0
is:curl -i -X PUT "[fe80:xxxx:xxxx:xxxx:xxxx:xxxx%eth0]/api/v1/system/network/ipv4/override" -H 'Content-Type: application/json' --data-raw '"y.y.y.y/24"'
(For more interfacing option including Python requests and HTTPIE, check out the entire HTTP API found in our sensor documentation and user guides https://ouster.com/resources/.)
Now your sensor can be found at
y.y.y.y
on the/24
(255.255.255.0
) subnet. Note that your computer must be on the same subnet to reach the sensor at they.y.y.y
address.
Removing a static IP on your Ouster sensor
Done with static IP? You can remove it through an HTTP command or by resetting the sensor configuration.
Note that you must be on the same subnet as the sensor in order for either of the IPv4 methods to work. If you are using the IPv6 method you need to make sure you have specified the correct network interface, e.g. eth0
.
Use the
DELETE system/network/ipv4/override
API to remove the sensor’s static IP address.Using the sensor hostname:
The curl command to delete the static IP of the sensor with hostname
os-991900123456.local
is:curl -i -X DELETE http://os-991900123456.local/api/v1/system/network/ipv4/override
Using the IPv4 sensor address:
The curl command to delete the static IP of the sensor with an IPv4 address of
y.y.y.y
is:curl -i -X DELETE http://y.y.y.y/api/v1/system/network/ipv4/override
Using the IPv6 sensor address:
The curl command to delete the static IP of the sensor with IPv6 address
fe80:xxxx:xxxx:xxxx:xxxx:xxxx
on the network interface namedeth0
is:curl -i -X DELETE "[fe80:xxxx:xxxx:xxxx:xxxx:xxxx%eth0]/api/v1/system/network/ipv4/override”
If you can navigate to your sensor homepage at
y.y.y.y
or the sensor hostnameos-991900123456.local
in your browser, you can click the top right button to Reset Configuration which will remove the static IP as well.
Discovering the static IP on your Ouster sensor
Oh no! Did you forget the static IP address of your sensor?
Open WireShark and filter for ARP messages on the interface that the sensor is connected to. In the example below, the sensor static IP address is
169.254.128.114
.
Note that in order to communicate with the sensor, your computer must be on the same subnet as the sensor. Commonly, a /24
(255.255.255.0
) or a /16
(255.255.0.0
) subnet are used.