Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
force_local_traffic_through_external_ethernet_cable_by_using_ip_namespaces [10.02.2018 10:35] – created 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 29: | Line 29: | ||
you should see your full bandwidth being used by the one netcat process in '' | you should see your full bandwidth being used by the one netcat process in '' | ||
+ | or you can run '' | ||
+ | ip netns exec ns_server iperf -s | ||
+ | and for the client: | ||
+ | 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 | ||