# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. dummy
# Interfaces fictives pour le bridge iface dummy0 inet manual # Démarrage non automatique du bridge #auto lan0 # Interface/pont pour le réseau interne iface lan0 inet static address 192.168.200.254/24 bridge_ports dummy0 bridge_maxwait 5 bridge_stp off bridge_fd 0 pre-up /sbin/ip link add dummy0 type dummy post-down /sbin/ip link del dummy0
# modprobe dummy
ifup lan0
ifconfig lan0 lan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.200.254 netmask 255.255.255.0 broadcast 192.168.200.255 inet6 fe80::e0a6:f1ff:fece:ee92 prefixlen 64 scopeid 0x20<link> ether e2:a6:f1:ce:ee:92 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 164 bytes 27842 (27.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
brctl show
bridge name bridge id STP enabled interfaces
lan0 8000.e2a6f1ceee92 no dummy0
Le bridge doit être arrêté pour être pris en charge par libvirt
ifdown lan0
virsh net-edit default
<network> <name>default</name> <uuid>10810229-bede-4ae5-a513-05b5d9c4b47d</uuid> <forward mode='nat'/> <bridge name='lan0' stp='on' delay='0'/> <mac address='52:54:00:c0:21:86'/> <ip address='192.168.200.254' netmask='255.255.255.0'> <dhcp> <range start='192.168.200.1' end='192.168.200.253'/> </dhcp> </ip> </network>
virsh net-start default
virsh net-autostart default
virsh net-list --all Nom État Démarrage automatique Persistent ------------------------------------------------------- default actif Oui Oui