Bridged Networking / Virtual NIC

Introduction

Bridged networking allows you to attach an additional virtual network interface to an antlet. This virtual NIC will connect to one of the physical ethernet ports on the rear of the Antsle by way of an internal bridge. Then the antlet can be accessed directly on the local LAN.

Antsle one, Antsle one Pro, Antsle one Ultra

Ethernet port

Bridge name

Interface name

Speed

Port 0

br0

enp0s20f0

10M/100M/1G

Port 1

br1

enp0s20f1

10M/100M/1G

Port 2

br2

enp0s20f2

10M/100M/1G

Port 3

br3

enp0s20f3

10M/100M/1G

Antsle one XD, Antsle one XD Pro, Antsle one XD Ultra

Ethernet port

Bridge name

Interface name

Speed

Port 0

br0

eno1

10M/100M/1G

Port 1

br1

eno2

10M/100M/1G

Port 2

br2

eno3

1G/10G

Port 3

br3

eno4

1G/10G

Antsle one XD

Ethernet port

Bridge name

Interface name

Speed

Port 0

br0

eno3

1G/10G

Port 1

br1

eno4

1G/10G

Enable bridging

Ethernet port 0 is enabled for bridging by default. You can connect your antlets to this bridge port by configuring a 'Virtual NIC' in the antlet details page (discussed later) - with no additional configuration here.

Navigate to the 'Network' page on antMan.

br0 is enabled by default and is your access to antman and to your antlets on the 10.1.1.x network. You should leave this enabled and connected to the LAN.

Enabling an additional port is not necessary if you want your antlets bridged to the same local network as br0. When you configure a virtual NIC on an antlet you can choose this same port. Your antlets and the Antsle can co-exist on this ethernet port.

Here you can also see the IP address aquired from DHCP on the local LAN.

Enable another interface by checking its checkbox.

Click the 'Edit' button to configure DHCP or set a static address.

Important: Heed the DHCP warning about having a wired connection!

Restart the Antsle

Restart the Antsle and confirm the settings are good when it comes back up. If you cannot access antman after reboot, the Antsle will revert back to the last working configuration in {minutes}.

Configure Virtual NIC

Enter the antlet details page

Click on the antlet name in antman.

Click on the antlet name

Choose the 'Virtual Network' tab

Click 'New virtual NIC'

Choose a bridge/ethernet port

You can have multiple antlets on the same physical port. In this example I will leave it on br0. The 'Model' should be 'e1000' for Windows antlets or if the OS does not have virtio drivers.

Click 'Create virtual NIC'

Now you have an additional Virtual NIC attached to this antlet and exposed to the network of the physical ethernet port.

Stop and Start the antlet.

Check the operating system of the antlet to configure the new NIC. See Configure IP address to learn how to configure IP addresses for different operating systems.

Connect antlet directly to public internet

Antsle is designed to multiplex all your virtual servers under a single public IP address. If you have the luxury of having multiple static public IP addresses from your ISP then you can connect an antlet directly to one of those addresses.

First connect the Antsle to the the public interface provided by your ISP. This could be the modem or a router port configured for 'bridge' mode.

Then create a virtual NIC in your antlet as explained above and assigned it to the same interface that is connected to the public internet.

Configure the IP address in the antlet as described below. Be sure and configure the correct subnet mask and gateway address.

Here is an example for Debian/Ubuntu. Be sure to place the configuration for eth1, the virtual NIC, before eth0 in the configuration file

Adjust the addresses to your needs

auto eth1
iface eth1 inet static
address 70.168.1.105
netmask 255.255.255.240
gateway 70.168.1.1
auto eth0
iface eth0 inet dhcp

Configure IP Address

After adding an additional network interface to an antlet you will need to configure the IP address in the operating system of that antlet.

Debian/Ubuntu

Connect to the antlet via ssh

In this case it is best to ssh to the antlet from within antsleOS. See Log in to your antlets

ssh myantsle.local
ssh 10.1.1.x

After enabling the new virtual NIC, ssh with the -p option no longer works but now you have direct access via the new IP address assigned to the virtual NIC.

Get the interface name

To list the interfaces run:

ip addr show

Your new NIC will most likely be called [email protected]. We only need the eth1 part. eth0 should have the Antsle's internal 10.1.1.x address.

Edit configuration file

Debin and Ubuntu 16.04Open the configuration file for editing with your preferred editor. Nano, Vi... For Ubuntu 16.04 KVM or ubuntu-xenial LXC

nano /etc/network/interfaces

To configure DHCP, add the following to the top of the configuration file

auto eth1
iface eth1 inet dhcp

For a Static IP address, add the following to the top of the configuration file Adjust the addresses to your needs

auto eth1
iface eth1 inet static
address 192.168.1.105
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1

Restart network service

ifup eth1

Ubuntu 18.04 (netplan)Ubuntu 18.04 uses 'netplan' by default. Open the netplan .yaml configuration file with your preferred editor - Nano, Vi... For Ubuntu 18.04 KVM or LXC

nano /etc/netplan/50-cloud-init.yaml
or
nano /etc/netplan/10-lxc.yaml

To configure DHCP, add the interface (eth1 in this example) and enable 'dhcp' for the interface Here we are adding the 'eth1:' section

network:
version: 2
ethernets:
eth0:
dhcp4: true
eth1:
dhcp4: true

For a Static IP address, the interface section would look like this

eth1:
dhcp4: false
addresses:
- 192.168.1.33/24
gateway4: 192.168.1.1
nameservers:
addresses:
- 192.168.1.1
- 8.8.8.8

Be sure to use consistent indentation in the .yaml files Apply the changes with

netplan apply

Adjust the addresses to your needs I used the interface name 'eth1' in these examples but yours may be different. Yaml does allow items to use different syntax, e.g. 'lists' can use [192.168.1.1, 8.8.8.8].

You can verify your changes by listing the interfaces again

ip addr show

.

CentOS

Connect to the antlet via ssh

In this case it is best to ssh to the antlet from within antsleOS. See Log in to your antlets

ssh myantsle.local
ssh 10.1.1.x

After enabling the new virtual NIC, ssh with the -p option no longer works but now you have direct access via the new IP address assigned to the virtual NIC.

Get the interface name and MAC address

To list the interfaces run:

ip addr

Your new NIC will most likely be called eth1. eth0 should have the Antsle's internal 10.1.1.x address.

The MAC address is on the line that starts with link/ether Copy this address for use in the configuration file.

Configuration file

In CentOS the NIC configuration file will be stored in

/etc/sysconfig/network-scripts/

Each NIC will have its own configuration file. These files are named ifcfg-NIC_NAME You can list the configuration files with

ls -l /etc/sysconfig/network-scripts/ifcfg-*

Currently there is no configuration file for eth1. Don't worry, we will create it later.

Next, generate a uuid for the NIC

uuidgen eth1

Copy the uuid generated from this command for use in the configuration file.

Open the configuration file in your favorite editor. If the file does not exist this command will create it.

nano /etc/sysconfig/network-scripts/ifcfg-eth1

Configure static IP address Edit the NAME, UUID, HWADDR, IPADDR0, PREFIX0, GATEWAY0, and DNS1 NAME is the interface name, eth1 UUID is the generated output of uuidgen eth1 HWADDR is the MAC addres from the output of ip addr IPADDR0 is the static address you want to assign to this NIC PREFIX0 is the subnet mask number of bits (255.255.255.0 is 24 bits) GATEWAY0 is the gateway for this subnet DNS1 is your DNS server address

TYPE="Ethernet"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="eth1"
UUID="2efb5000-f491-46ad-96e3-12527942e70a"
ONBOOT="yes"
HWADDR="52:54:00:e1:5a:21"
IPADDR0="192.168.0.227"
PREFIX0="24"
GATEWAY0="192.168.0.1"
DNS1="8.8.8.8"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"

Restart network serverce

systemctl restart network

Windows

To configure IP address setting on Windows, Open Control Panel Click Network and Internet link

Click Network and Sharing Center

Click Change Adapter Settings in the left column

Rt Click the new adapter and choose Properties at the bottom of the context menu

Choose Internet Protocol Version 4 (TCP/IPv4) from the center pane. Click the Properties button.

Configure to your needs.