Move WiFi interface in namespace

20 views
Skip to first unread message

Tobias Eckl

unread,
Jul 25, 2018, 8:10:14 AM7/25/18
to pyroute2-dev
Hi all,

I managed to move ethernet interfaces from the root namespace to another namespace via.

db_root=IPDB()
with db_root.interfaces["name"] as eth:
    eth.net_ns_fd = "test"

Unfortunately this doesn't work with wireless interfaces.
I already found out that in order to move a wifi interface I have to move the corresponding PHY into the namespace.

Is there a way to achieve this using the pyroute2 package?

Best regards,
Tobias

Peter Saveliev

unread,
Jul 26, 2018, 5:27:14 AM7/26/18
to Tobias Eckl, pyroute2-dev
I didn't try yet, so I have to test, but I believe one can move a WiFi PHY in a netns in the same way as any other interface.

I'll try tonight, we'll see.

--
You received this message because you are subscribed to the Google Groups "pyroute2-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyroute2-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Saveliev

unread,
Jul 27, 2018, 4:21:45 AM7/27/18
to eckl....@gmail.com, pyroute2-dev
Yep, I've got the problem. To move a wifi interface now one should use the IW class, but one has to create the request manually, and it's a bit complicated.

Give me some time to make a decent wrapper for that functionality.

st 25. 7. 2018 v 14:10 odesílatel Tobias Eckl <eckl....@gmail.com> napsal:
--
Reply all
Reply to author
Forward
0 new messages