Answer the question
In order to leave comments, you need to log in
How to make 2 network interfaces work on a Linux virtual machine under Qemu-KVM?
There is a server with one network interface and one dedicated IP address.
Several Debian 8 virtual machines under Qemu-KVM are configured. Raised default(NAT) network via virbr0 192.168.122.0/24, host address 192.168.122.1. It is necessary to raise another network in such a way that one of the networks is used to access the Internet, and the other imitates a local network that combines virtual machines and a host.
Created anynetwork subnet via virbr1 192.168.44.0/24 similar to the one described in default.xml. Added to each virtualka on the virtual adapter through this network.
Approximately this network configuration:
<network>
<name>default</name>
<bridge name="virbr0" />
<forward/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254" />
</dhcp>
</ip>
</network>
<network>
<name>anynetwork</name>
<bridge name="virbr1" />
<ip address="192.168.44.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.44.2" end="192.168.44.254" />
</dhcp>
</ip>
</network>
Answer the question
In order to leave comments, you need to log in
Raise the second bridge, pick up the second virtual machine interfaces to it. There will be an internal subnet. Everything should work with both bridge-utils and openvswitsh. With the latter only today something similar was tricky :-)
And it would be nice to see the configurations of your networks
And the configuration of the bridges would be nice to peep ...
Shl. I, however, have not tried to run a couple of dnsmasq, but you can always raise a normal DHCP for virtual machines.
Well, at least everything should work with static addresses, check with them first.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question