QEMU: Bridge Network Adapter

From OnnoWiki
Jump to navigation Jump to search

Sumber: https://gist.github.com/extremecoders-re/e8fd8a67a515fee0c873dcafc81d811c

Install

Install untuk tunctl

apt -y install uml-utilities


Setup

Create a bridge

sudo su
brctl addbr br0
ip addr flush dev enp3s0
brctl addif br0 enp3s0
tunctl -t tap0 -u `whoami`
brctl addif br0 tap0

Make sure everything is up

ifconfig enp3s0 up
ifconfig tap0 up
ifconfig br0 up
brctl show
dhclient -v br0

Cleanup

Remove tap interface tap0 from bridge br0

brctl delif br0 tap0
tunctl -d tap0
brctl delif br0 enp3s0
ifconfig br0 down
brctl delbr br0
ifconfig enp3s0 up
dhclient -v enp3s0


Release IP

dhclient -v -r <interface>
dhclient -v <interface>




Referensi

Pranala Menarik