:: Re: [DNG] Assigning a specific subn…
Kezdőlap
Delete this message
Reply to this message
Szerző: Gabe Stanton
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] Assigning a specific subnet and address to a Devuan Beowulf Qemu guest
On Wed, 2021-02-17 at 16:28 -0500, Steve Litt wrote:
> Hi Gabe,
> On your guest VM, what does it say your default route is when
> youperform the ip route command?


results of ip route:

default via 192.168.1.1 dev eth0
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.75


> Did you need to do something special to get that default
> route(gateway)?
> Thanks,
> SteveT


I believe I used the below from here, as well as the 'set up a bridge'
link and maybe the 'QEMU' page linked.

I thought I had started keeping better notes about what I do... I must
have started that after I installed this VM lol.




source url (same as above label'd "here"):
https://wiki.debian.org/KVM?highlight=%28%5CbCategoryVirtualization%5Cb%29#Setting_up_bridge_networking
Between VM host, guests and the world
In order to let communications between host, guests and outside world,
you may set up a bridge and as described at QEMU page.
For
example, you can modify the network configuration file
/etc/network/interfaces to setup the ethernet interface eth0 to a
bridge
interface br0 similar as below. After the configuration, you can set
using Bridge Interface br0 as the network connection in VM guest
configuration.

auto lo
iface lo inet loopback

# The primary network interface
auto eth0

#make sure we don't get addresses on our raw device
iface eth0 inet manual
iface eth0 inet6 manual

#set up bridge and give it a static ip
auto br0
iface br0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
        dns-nameservers 8.8.8.8


#allow autoconf for ipv6
iface br0 inet6 auto
        accept_ra 1Once that is correctly configured, you should be
able to use the bridge on new VM deployments with: 


virt-install --network bridge=br0 [...]



Gabe