Adding Second NIC to A3


Problem: You need to add additional NICs or static routes to your A3 appliance

Solution: Configure the Linux system from the cli as shown


Introduction:

The A3 virtual appliance runs a variant of Alpine Linux, known for its lightweight and security focus. To manage your A3 you can configure any aspect of the operating system as you would any Linux system. Therefore, adding extra network cards (NICs) to the A3 appliance can be done simply from the command line.

Please note- by default the A3 appliance allows you to "su" to root for any administrative tasks.


To start, login to your A3 console with the "alike" user (default password "alike"), then access the command line with the console menu option #4.

Then, add the 2nd NIC to the A3 VM via your hypervisor. Then you will need to configure the networking by editing the following file (you can use nano, vi, or your favorite text editor):

nano /etc/network/interfaces


For DHCP addressing, add the following lines to your config:

auto eth1
iface eth1 inet dhcp


Alternatively, for static IPs

auto eth1
iface eth1 inet static
  address x.x.x.x
  netmask 255.255.255.0
  gateway <gateway_address>


When finished, you can either reboot the A3, or restart the networking stack with the following command:

rc-service networking restart


When restarted, you can confirm the networking from the command line with the following command:


ip addr show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
  link/ether 2c:92:85:95:35:dd brd ff:ff:ff:ff:ff:ff
  inet 192.168.2.185/16 scope global eth1
    valid_lft forever preferred_lft forever

Add a static route (Optional)

If you need to set a static route for your 2nd NIC, you can do so by simply editing the following file:

nano /etc/network/routes


Add your require routing details, and save the file. The syntax is "destination_network via gateway_address"

Example:

172.16.4.0/24 via 10.1.1.1

Please note- adding static routes will also require the networking service to be restarted (or the A3 can be rebooted) to take affect.



For more details, please refer to the following Alpine wiki:​

https://wiki.alpinelinux.org/wiki/Configure_Networking