* mac80211_hwsim + iperf + netns @ 2016-02-04 11:22 Krishna Chaitanya 2016-02-04 11:32 ` Michal Kazior 0 siblings, 1 reply; 13+ messages in thread From: Krishna Chaitanya @ 2016-02-04 11:22 UTC (permalink / raw) To: linux-wireless Hi All, I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. Even after tweaking the routing table, the packets are still not going through mac80211_hwsim instead they are just looping back. After a quick search i found that we should use different network namespaces. Can anyone tell me the exact procedure for this? I have found a procedure in the below link, but i dont have the lxc-unshare for my embedded box. Is there any alternate way for this. https://github.com/bcopeland/wmediumd -- Thanks, Regards, Chaitanya T K. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 11:22 mac80211_hwsim + iperf + netns Krishna Chaitanya @ 2016-02-04 11:32 ` Michal Kazior 2016-02-04 11:49 ` Krishna Chaitanya 2016-02-04 12:19 ` Johannes Berg 0 siblings, 2 replies; 13+ messages in thread From: Michal Kazior @ 2016-02-04 11:32 UTC (permalink / raw) To: Krishna Chaitanya; +Cc: linux-wireless On 4 February 2016 at 12:22, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: > Hi All, > > I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. > Even after tweaking the routing table, the packets are still not going through > mac80211_hwsim instead they are just looping back. > > After a quick search i found that we should use different network namespaces. > Can anyone tell me the exact procedure for this? I have found a procedure > in the below link, but i dont have the lxc-unshare for my embedded box. > Is there any alternate way for this. If you have a recent enough iproute2 package you can use: ip netns add ns1 ip netns exec ns1 bash # get the PID in the session and don't close it iw phy phyX set netns $pid_of_that_shell # you can close the bash now; phyX will remain in ns1 Or you could try using ipv6 link-local addresses which will not require you to use namespaces at all. Michał ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 11:32 ` Michal Kazior @ 2016-02-04 11:49 ` Krishna Chaitanya 2016-02-04 11:53 ` Michal Kazior 2016-02-04 12:19 ` Johannes Berg 1 sibling, 1 reply; 13+ messages in thread From: Krishna Chaitanya @ 2016-02-04 11:49 UTC (permalink / raw) To: Michal Kazior; +Cc: linux-wireless On Thu, Feb 4, 2016 at 5:02 PM, Michal Kazior <michal.kazior@tieto.com> wrote: > On 4 February 2016 at 12:22, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >> Hi All, >> >> I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. >> Even after tweaking the routing table, the packets are still not going through >> mac80211_hwsim instead they are just looping back. >> >> After a quick search i found that we should use different network namespaces. >> Can anyone tell me the exact procedure for this? I have found a procedure >> in the below link, but i dont have the lxc-unshare for my embedded box. >> Is there any alternate way for this. > > If you have a recent enough iproute2 package you can use: Unfortunately i dont, will try to get the latest. > ip netns add ns1 > ip netns exec ns1 bash # get the PID in the session and don't close it > iw phy phyX set netns $pid_of_that_shell > # you can close the bash now; phyX will remain in ns1 > > Or you could try using ipv6 link-local addresses which will not > require you to use namespaces at all. Tried this but still not able to excite mac80211_hwsim TX path. below are commands and config. wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00 inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8 errors:0 dropped:1 overruns:0 frame:0 TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:648 (648.0 B) TX bytes:3680 (3.5 KiB) wlan1 Link encap:Ethernet HWaddr 02:00:00:00:01:00 inet addr:20.0.0.1 Bcast:20.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::ff:fe00:100/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:126 (126.0 B) TX bytes:808 (808.0 B) iperf -s -B fe80::ff:fe00:0 & iperf -c fe80::ff:fe00:0 -B fe80::ff:fe00:100 -t 60 -i 1 Something wrong? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 11:49 ` Krishna Chaitanya @ 2016-02-04 11:53 ` Michal Kazior 2016-02-04 12:27 ` Krishna Chaitanya 0 siblings, 1 reply; 13+ messages in thread From: Michal Kazior @ 2016-02-04 11:53 UTC (permalink / raw) To: Krishna Chaitanya; +Cc: linux-wireless On 4 February 2016 at 12:49, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: > On Thu, Feb 4, 2016 at 5:02 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >> On 4 February 2016 at 12:22, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>> Hi All, >>> >>> I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. >>> Even after tweaking the routing table, the packets are still not going through >>> mac80211_hwsim instead they are just looping back. >>> >>> After a quick search i found that we should use different network namespaces. >>> Can anyone tell me the exact procedure for this? I have found a procedure >>> in the below link, but i dont have the lxc-unshare for my embedded box. >>> Is there any alternate way for this. >> >> If you have a recent enough iproute2 package you can use: > Unfortunately i dont, will try to get the latest. >> ip netns add ns1 >> ip netns exec ns1 bash # get the PID in the session and don't close it >> iw phy phyX set netns $pid_of_that_shell >> # you can close the bash now; phyX will remain in ns1 >> >> Or you could try using ipv6 link-local addresses which will not >> require you to use namespaces at all. > Tried this but still not able to excite mac80211_hwsim TX path. > below are commands and config. > > wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00 > inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 > inet6 addr: fe80::ff:fe00:0/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:8 errors:0 dropped:1 overruns:0 frame:0 > TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:648 (648.0 B) TX bytes:3680 (3.5 KiB) > > wlan1 Link encap:Ethernet HWaddr 02:00:00:00:01:00 > inet addr:20.0.0.1 Bcast:20.255.255.255 Mask:255.0.0.0 > inet6 addr: fe80::ff:fe00:100/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:3 errors:0 dropped:0 overruns:0 frame:0 > TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:126 (126.0 B) TX bytes:808 (808.0 B) > > iperf -s -B fe80::ff:fe00:0 & > iperf -c fe80::ff:fe00:0 -B fe80::ff:fe00:100 -t 60 -i 1 > > Something wrong? For link-local addresses you must specify interface you want to use them. Also, there's an iperf switch to understand ipv6 "-V". iperf -V -i1 -s iperf -V -i1 -c fe80::ff:fe00:0%wlan1 iperf -V -i1 -c fe80::ff:fe00:100%wlan0 Michał ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 11:53 ` Michal Kazior @ 2016-02-04 12:27 ` Krishna Chaitanya 2016-02-04 12:46 ` Krishna Chaitanya 0 siblings, 1 reply; 13+ messages in thread From: Krishna Chaitanya @ 2016-02-04 12:27 UTC (permalink / raw) To: Michal Kazior; +Cc: linux-wireless On Thu, Feb 4, 2016 at 5:23 PM, Michal Kazior <michal.kazior@tieto.com> wrote: > On 4 February 2016 at 12:49, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >> On Thu, Feb 4, 2016 at 5:02 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >>> On 4 February 2016 at 12:22, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>>> Hi All, >>>> >>>> I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. >>>> Even after tweaking the routing table, the packets are still not going through >>>> mac80211_hwsim instead they are just looping back. >>>> >>>> After a quick search i found that we should use different network namespaces. >>>> Can anyone tell me the exact procedure for this? I have found a procedure >>>> in the below link, but i dont have the lxc-unshare for my embedded box. >>>> Is there any alternate way for this. >>> >>> If you have a recent enough iproute2 package you can use: >> Unfortunately i dont, will try to get the latest. >>> ip netns add ns1 >>> ip netns exec ns1 bash # get the PID in the session and don't close it >>> iw phy phyX set netns $pid_of_that_shell >>> # you can close the bash now; phyX will remain in ns1 >>> >>> Or you could try using ipv6 link-local addresses which will not >>> require you to use namespaces at all. >> Tried this but still not able to excite mac80211_hwsim TX path. >> below are commands and config. >> >> wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00 >> inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 >> inet6 addr: fe80::ff:fe00:0/64 Scope:Link >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> RX packets:8 errors:0 dropped:1 overruns:0 frame:0 >> TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:648 (648.0 B) TX bytes:3680 (3.5 KiB) >> >> wlan1 Link encap:Ethernet HWaddr 02:00:00:00:01:00 >> inet addr:20.0.0.1 Bcast:20.255.255.255 Mask:255.0.0.0 >> inet6 addr: fe80::ff:fe00:100/64 Scope:Link >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> RX packets:3 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:126 (126.0 B) TX bytes:808 (808.0 B) >> >> iperf -s -B fe80::ff:fe00:0 & >> iperf -c fe80::ff:fe00:0 -B fe80::ff:fe00:100 -t 60 -i 1 >> >> Something wrong? > > For link-local addresses you must specify interface you want to use them. > > Also, there's an iperf switch to understand ipv6 "-V". > > iperf -V -i1 -s > iperf -V -i1 -c fe80::ff:fe00:0%wlan1 > iperf -V -i1 -c fe80::ff:fe00:100%wlan0 > Thanks a lot Michal. It worked like a charm. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 12:27 ` Krishna Chaitanya @ 2016-02-04 12:46 ` Krishna Chaitanya 2016-02-04 12:51 ` Michal Kazior 0 siblings, 1 reply; 13+ messages in thread From: Krishna Chaitanya @ 2016-02-04 12:46 UTC (permalink / raw) To: Michal Kazior; +Cc: linux-wireless On Thu, Feb 4, 2016 at 5:57 PM, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: > On Thu, Feb 4, 2016 at 5:23 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >> On 4 February 2016 at 12:49, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>> On Thu, Feb 4, 2016 at 5:02 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >>>> On 4 February 2016 at 12:22, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>>>> Hi All, >>>>> >>>>> I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. >>>>> Even after tweaking the routing table, the packets are still not going through >>>>> mac80211_hwsim instead they are just looping back. >>>>> >>>>> After a quick search i found that we should use different network namespaces. >>>>> Can anyone tell me the exact procedure for this? I have found a procedure >>>>> in the below link, but i dont have the lxc-unshare for my embedded box. >>>>> Is there any alternate way for this. >>>> >>>> If you have a recent enough iproute2 package you can use: >>> Unfortunately i dont, will try to get the latest. >>>> ip netns add ns1 >>>> ip netns exec ns1 bash # get the PID in the session and don't close it >>>> iw phy phyX set netns $pid_of_that_shell >>>> # you can close the bash now; phyX will remain in ns1 >>>> >>>> Or you could try using ipv6 link-local addresses which will not >>>> require you to use namespaces at all. >>> Tried this but still not able to excite mac80211_hwsim TX path. >>> below are commands and config. >>> >>> wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00 >>> inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 >>> inet6 addr: fe80::ff:fe00:0/64 Scope:Link >>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >>> RX packets:8 errors:0 dropped:1 overruns:0 frame:0 >>> TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 >>> collisions:0 txqueuelen:1000 >>> RX bytes:648 (648.0 B) TX bytes:3680 (3.5 KiB) >>> >>> wlan1 Link encap:Ethernet HWaddr 02:00:00:00:01:00 >>> inet addr:20.0.0.1 Bcast:20.255.255.255 Mask:255.0.0.0 >>> inet6 addr: fe80::ff:fe00:100/64 Scope:Link >>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >>> RX packets:3 errors:0 dropped:0 overruns:0 frame:0 >>> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 >>> collisions:0 txqueuelen:1000 >>> RX bytes:126 (126.0 B) TX bytes:808 (808.0 B) >>> >>> iperf -s -B fe80::ff:fe00:0 & >>> iperf -c fe80::ff:fe00:0 -B fe80::ff:fe00:100 -t 60 -i 1 >>> >>> Something wrong? >> >> For link-local addresses you must specify interface you want to use them. >> >> Also, there's an iperf switch to understand ipv6 "-V". >> >> iperf -V -i1 -s >> iperf -V -i1 -c fe80::ff:fe00:0%wlan1 >> iperf -V -i1 -c fe80::ff:fe00:100%wlan0 >> > Thanks a lot Michal. It worked like a charm. Whenever i use the iperf -c, it starts a bi-directional stream, How do i limit it to only for single direction? # iperf -V -i1 -c fe80::ff:fe00:0%wlan1 ------------------------------------------------------------ Client connecting to fe80::ff:fe00:0%wlan1, TCP port 5001 TCP window size: 43.8 KByte (default) ------------------------------------------------------------ [ 3] local fe80::ff:fe00:100 port 34808 connected with fe80::ff:fe00:0 port 5001 [ 5] local fe80::ff:fe00:0 port 5001 connected with fe80::ff:fe00:100 port 34808 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 12:46 ` Krishna Chaitanya @ 2016-02-04 12:51 ` Michal Kazior 2016-02-04 13:38 ` Krishna Chaitanya 0 siblings, 1 reply; 13+ messages in thread From: Michal Kazior @ 2016-02-04 12:51 UTC (permalink / raw) To: Krishna Chaitanya; +Cc: linux-wireless On 4 February 2016 at 13:46, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: > On Thu, Feb 4, 2016 at 5:57 PM, Krishna Chaitanya > <chaitanya.mgit@gmail.com> wrote: >> On Thu, Feb 4, 2016 at 5:23 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >>> On 4 February 2016 at 12:49, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>>> On Thu, Feb 4, 2016 at 5:02 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >>>>> On 4 February 2016 at 12:22, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>>>>> Hi All, >>>>>> >>>>>> I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. >>>>>> Even after tweaking the routing table, the packets are still not going through >>>>>> mac80211_hwsim instead they are just looping back. >>>>>> >>>>>> After a quick search i found that we should use different network namespaces. >>>>>> Can anyone tell me the exact procedure for this? I have found a procedure >>>>>> in the below link, but i dont have the lxc-unshare for my embedded box. >>>>>> Is there any alternate way for this. >>>>> >>>>> If you have a recent enough iproute2 package you can use: >>>> Unfortunately i dont, will try to get the latest. >>>>> ip netns add ns1 >>>>> ip netns exec ns1 bash # get the PID in the session and don't close it >>>>> iw phy phyX set netns $pid_of_that_shell >>>>> # you can close the bash now; phyX will remain in ns1 >>>>> >>>>> Or you could try using ipv6 link-local addresses which will not >>>>> require you to use namespaces at all. >>>> Tried this but still not able to excite mac80211_hwsim TX path. >>>> below are commands and config. >>>> >>>> wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00 >>>> inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 >>>> inet6 addr: fe80::ff:fe00:0/64 Scope:Link >>>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >>>> RX packets:8 errors:0 dropped:1 overruns:0 frame:0 >>>> TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 >>>> collisions:0 txqueuelen:1000 >>>> RX bytes:648 (648.0 B) TX bytes:3680 (3.5 KiB) >>>> >>>> wlan1 Link encap:Ethernet HWaddr 02:00:00:00:01:00 >>>> inet addr:20.0.0.1 Bcast:20.255.255.255 Mask:255.0.0.0 >>>> inet6 addr: fe80::ff:fe00:100/64 Scope:Link >>>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >>>> RX packets:3 errors:0 dropped:0 overruns:0 frame:0 >>>> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 >>>> collisions:0 txqueuelen:1000 >>>> RX bytes:126 (126.0 B) TX bytes:808 (808.0 B) >>>> >>>> iperf -s -B fe80::ff:fe00:0 & >>>> iperf -c fe80::ff:fe00:0 -B fe80::ff:fe00:100 -t 60 -i 1 >>>> >>>> Something wrong? >>> >>> For link-local addresses you must specify interface you want to use them. >>> >>> Also, there's an iperf switch to understand ipv6 "-V". >>> >>> iperf -V -i1 -s >>> iperf -V -i1 -c fe80::ff:fe00:0%wlan1 >>> iperf -V -i1 -c fe80::ff:fe00:100%wlan0 >>> >> Thanks a lot Michal. It worked like a charm. > Whenever i use the iperf -c, it starts a bi-directional stream, > How do i limit it to only for single direction? > > # iperf -V -i1 -c fe80::ff:fe00:0%wlan1 > ------------------------------------------------------------ > Client connecting to fe80::ff:fe00:0%wlan1, TCP port 5001 > TCP window size: 43.8 KByte (default) > ------------------------------------------------------------ > [ 3] local fe80::ff:fe00:100 port 34808 connected with > fe80::ff:fe00:0 port 5001 > [ 5] local fe80::ff:fe00:0 port 5001 connected with fe80::ff:fe00:100 > port 34808 Hmm.. Are you perhaps running `iperf -V -i1 -s &` (i.e. in the background) with the same stdout as the client :-) You're probably just seeing both the server and the client saying a connection has established at their ends. Michał ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 12:51 ` Michal Kazior @ 2016-02-04 13:38 ` Krishna Chaitanya 0 siblings, 0 replies; 13+ messages in thread From: Krishna Chaitanya @ 2016-02-04 13:38 UTC (permalink / raw) To: Michal Kazior; +Cc: linux-wireless On Thu, Feb 4, 2016 at 6:21 PM, Michal Kazior <michal.kazior@tieto.com> wrote: > On 4 February 2016 at 13:46, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >> On Thu, Feb 4, 2016 at 5:57 PM, Krishna Chaitanya >> <chaitanya.mgit@gmail.com> wrote: >>> On Thu, Feb 4, 2016 at 5:23 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >>>> On 4 February 2016 at 12:49, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>>>> On Thu, Feb 4, 2016 at 5:02 PM, Michal Kazior <michal.kazior@tieto.com> wrote: >>>>>> On 4 February 2016 at 12:22, Krishna Chaitanya <chaitanya.mgit@gmail.com> wrote: >>>>>>> Hi All, >>>>>>> >>>>>>> I am trying to run some iperf tests using mac80211_hwsim b/w AP and STA. >>>>>>> Even after tweaking the routing table, the packets are still not going through >>>>>>> mac80211_hwsim instead they are just looping back. >>>>>>> >>>>>>> After a quick search i found that we should use different network namespaces. >>>>>>> Can anyone tell me the exact procedure for this? I have found a procedure >>>>>>> in the below link, but i dont have the lxc-unshare for my embedded box. >>>>>>> Is there any alternate way for this. >>>>>> >>>>>> If you have a recent enough iproute2 package you can use: >>>>> Unfortunately i dont, will try to get the latest. >>>>>> ip netns add ns1 >>>>>> ip netns exec ns1 bash # get the PID in the session and don't close it >>>>>> iw phy phyX set netns $pid_of_that_shell >>>>>> # you can close the bash now; phyX will remain in ns1 >>>>>> >>>>>> Or you could try using ipv6 link-local addresses which will not >>>>>> require you to use namespaces at all. >>>>> Tried this but still not able to excite mac80211_hwsim TX path. >>>>> below are commands and config. >>>>> >>>>> wlan0 Link encap:Ethernet HWaddr 02:00:00:00:00:00 >>>>> inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 >>>>> inet6 addr: fe80::ff:fe00:0/64 Scope:Link >>>>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >>>>> RX packets:8 errors:0 dropped:1 overruns:0 frame:0 >>>>> TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 >>>>> collisions:0 txqueuelen:1000 >>>>> RX bytes:648 (648.0 B) TX bytes:3680 (3.5 KiB) >>>>> >>>>> wlan1 Link encap:Ethernet HWaddr 02:00:00:00:01:00 >>>>> inet addr:20.0.0.1 Bcast:20.255.255.255 Mask:255.0.0.0 >>>>> inet6 addr: fe80::ff:fe00:100/64 Scope:Link >>>>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >>>>> RX packets:3 errors:0 dropped:0 overruns:0 frame:0 >>>>> TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 >>>>> collisions:0 txqueuelen:1000 >>>>> RX bytes:126 (126.0 B) TX bytes:808 (808.0 B) >>>>> >>>>> iperf -s -B fe80::ff:fe00:0 & >>>>> iperf -c fe80::ff:fe00:0 -B fe80::ff:fe00:100 -t 60 -i 1 >>>>> >>>>> Something wrong? >>>> >>>> For link-local addresses you must specify interface you want to use them. >>>> >>>> Also, there's an iperf switch to understand ipv6 "-V". >>>> >>>> iperf -V -i1 -s >>>> iperf -V -i1 -c fe80::ff:fe00:0%wlan1 >>>> iperf -V -i1 -c fe80::ff:fe00:100%wlan0 >>>> >>> Thanks a lot Michal. It worked like a charm. >> Whenever i use the iperf -c, it starts a bi-directional stream, >> How do i limit it to only for single direction? >> >> # iperf -V -i1 -c fe80::ff:fe00:0%wlan1 >> ------------------------------------------------------------ >> Client connecting to fe80::ff:fe00:0%wlan1, TCP port 5001 >> TCP window size: 43.8 KByte (default) >> ------------------------------------------------------------ >> [ 3] local fe80::ff:fe00:100 port 34808 connected with >> fe80::ff:fe00:0 port 5001 >> [ 5] local fe80::ff:fe00:0 port 5001 connected with fe80::ff:fe00:100 >> port 34808 > > Hmm.. Are you perhaps running `iperf -V -i1 -s &` (i.e. in the > background) with the same stdout as the client :-) You're probably > just seeing both the server and the client saying a connection has > established at their ends. > Ok i understand. Thanks. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 11:32 ` Michal Kazior 2016-02-04 11:49 ` Krishna Chaitanya @ 2016-02-04 12:19 ` Johannes Berg 2016-02-04 12:28 ` Krishna Chaitanya 1 sibling, 1 reply; 13+ messages in thread From: Johannes Berg @ 2016-02-04 12:19 UTC (permalink / raw) To: Michal Kazior, Krishna Chaitanya; +Cc: linux-wireless On Thu, 2016-02-04 at 12:32 +0100, Michal Kazior wrote: > > ip netns add ns1 > ip netns exec ns1 bash # get the PID in the session and don't close > it > iw phy phyX set netns $pid_of_that_shell > If you also have a recent enough iw version, you can use iw phy phyX set netns name ns1 johannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 12:19 ` Johannes Berg @ 2016-02-04 12:28 ` Krishna Chaitanya 2016-02-04 12:35 ` Johannes Berg 0 siblings, 1 reply; 13+ messages in thread From: Krishna Chaitanya @ 2016-02-04 12:28 UTC (permalink / raw) To: Johannes Berg; +Cc: Michal Kazior, linux-wireless On Thu, Feb 4, 2016 at 5:49 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > On Thu, 2016-02-04 at 12:32 +0100, Michal Kazior wrote: >> >> ip netns add ns1 >> ip netns exec ns1 bash # get the PID in the session and don't close >> it >> iw phy phyX set netns $pid_of_that_shell >> > > If you also have a recent enough iw version, you can use > > iw phy phyX set netns name ns1 > My iw has this option, but it throws an error. Does this command have any prerequisites? # iw phy phy1 set netns name ns1 Invalid parameter: nsname(name) Usage: iw [options] phy <phyname> set netns { <pid> | name <nsname> } Put this wireless device into a different network namespace: <pid> - change network namespace by process id <nsname> - change network namespace by name from /var/run/netns or by absolute path (man ip-netns) Options: --debug enable netlink debugging # ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 12:28 ` Krishna Chaitanya @ 2016-02-04 12:35 ` Johannes Berg 2016-02-04 12:43 ` Krishna Chaitanya 0 siblings, 1 reply; 13+ messages in thread From: Johannes Berg @ 2016-02-04 12:35 UTC (permalink / raw) To: Krishna Chaitanya; +Cc: Michal Kazior, linux-wireless On Thu, 2016-02-04 at 17:58 +0530, Krishna Chaitanya wrote: > On Thu, Feb 4, 2016 at 5:49 PM, Johannes Berg <johannes@sipsolutions. > net> wrote: > > On Thu, 2016-02-04 at 12:32 +0100, Michal Kazior wrote: > > > > > > ip netns add ns1 > > > ip netns exec ns1 bash # get the PID in the session and don't > > > close > > > it > > > iw phy phyX set netns $pid_of_that_shell > > > > > > > If you also have a recent enough iw version, you can use > > > > iw phy phyX set netns name ns1 > > > My iw has this option, but it throws an error. > Does this command have any prerequisites? > > # iw phy phy1 set netns name ns1 > Invalid parameter: nsname(name) > This happens if the ns1 doesn't exist. johannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 12:35 ` Johannes Berg @ 2016-02-04 12:43 ` Krishna Chaitanya 2016-02-04 12:51 ` Johannes Berg 0 siblings, 1 reply; 13+ messages in thread From: Krishna Chaitanya @ 2016-02-04 12:43 UTC (permalink / raw) To: Johannes Berg; +Cc: Michal Kazior, linux-wireless On Thu, Feb 4, 2016 at 6:05 PM, Johannes Berg <johannes@sipsolutions.net> wrote: > On Thu, 2016-02-04 at 17:58 +0530, Krishna Chaitanya wrote: >> On Thu, Feb 4, 2016 at 5:49 PM, Johannes Berg <johannes@sipsolutions. >> net> wrote: >> > On Thu, 2016-02-04 at 12:32 +0100, Michal Kazior wrote: >> > > >> > > ip netns add ns1 >> > > ip netns exec ns1 bash # get the PID in the session and don't >> > > close >> > > it >> > > iw phy phyX set netns $pid_of_that_shell >> > > >> > >> > If you also have a recent enough iw version, you can use >> > >> > iw phy phyX set netns name ns1 >> > >> My iw has this option, but it throws an error. >> Does this command have any prerequisites? >> >> # iw phy phy1 set netns name ns1 >> Invalid parameter: nsname(name) >> > > This happens if the ns1 doesn't exist. ok, so we need latest iprotue2 to create the namespace? ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: mac80211_hwsim + iperf + netns 2016-02-04 12:43 ` Krishna Chaitanya @ 2016-02-04 12:51 ` Johannes Berg 0 siblings, 0 replies; 13+ messages in thread From: Johannes Berg @ 2016-02-04 12:51 UTC (permalink / raw) To: Krishna Chaitanya; +Cc: Michal Kazior, linux-wireless On Thu, 2016-02-04 at 18:13 +0530, Krishna Chaitanya wrote: > On Thu, Feb 4, 2016 at 6:05 PM, Johannes Berg <johannes@sipsolutions. > net> wrote: > > On Thu, 2016-02-04 at 17:58 +0530, Krishna Chaitanya wrote: > > > On Thu, Feb 4, 2016 at 5:49 PM, Johannes Berg <johannes@sipsoluti > > > ons. > > > net> wrote: > > > > On Thu, 2016-02-04 at 12:32 +0100, Michal Kazior wrote: > > > > > > > > > > ip netns add ns1 > > > > > ip netns exec ns1 bash # get the PID in the session and > > > > > don't > > > > > close > > > > > it > > > > > iw phy phyX set netns $pid_of_that_shell > > > > > > > > > > > > > If you also have a recent enough iw version, you can use > > > > > > > > iw phy phyX set netns name ns1 > > > > > > > My iw has this option, but it throws an error. > > > Does this command have any prerequisites? > > > > > > # iw phy phy1 set netns name ns1 > > > Invalid parameter: nsname(name) > > > > > > > This happens if the ns1 doesn't exist. > ok, so we need latest iprotue2 to create the > namespace? for this way to work, yes. you could hack your own C program to do the required unshare() call and exec bash and then use the PID ... I used to have one but can't find it now. johannes ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2016-02-04 13:38 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-02-04 11:22 mac80211_hwsim + iperf + netns Krishna Chaitanya 2016-02-04 11:32 ` Michal Kazior 2016-02-04 11:49 ` Krishna Chaitanya 2016-02-04 11:53 ` Michal Kazior 2016-02-04 12:27 ` Krishna Chaitanya 2016-02-04 12:46 ` Krishna Chaitanya 2016-02-04 12:51 ` Michal Kazior 2016-02-04 13:38 ` Krishna Chaitanya 2016-02-04 12:19 ` Johannes Berg 2016-02-04 12:28 ` Krishna Chaitanya 2016-02-04 12:35 ` Johannes Berg 2016-02-04 12:43 ` Krishna Chaitanya 2016-02-04 12:51 ` Johannes Berg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).