Created
March 30, 2021 09:42
-
-
Save wpyoga/b8796d0366d5e755a56873dcf1028701 to your computer and use it in GitHub Desktop.
make a virtual ethernet connection between default ip namespace and myns namespace
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
ip link add name A type veth peer name B | |
ip addr add 10.0.0.1/24 dev A | |
ip link set A up | |
ip netns add myns | |
ip link set B netns myns | |
ip netns exec myns ip addr add 10.0.0.2/24 dev B | |
ip netns exec myns ip link set B up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment