R
R
Rustam2016-11-14 19:58:09
Computer networks
Rustam, 2016-11-14 19:58:09

How to properly assign dedicated IPs for proxmox virtual machines?

There is a server with virtual machines on proxmox (debian 8) and a network 88.99.45.112/28

The network configuration on the host machine is as follows:

auto eth0
iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address  138.201.255.22
        netmask  255.255.255.192
        gateway  138.201.255.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
#Bridge to eth0

auto vmbr1
iface vmbr1 inet static
        address  88.99.45.112
        netmask  255.255.255.240
        bridge_ports none
        bridge_stp off
        bridge_fd 0
#Hetzner subnet /28

auto vmbr2
iface vmbr2 inet static
        address  192.168.8.1
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
#Internal Network 192.168.8.0/24 with DHCP


Virtual machines have 2 interfaces eth0 (to vmbr2), eth1 (to vmbr1).

eth0 inet addr:192.168.8.8  Bcast:192.168.8.255  Mask:255.255.255.0
eth1 inet addr:88.99.45.117  Bcast:88.99.45.127  Mask:255.255.255.240


The routes on the VM are:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.8.1     0.0.0.0         UG    0      0        0 eth0
88.99.45.112    0.0.0.0         255.255.255.240 U     0      0        0 eth1
192.168.8.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0


It turns out that from outside the VM accesses via IP 88.99.45.117 , but itself sees the world via NAT'u at 192.168.8.0/24 and the host machine 's IP 138.201.255.22 lights up when requests are made . And you need to shine with your IP 88.99.45.117

What needs to be corrected in network settings or routing?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2016-11-14
@opium

Why the hell do they need two network networks then? they will still go to each other locally and on the same bridge
, and it is so logical that they just change the gateway to IP on the first bridge and not on the second.

V
Vladimir, 2016-11-14
@MechanID

On virtual machines -
Remove the default gateway 192.168.8.1
Add a default gateway from the network 88.99.45.112/28 - most likely 88.99.45.113
An error in the config
address 88.99.45.112 will immediately catch your eye - this is not possible - your network address is
88.99. 45.113 - most likely the gateway from your provider, and everything else from 88.99.45.114 to 88.99.45.126 is your IP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question