Network Configuration
IPv6 setup
Upon request we provide you with a /48 IPv6 prefix for all our Root Dedicated Server products. You will receive one prefix per server and be able to choose the preferred addresses out of this prefix.
Autoconfiguration neither by Stateless address autoconfiguration nor by DHCPv6 is supported in our network. Please configure the desired IPv6 address(es) manually.
The IPv6 gateway has the address of fe80::1 on each prefix. This address out of the link-local prefix allows for a setup where no address out of your prefix needs to be assigned to the network infrastructure.
Netplan
Open /etc/netplan/55-interfaces.yaml in your preferred editor:
vi /etc/netplan/55-interfaces.yaml
A complete Netplan configuration with IPv6 support could look like this:
network:
version: 2
ethernets:
eno1:
dhcp4: false
dhcp6: false
accept-ra: false
eno2:
dhcp4: false
dhcp6: false
accept-ra: false
bonds:
bond0:
addresses:
- 198.51.100.10/24
- 2001:0DB8:9999:9999::1/64
nameservers:
addresses:
- 217.150.241.5
- 217.150.242.21
- 178.209.45.7
- 2a02:419:1002::5
- 2a02:418:4005::21
- 2a02:418:4004::7
search:
- nine.ch
macaddress: 1f:2f:3f:4f:5f:6f # MAC address of the first interface (eno1)
interfaces:
- eno1
- eno2
parameters:
mode: "802.3ad"
mii-monitor-interval: "100"
lacp-rate: "fast"
transmit-hash-policy: "layer3+4"
routes:
- to: 0.0.0.0/0
via: 198.51.100.1
- to: "::/0"
via: fe80::1
Before applying the Netplan configuration, it's important to test it to ensure there are no syntax errors or network issues:
netplan try
If the test was successful and the configuration hasn't been applied yet using netplan try, please apply it now:
netplan apply
And verify with:
ip -6 addr show bond0
ifupdown (legacy)
Please use Netplan if possible. This is written only for the sake of completeness!
Open /etc/network/interfaces in your preferred editor:
vi /etc/network/interfaces
Add an IPv6 configuration like this (adjust the interface name according to your system!):
iface bond0 inet6 static
address 2001:0DB8:9999:9999::1
netmask 64
gateway fe80::1
And restart your networking:
systemctl restart networking
Configure Additional IP Address(es)
Prerequisites
- Subscription: Additional IPv4 Address
Netplan
Open /etc/netplan/55-interfaces.yaml in the editor of your choice:
vi /etc/netplan/55-interfaces.yaml
And add the additional IP address under addresses:
bonds:
bond0:
addresses:
- 198.51.100.10/24
- 198.51.100.11/24
A complete Netplan configuration could look like this:
network:
version: 2
ethernets:
eno1:
dhcp4: false
dhcp6: false
accept-ra: false
eno2:
dhcp4: false
dhcp6: false
accept-ra: false
bonds:
bond0:
addresses:
- 198.51.100.10/24
- 198.51.100.11/24
nameservers:
addresses:
- 217.150.241.5
- 217.150.242.21
- 178.209.45.7
search:
- nine.ch
macaddress: 1f:2f:3f:4f:5f:6f # MAC address of the first interface (eno1)
interfaces:
- eno1
- eno2
parameters:
mode: "802.3ad"
mii-monitor-interval: "100"
lacp-rate: "fast"
transmit-hash-policy: "layer3+4"
routes:
- to: 0.0.0.0/0
via: 198.51.100.1
Before applying the Netplan configuration, it's important to test it to ensure there are no syntax errors or network issues:
netplan try
If the test was successful and the configuration hasn't been applied yet using netplan try, please apply it now:
netplan apply
And verify it with:
ip -4 addr show bond0
For more information, see: man netplan
Ifupdown (legacy)
Please use Netplan if possible. This is provided for completeness only!
Open /etc/network/interfaces in the editor of your choice:
vi /etc/network/interfaces
Add the additional IP address(es):
auto bond0
iface bond0 inet static
hwaddress ether 1f:2f:3f:4f:5f:6f
address 198.51.100.10
netmask 255.255.255.0
gateway 198.51.100.1
bond_slaves eno1 eno2
bond_primary eno1
bond_mode 4
bond_miimon 100
bond_xmit_hash_policy layer3+4
bond_lacp_rate 1
# Add secondary IP address
up ip addr add 198.51.100.11/24 dev bond0 || true
And restart the network:
systemctl restart networking
For more information, see: man interfaces
Source-Based Routing
If your server has a second IP address from a different subnet delivered over a tagged VLAN, source-based routing ensures that traffic originating from that IP is routed through the correct gateway. Without source-based routing, all outgoing traffic uses the default gateway, causing asymmetric routing, which can lead to problems with firewalls and services.
Prerequisites
- Subscription: Additional IPv4 Address from a different subnet
- VLAN
<VLAN-ID>provisioned on the port by nine.ch support
Netplan
Open /etc/netplan/55-interfaces.yaml in your preferred editor:
vi /etc/netplan/55-interfaces.yaml
A complete Netplan configuration with source-based routing over a tagged VLAN could look like this:
network:
version: 2
ethernets:
eno1:
dhcp4: false
dhcp6: false
accept-ra: false
eno2:
dhcp4: false
dhcp6: false
accept-ra: false
bonds:
bond0:
addresses:
- 198.51.100.10/24
nameservers:
addresses:
- 217.150.241.5
- 217.150.242.21
- 178.209.45.7
search:
- nine.ch
macaddress: 1f:2f:3f:4f:5f:6f # MAC address of the first interface (eno1)
interfaces:
- eno1
- eno2
parameters:
mode: "802.3ad"
mii-monitor-interval: "100"
lacp-rate: "fast"
transmit-hash-policy: "layer3+4"
routes:
- to: 0.0.0.0/0
via: 198.51.100.1
vlans:
vlan<VLAN-ID>:
id: <VLAN-ID>
link: bond0
addresses:
- 203.0.113.10/24
routes:
- to: 203.0.113.0/24
table: 100
on-link: true
- to: 0.0.0.0/0
via: 203.0.113.1
table: 100
routing-policy:
- from: 203.0.113.10/32
table: 100
priority: 100
Before applying the Netplan configuration, it's important to test it to ensure there are no syntax errors or network issues:
netplan try
If the test was successful and the configuration hasn't been applied yet using netplan try, please apply it now:
netplan apply
And verify with:
ip rule show
ip route show table 100
For more information, see: man netplan
Ifupdown (legacy)
Please use Netplan if possible. This is provided for completeness only!
Ensure the vlan package is installed:
apt install vlan
Open /etc/network/interfaces in the editor of your choice:
vi /etc/network/interfaces
Add the VLAN interface and source-based routing rules:
auto bond0
iface bond0 inet static
hwaddress ether 1f:2f:3f:4f:5f:6f
address 198.51.100.10
netmask 255.255.255.0
gateway 198.51.100.1
bond_slaves eno1 eno2
bond_primary eno1
bond_mode 4
bond_miimon 100
bond_xmit_hash_policy layer3+4
bond_lacp_rate 1
auto bond0.<VLAN-ID>
iface bond0.<VLAN-ID> inet static
address 203.0.113.10
netmask 255.255.255.0
vlan-raw-device bond0
up ip route add 203.0.113.0/24 dev bond0.<VLAN-ID> table 100
up ip route add default via 203.0.113.1 table 100
up ip rule add from 203.0.113.10/32 table 100 priority 100
down ip rule del from 203.0.113.10/32 table 100 priority 100
down ip route del default via 203.0.113.1 table 100
down ip route del 203.0.113.0/24 dev bond0.<VLAN-ID> table 100
And restart the network:
systemctl restart networking
For more information, see: man interfaces
VLAN / Port for internal network
If you have multiple root servers in the same room and want to exchange private/sensitive traffic between them, VLAN is your option and a good alternative to a VPN.
Prerequisites
- Two or more Root Dedicated Servers
- Subscription: Port for internal networking
bond0network interface
Check if the bond0 network interface exists:
ip addr show bond0
Attention: Not all systems have bonding enabled!
In case you're missing a bond0 interface, please contact our support!
If everything is prepared, proceed with Netplan (recommended) or ifupdown (legacy).
Netplan
Open /etc/netplan/55-interfaces.yaml in your preferred editor:
vi /etc/netplan/55-interfaces.yaml
Add a VLAN definition like this:
vlans:
vlan<VLAN-ID>:
id: <VLAN-ID>
link: bond0
addresses:
- 192.0.2.10/24
A complete Netplan configuration could look like this:
network:
version: 2
ethernets:
eno1:
dhcp4: false
dhcp6: false
accept-ra: false
eno2:
dhcp4: false
dhcp6: false
accept-ra: false
bonds:
bond0:
addresses:
- 198.51.100.10/24
nameservers:
addresses:
- 217.150.241.5
- 217.150.242.21
- 178.209.45.7
search:
- nine.ch
macaddress: 1f:2f:3f:4f:5f:6f # MAC address of the first interface (eno1)
interfaces:
- eno1
- eno2
parameters:
mode: "802.3ad"
mii-monitor-interval: "100"
lacp-rate: "fast"
transmit-hash-policy: "layer3+4"
routes:
- to: 0.0.0.0/0
via: 198.51.100.1
vlans: # VLAN configuration starts here!
vlan<VLAN-ID>:
id: <VLAN-ID>
link: bond0
addresses:
- 192.0.2.10/24
Before applying the Netplan configuration, it's important to test it to ensure there are no syntax errors or network issues:
netplan try
If the test was successful and the configuration hasn't been applied yet using netplan try, please apply it now:
netplan apply
And verify with:
ip addr show vlan<VLAN-ID>
For further information, please also have a look at: man netplan
ifupdown (legacy)
Please use Netplan if possible. This is written only for the sake of completeness!
Ensure the vlan package is installed:
apt install vlan
Open /etc/network/interfaces in your preferred editor:
vi /etc/network/interfaces
Add a VLAN configuration like this:
# interface vlan<VLAN-ID>
auto vlan<VLAN-ID>
iface vlan<VLAN-ID> inet static
vlan-raw-device bond0
address <IP-Address>
netmask <NETMASK>
And restart your networking:
systemctl restart networking
For further information, please also have a look at: man vlan-interfaces