Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #working configuration
- ip netns add h1
- ip netns add h2
- ovs-vsctl add-br s2
- ip link add h1-eth0 type veth peer name s2-eth2
- ip link add h2-eth0 type veth peer name s2-eth3
- ovs-vsctl add-port s2 s2-eth2
- ovs-vsctl add-port s2 s2-eth3
- ip link set h1-eth0 netns h1
- ip link set h2-eth0 netns h2
- ovs-vsctl set-controller s2 tcp:127.0.0.1
- controller ptcp: &
- ip netns exec h1 ip addr add 10.0.0.1/8 dev h1-eth0
- ip netns exec h2 ip addr add 10.0.0.2/8 dev h2-eth0
- ip netns exec h1 ip link set h1-eth0 up
- ip netns exec h2 ip link set h2-eth0 up
- ip link set s2-eth2 up
- ip link set s2-eth3 up
- ip netns exec h1 ping -c1 10.0.0.2
- ip netns exec h2 ping -c1 10.0.0.1
- #remove all netns and stop all controllers
- ip netns | xargs -I {} sudo ip netns delete {}
- mn -c
- # nonworking configuration
- ip netns add h1
- ip netns add h2
- ip netns add sw2
- ovs-vsctl add-br s2
- ip link add h1-eth0 type veth peer name s2-eth2
- ip link add h2-eth0 type veth peer name s2-eth3
- ovs-vsctl add-port s2 s2-eth2
- ovs-vsctl add-port s2 s2-eth3
- ip link set h1-eth0 netns h1
- ip link set h2-eth0 netns h2
- ip link set s2-eth2 netns sw2
- ip link set s2-eth3 netns sw2
- ip link set s2 netns sw2
- ip netns exec sw2 ovs-vsctl set-controller s2 tcp:127.0.0.1
- ip netns exec sw2 controller ptcp: &
- ip netns exec h1 ip addr add 10.0.0.1/8 dev h1-eth0
- ip netns exec h2 ip addr add 10.0.0.2/8 dev h2-eth0
- ip netns exec h1 ip link set h1-eth0 up
- ip netns exec h2 ip link set h2-eth0 up
- ip netns exec sw2 ip link set s2-eth2 up
- ip netns exec sw2 ip link set s2-eth3 up
- ip netns exec h1 ping -c1 10.0.0.2
- ip netns exec h2 ping -c1 10.0.0.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement