Skip to content

Commit 527588d

Browse files
authored
[DOCS] Update guide-networking.md (foxlet#108)
It's also possible to let QEMU control your tun/tap devices. It's only needed to create a bridge device with f.e. netctl.
1 parent 3507989 commit 527588d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/guide-networking.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,34 @@ You can optionally use the `vmxnet3` driver for higher performance compared to t
5858
```
5959
-device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \
6060
```
61+
62+
## Using Netctl
63+
You can also use netctl and the qemu bridge helper to control the bridge and tun/tap interfaces. Replace `DEVICENAME` with your ethernet card's device name.
64+
65+
### Create netctl configuration file in /etc/netctl (f.e. /etc/netctl/kvm-bridge)
66+
```
67+
Description="Bridge Interface br10 : DEVICENAME"
68+
Interface=br10
69+
Connection=bridge
70+
BindsToInterfaces=(DEVICENAME)
71+
IP=dhcp
72+
# If you want also for DHCPv6,uncomment below line
73+
#IP6=dhcp
74+
```
75+
76+
### Activate netctl bridge handler with system boot
77+
```
78+
sudo netctl enable kvm-bridge
79+
```
80+
81+
### Create bridge whitelist file for qemu (/etc/qemu/bridge.conf)
82+
```
83+
allow br10
84+
```
85+
86+
## Attach Bridge to QEMU
87+
Now you'll have to add the following line to `basic.sh`, replacing `-netdev user,id=net0`. Change `br10` to your corresponding device name.
88+
89+
```
90+
-netdev bridge,br=br10,id=net0 \
91+
```

0 commit comments

Comments
 (0)