Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
force_local_traffic_through_external_ethernet_cable_by_using_ip_namespaces [10.02.2018 10:45] – Pascal Suter | force_local_traffic_through_external_ethernet_cable_by_using_ip_namespaces [10.02.2018 10:47] (current) – Pascal Suter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== force local traffic through external ethernet cable by using ip namespaces] ====== | + | ====== force local traffic through external ethernet cable by using ip namespaces ====== |
lets say you want to run some performance benchmarks between two local network interfaces on a linux machine. if you assign an ip address to each of them and then run your benchmarks, your traffic will not go ghrough the cable but will be routed locally. It does not help to specify a listening interface or anything, you can also play with routes etc. you traffic will still be routed locally. | lets say you want to run some performance benchmarks between two local network interfaces on a linux machine. if you assign an ip address to each of them and then run your benchmarks, your traffic will not go ghrough the cable but will be routed locally. It does not help to specify a listening interface or anything, you can also play with routes etc. you traffic will still be routed locally. | ||
Line 34: | Line 34: | ||
ip netns exec ns_client iperf -c 10.0.0.1 -d -P 20 -t 99999 | ip netns exec ns_client iperf -c 10.0.0.1 -d -P 20 -t 99999 | ||
'' | '' | ||
+ | |||
+ | ===== cleaning up ===== | ||
+ | once you are done, simply run | ||
+ | ip netns del ns_server | ||
+ | ip netns del ns_client | ||
+ | and all your settings including the ip addresses etc. are gone. your interfaces will be back in the default namespace | ||