This is a resource for assigning a static IP address in Linux with the goal of accessing Bandura TIG's admin interface during the initial startup.


This document assumes that you have some basic understanding of Linux, including terminal, it's permissions and a GNU text editor, I will be using nano. In the following commands "XXXX" should be replaced with the name of the network device identified as your active network connection.

 

For Fedora and Red Hat based Linux:

ifconfig


Find in this list your active network device name and use it in place of XXXX, an example is 'enp0s3'


cp /etc/sysconfig/network-scripts/ifcfg-XXXX /etc/sysconfig/network-scripts/ifcfg-XXXX.bkp
nano /etc/sysconfig/network-scripts/ifcfg-XXXX


Find and change the following lines:


BOOTPROTO=static
IPADDR0="192.168.1.2"
PREFIX0="24"
GATEWAY0=""
DNS1=""


Save, and restart your system's networking:


systemctl restart network



Once you have setup your Bandura TIG to run on your existing network the following commands will restore your computer networking settings.


cp /etc/sysconfig/network-scripts/ifcfg-XXXX.bkp /etc/sysconfig/network-scripts/ifcfg-XXXX
systemctl restart network
rm /etc/sysconfig/network-scripts/ifcfg-XXXX.bkp


For Debian based Linux:


Identify your active network device name and use it in place of XXXX, in this example 'wlp6s0'


ifconfig



cp /etc/network/interfaces /etc/network/interfaces.bkp
nano /etc/network/interfaces


Edit or add the following:


auto XXXX
iface XXXX inet static
          address 192.168.1.2
          netmask 255.255.255.0


Save, and restart your system's networking:


systemctl restart ifup@XXXX


Once you have setup your Bandura TIG to run on your existing network the following commands will restore your computer networking settings.


cp /etc/network/interfaces.bkp /etc/network/interfaces
systemctl restart ifup@XXXX
rm /etc/network/interfaces.bkp



For UNIX and FreeBSD:


ifconfig


Identify your active network device name and use it in place of XXXX. In this example, 'em2' 



cp /etc/rc.conf /etc/rc.conf.bkp
nano /etc/rc.conf


Find and edit the following lines:


ifconfig_XXXX="inet 192.168.1.2 netmask 255.255.255.0"
defaultrouter=""


Save, and restart your system's networking:


/etc/rc.d/netif restart && /etc/rc.d/routing restart


Once you have setup your Bandura TIG to run on your existing network the following commands will restore your computer networking settings.


cp /etc/rc.conf.bkp /etc/rc.conf
/etc/rc.d/netif restart && /etc/rc.d/routing restart
rm /etc/rc.conf.bkp