/
Configuring the SmartServer IP Address Using the Console

Configuring the SmartServer IP Address Using the Console

The SmartServer IP address is typically changed using the SmartServer Configuration page Network tab. However, you can also change the SmartServer IP address by modifying the /etc/network/interfaces file for SmartServer 4.1 and prior, or /etc/network/interfaces.d/eth0 and/or /etc/network/interfaces.d/eth1 for SmartServer 4.2 and higher, and rebooting the SmartServer. 

After modifying the file(s) and rebooting the SmartServer, go to the SmartServer Configuration page Network tab and verify that all LAN or WAN ports that you are using do not show Startup Mode. If they show Startup Mode, then change the setting to the correct Static IP Address or DHCP setting and reboot the SmartServer.

If you do not know the current SmartServer IP address, then use the SmartServer console to change this file. If you do know the current SmartServer IP address, then you can use  the SmartServer console, SSH, or SFTP to modify this file.

You only need to modify the ports that you are using: LAN port (eth0) and/or WAN port (eth1). If only one port is used, then generally the LAN port is used.

For SmartServer 4.3 and higher, the configuration for eth0 and eth1 is stored in individual files found in /etc/network/interfaces.d as shown in the following example:

SmartServer 4.3 and higher

apollo@smartserver-17qea69:~$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback hotplug ip70 iface ip70 inet static pre-up ifconfig ip70 multicast address 172.24.25.128 netmask 255.255.255.0 apollo@smartserver-17qea69:~$ cat /etc/network/interfaces.d/eth0 iface eth0 inet static address 192.168.92.3 netmask 255.255.255.0 apollo@smartserver-17qea69:~$ cat /etc/network/interfaces.d/eth1 iface eth1 inet dhcp

For SmartServer 4.2, the configuration for eth0 and eth1 is stored in individual files found in /etc/network/interfaces.d as shown in the following example:

SmartServer 4.2

apollo@smartserver-17tas53:~$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback hotplug ip70 iface ip70 inet static pre-up ifconfig ip70 multicast address 172.24.25.128 netmask 255.255.255.0 apollo@smartserver-17tas53:~$ cat /etc/network/interfaces.d/eth0 iface eth0 inet dhcp apollo@smartserver-17tas53:~$ cat /etc/network/interfaces.d/eth1 iface eth1 inet dhcp

For SmartServer 4.1 and prior, refer to the following two examples:

SmartServer 4.1 and prior – example 1: using static IP address for LAN port (eth0). WAN port not used.

$ cat /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet static address 10.0.0.228 netmask 255.255.255.0 gateway 10.0.0.1 pre-up /root/.setup/ethernet/eth_mac eth0 iface eth1 inet dhcp pre-up /root/.setup/ethernet/eth_mac eth1 hotplug ip70 iface ip70 inet static pre-up ip link set name ip70 dev dummy0 pre-up ifconfig ip70 multicast address 172.24.25.128 netmask 255.255.255.0

If you are only using one Ethernet port (eth0), then add the Gateway IP address in addition to the IP address and netmask.

SmartServer 4.1 and prior – example 2: file for BACnet with using dhcp for the LAN port (eth0) and static IP address for the WAN port (eth1)

When you are using both WAN and LAN ports, do not specify the Gateway IP address for the LAN port (eth0); only one Gateway IP address is allowed and it is automatically assigned when using DHCP for the WAN (eth1).

For Console/SSH (e.g., using Putty)

To change the SmartServer IP address using console/SSH, perform the following steps:

  1. Log into the SmartServer using the apollo login.

  2. Create a backup of the /etc/network/interfaces.d/eth0 and/or /etc/network/interfaces.d/eth1 file for SmartServer 4.2 and higher, or the /etc/network/interfaces file for SmartServer 4.1 and prior.

  3. Edit the /etc/network/interfaces.d/eth0 and/or /etc/network/interfaces.d/eth1 file for SmartServer 4.2 and higher, or the /etc/network/interfaces file for SmartServer 4.1 and prior. 

  4. Copy the console commands listed in the example below to a text only editor (i.e., notepad), and then copy the commands one at a time to the SmartServer console. Use nano to edit the interfaces file.

    SmartServer 4.1 and prior example: using console/SSH to modify the interfaces file

    SmartServer 4.2 and higher example: using console/SSH to modify the interfaces file

     

  5. After the SmartServer reboots, go to the SmartServer Configuration page Network tab and verify that all LAN or WAN ports that you are using do not show Startup Mode. If they show Startup Mode, then change the setting to the correct static or DHCP setting and reboot the SmartServer.

For SFTP (e.g., using WinSCP); only if root login is allowed

  1. Log into the SmartServer as root.

  2. Create a backup of the /etc/network/interfaces.d/eth0 and/or /etc/network/interfaces.d/eth1 file for SmartServer 4.2 and higher, or the /etc/network/interfaces file for SmartServer 4.1 and prior.

  3. Edit the /etc/network/interfaces.d/eth0 and/or /etc/network/interfaces.d/eth1 file for SmartServer 4.2 and higher, or the /etc/network/interfaces file for SmartServer 4.1 and prior.

  4. Reboot the SmartServer.

  5. After the SmartServer boots up, go to the SmartServer Configuration page Network tab and verify that all LAN or WAN ports that you are using do not show Startup Mode. If they show Startup Mode, then change the setting to the correct static or DHCP setting and reboot the SmartServer.

 

Related content

Step 2 - Connect to Your SmartServer IoT
Step 2 - Connect to Your SmartServer IoT
Read with this
Configuring the SmartServer IP Address and Hostname (Release 3.4 to 4.1)
Configuring the SmartServer IP Address and Hostname (Release 3.4 to 4.1)
More like this
Using the LEDs and Buttons
Using the LEDs and Buttons
Read with this
Configuring the SmartConnect IP Address
Configuring the SmartConnect IP Address
More like this
Managing SmartServer IoT Ports and Services
Managing SmartServer IoT Ports and Services
Read with this
KB1456 - How to change SmartServer IP address using SFTP or console
KB1456 - How to change SmartServer IP address using SFTP or console
More like this