Last active
March 6, 2020 13:14
-
-
Save cathay4t/626136dfe4e349036eaf1f1992358b15 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash -x | |
if [[ $1 ]]; then | |
sudo ip link del eth1 | |
sudo ip link del eth2 | |
sudo nmcli c delete eth1 eth2 | |
exit | |
fi | |
sudo ip link add eth1 type veth peer name eth1.ep | |
sudo ip link add eth2 type veth peer name eth2.ep | |
sudo ip link set eth1 up | |
sudo ip link set eth1.ep up | |
sudo ip link set eth2 up | |
sudo ip link set eth2.ep up | |
sudo nmcli device set eth1 managed yes | |
sudo nmcli device set eth2 managed yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment