Skip to content

Commit

Permalink
vm: add separate spare eth1 wan interface
Browse files Browse the repository at this point in the history
  • Loading branch information
pktpls committed Apr 29, 2024
1 parent 3c0b681 commit 0470da9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ cat << EOF > "$vmdir/vmconfig.json"
"host_dev_name": "vmeth0",
"iface_id": "eth0",
"guest_mac": "02:fc:00:00:00:06"
},
{
"host_dev_name": "vmeth1",
"iface_id": "eth1",
"guest_mac": "02:fc:01:00:00:06"
}
]
}
Expand All @@ -152,8 +157,12 @@ ip link set up vmeth0.42
ip addr add $cnip dev vmeth0.42
ip route add $mgmtnet dev vmeth0.42
ip tuntap add dev vmeth1 mode tap
ip link set up vmeth1
brctl addbr wan
brctl addif wan vmeth0.50
brctl addif wan vmeth1
brctl addif wan tap0
ip link set up wan
ip route del \`ip r | grep '24 dev tap0'\`
Expand Down

0 comments on commit 0470da9

Please sign in to comment.