Quantcast
Viewing all articles
Browse latest Browse all 5

Hetzner /28 Subnet with KVM

Image may be NSFW.
Clik here to view.
Hetzner

Subnet configuration on a Hetzner dedicated root server (EX40) is a bit tricky than a normal additional single ip addresses that you can buy for 1EUR. So I wrote the configuration down:

You will need bridge-utils:

1
apt-get install bridge-utils

So I ordered a /28 subnet for my VM-landscape:
78.89.34.208/28 (255.255.255.240)
Usable IP-Addresses: 78.89.34.209 – 78.89.34.222

My root server had already: 56.23.67.56/27 (255.255.255.224)

Typology

Image may be NSFW.
Clik here to view.
Host

Host-System
Copy of /etc/network/interfaces

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Loopback device
auto lo
iface lo inet loopback
 
auto eth0
 
# IPv4
iface eth0 inet static
    address 56.23.67.56
    netmask 255.255.255.224
    gateway 56.23.67.33
    pointopoint 56.23.67.33
 
auto system17
iface system17 inet static
        address 172.30.79.1
        netmask 255.255.255.0
        pre-up brctl addbr $IFACE
        post-up route add -host 78.89.34.209 $IFACE
        post-down brctl delbr $IFACE
 
auto system18
iface system18 inet static
        address 172.30.80.1
        netmask 255.255.255.0
        pre-up brctl addbr $IFACE
        post-up route add -host 78.89.34.210 $IFACE
        post-down brctl delbr $IFACE

From VM-System
Copy of /etc/network/interfaces

1
2
3
4
5
6
7
8
9
10
11
# The loopback network interface
auto lo
iface lo inet loopback
 
# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 78.89.34.209
        netmask 255.255.255.255
        gateway 56.23.67.56
        pointopoint 56.23.67.56

So, you need to create for each new VM a new bridge.


Viewing all articles
Browse latest Browse all 5

Trending Articles