Sunday, August 6, 2017

set static IP from command line gui Armbian / Debian 7 Orange Pi Zero 512


Recently I acquired a couple of OrangePi Zero 512's, with a network phy, and dual usb.  The latter is not terribly useful because w/o modification to physically drive in more +5 there isn't much 5 v to spare on either port of this board.  It is powered by a USB OTG micro port, which at most will draw 2.1A.

The armbian comes up with the root password set to "1234" and a script to force changing the password at first login.  One can log in to either the serial port (presented on the OTG as a USB serial), you may wire in a serial port, or ssh into the unit once you find it.

The latter is a bit of a problem, however.  For whatever reason the current armbian is set up to assign a random crap MAC address to the board.  There is no retention of a MAC in any storage, so that isn't a huge problem.  However, the MAC must be being set early enough that there isn't any of the static storage of the root available, so no static address.

Against my desire and policy here, I decided to set a static IP to the board, which skirts the need for a static MAC.  I usually like to have everything DHCP so I can change any device by the dhcp server, but static IP will work to get round this.

to set the IP, one has to edit the ip with the network manager.  the network manager may be edited with the nmgui command.  Edit the ip from automatic to manual, and set up the IP.

The only caveat that needs to be recalled is that there is no netmask.  The gui uses the format of
192.168.0.1/24 or such to set the netmask.  Kind of against command line and file standards, but that took some hunting for when the setup failed for me a few times.  And there is no netmask prompt.

One can either reboot the system, or restart the network manager.  Seems like on a systemd type system this does that task

sudo service network-manager restart

********* on the topic of armbian  ****

this method didn't work for the orangepi to change the configuration.  Should work on some form of debian, but somewhere else must be some network code setup on armbian that ignores the settings in the /etc/networking directory configuration files.  Has no effect at all.

https://kuziel.nz/notes/2017/01/orange-pi-zero-armbian-setup.html



No comments:

Post a Comment