How to set the IP address on Photon OS

By default, the Photon OS comes with 2 pre configured network configuration files.

  1. eth0.network
  2. dhcp-en.network

First of all, list down the network interfaces with the command networkctl

Then, based on your network configuration you may select the relavent configuration file (Static IP – eth.network | DHCP – dhcp-en.network). You may have to access the network configuration related directory.

/etc/systemd/network

Edit the Network configuration appropriately

vi /etc/systemd/network/XXXXX.network

The changed configuration will look like this below

Save and restart the networking services

systemctl restart systemd-networkd

 

 

Author: Chathura Ariyadasa

A highly talented IT professional with extensive experience and capabilities in performing a variety of IT Security, Computer Networking and IT Help Desk duties and responsibilities in the IT Department.