W
W
Wayer2019-03-21 16:30:28
linux
Wayer, 2019-03-21 16:30:28

How to correctly set up a network adapter in Linux with virtual machines?

There is a server in the data center. The provider issued 3 IP addresses for this machine (63, 64 and 65). There is a connection to the enp6s0 network and two virtual machines running QEMU/KVM. Current configuration for networking in QEMU:

auto lo bridge0
iface lo inet loopback

iface enp6s0 inet manual

iface bridge0 inet dhcp
  bridge_ports enp6s0

Each machine registered itself a static connection through this bridge, under its own data (63 and 64). I, apparently, am stupid, but how to properly configure the host machine so that it also sits on the network under the remaining static address 65 without interfering with virtual machines sitting across the bridge with their configs?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Syomov, 2019-03-21
@kotomyava

You need to give your bridge0 address, in fact ...
Apparently, dhcp does not work in your case, and you need to:

iface bridge0 inet static
  address <ваш адрес>

etc.

R
Roman Ratkin, 2019-03-21
@Hanharr

Does one wire come from the provider to the machine itself? If three, then something like this:

auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

iface eth2 inet manual

iface eth3 inet manual

auto vmbr0
iface vmbr0 inet static
        address  192.168.0.2
        netmask  255.255.255.0
        gateway  192.168.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

auto vmbr2
iface vmbr2 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0

vmbr2 can be thrown into the VM and give it static.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question