Re: How to move wpan interface to another interface?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 05/10/2016 12:57 AM, Guangyu Pei wrote:
> Hi,
> 
> Command “ip link set wpan0 netns pid” returns “RTNETLINK answers: Invalid argument”. For 802.11, we have “iw phy phy1 set netns pid”. But for iwpan, it seems that there is no such option. I need to run some experiments with fakelb driver and hope that I can move wpan devices to different network namespaces.
> 
> Would you please let me know whether there is a workaround or I miss anything?
> 

Netns support doesn't exist mainline now, but I have patches.

I created them where bluetooth-next was behind net-next for netlink u64
pad patches. I need to clean them up and send them mainline.

kernel:

https://github.com/linux-wpan/linux-wpan-next/commits/netns

wpan-tools:

https://github.com/linux-wpan/wpan-tools/commits/netns

the hwsim starting script from website (updated):

---

#!/bin/sh

# we need some Private Area Network ID
panid="0xbeef"
# number of nodes
numnodes=6

# include the kernel module for a fake node, tell it to create six
# nodes
modprobe fakelb numlbs=$numnodes

# initialize all the nodes
for i in $(seq 0 `expr $numnodes - 1`);
do
	ip netns delete wpan${i}
	ip netns add wpan${i}
	PHYNUM=`iwpan dev | grep -B 1 wpan${i} | sed -ne '1 s/phy#\([0-9]\)/\1/p'`
	iwpan phy${PHYNUM} set netns name wpan${i}

	ip netns exec wpan${i} iwpan dev wpan${i} set pan_id 0xbeef
	ip netns exec wpan${i} ip link add link wpan${i} name lowpan${i} type lowpan
	ip netns exec wpan${i} ip link set wpan${i} up
	ip netns exec wpan${i} ip link set lowpan${i} up
done

---

creates 6 phys and 6 wpan interfaces with a lowpan interface, each
of them in his own net namespace.

btw: I want to mark fakelb deprecated and add a new implementation of
fakelb with the name "mac802154_hwsim", I hate it when I told about the
"fakelb" driver and wireless people told me "do you know hwsim...". It's
simple the same stuff but somebody named the stuff completely different
which makes no sense.

I also don't know if we really should add the netns support flag for
wpan-phy's. This is for HardMAC transceivers only, there exists one
outside but we currently support SoftMAC transceivers currently only.
:-)

I hope I could help you and now I try to bring these patches mainline
since already people want to do experiment like me which is great!

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux