3 Replies Latest reply on May 8, 2015 10:03 AM by praseodymium

    DHCP ?

    Bejron Lurker



      I have tried launching Photon on a network witthout DHCP and setting the ip, gw and everything via ifconfig but no luck.

      Any advice to running Photon with a static IP set from inside ?

        • 1. Re: DHCP ?
          caddo Hot Shot

          You need to use the iproute2 commands and ifconfig commands are deprecated.


          Try this:

          ip addr flush dev eth0     # remove running ip config

          ip addr add xxx.xxx.xxx.xxx/xx dev eth0     # set ip for dev eth0

          ip addr show

          ip route add default via xxx.xxx.xxx.xxx dev eth0      # set default gateway


          It should work but i don't know how to make this survive a reboot, didn't have time to play with config files yet.

          • 2. Re: DHCP ?
            Bejron Lurker

            That worked liked a charm. Thank you, now we just have to figure out to make it persistent..

            • 3. Re: DHCP ?
              praseodymium Novice

              Remove /etc/systemd/network/10-dhcp-eth0.network and create a new file /etc/systemd/network/static.network with the following contents:











              Then execute systemctl restart systemd-networkd.