Last active
October 3, 2024 00:49
-
-
Save robertkirkman/91ce4efdbc1e21e5dbd1f97b4f819322 to your computer and use it in GitHub Desktop.
get a /sys/class/net/tap0 bridge on Linux in 15 seconds no nonsense
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip a # choose physical device to bridge | |
brctl addbr br0 | |
brctl addif br0 enp6s0 # physical device to bridge | |
ip a add 192.168.1.130/24 dev br0 # choose new ip | |
ip tuntap add mode tap tap0 | |
brctl addif br0 tap0 | |
ip link set br0 up | |
ip link set tap0 up | |
ip route add default via 192.168.1.1 dev br0 # default gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ -netdev tap,id=mynet0,ifname=tap0,script=no,downscript=no \ | |
+ -device e1000,netdev=mynet0,mac=52:55:00:d1:55:03 \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment