Set static IP – Network configuration in PhotonOS

By default Photon OS comes with DHCP enabled, this is good enough for testing. In some case if you want to set static IP to your PhotonOS VM

To get list of interfaces


My network device name is eth0

ls /etc/systemd/network

You will get a DHCP configuration file ( in my case), take a backup of that file and create a new file

root@photon-machine [ ~ ]# vi /etc/systemd/network/


Save and restart the service systemd-networkd

systemctl restart systemd-networkd

If you are getting “Could not load configuration files: Permission denied” error change the permission of the file to 644

chmod 644 /etc/systemd/network/*

Run ip address to make sure the static address is applied

ip address

This site uses Akismet to reduce spam. Learn how your comment data is processed.