Created
September 19, 2021 20:18
-
-
Save ozaki-r/b1b6c3af2e1800cd1a74a641ade32071 to your computer and use it in GitHub Desktop.
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 link add name tx-veth0 type veth peer name tx-veth1 | |
ip netns add af_xdp | |
ip link set tx-veth1 netns af_xdp | |
ip link add name rx-veth0 type veth peer name rx-veth1 | |
ip link set rx-veth1 netns af_xdp | |
ip link set up dev tx-veth0 | |
ip link set up dev rx-veth0 | |
ip a add 10.0.1.2/24 dev tx-veth0 | |
ip a add 10.0.2.2/24 dev rx-veth0 | |
ip netns exec af_xdp ip a add 10.0.1.1/24 dev tx-veth1 | |
ip netns exec af_xdp ip a add 10.0.2.1/24 dev rx-veth1 | |
ip netns exec af_xdp ip link set up dev tx-veth1 | |
ip netns exec af_xdp ip link set up dev rx-veth1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment