Is it possible to create veth pair and move one end to namespace in one call?

14 views
Skip to first unread message

Sławek Kapłoński

unread,
Mar 13, 2018, 6:22:31 AM3/13/18
to pyroute2-dev
Hi,

I'm currently working on adoption of pyroute2 in Openstack Neutron and I found problem which I described already in https://github.com/svinota/pyroute2/issues/463
But maybe someone of You know if it is possible to do with pyroute2 already?

Antoni Segura Puimedon

unread,
Mar 13, 2018, 8:57:41 AM3/13/18
to Sławek Kapłoński, pyroute2-dev
Somehow it does not happen for me. If I use the command:

udo ip link add tap type veth peer eth0 netns
test-e40d1523-d29b-413e-bfff-91bf32dd042a


the veth peer inside the ns is not named "eth0" as expected:

celebdor@s21 ~ $ sudo ip netns exec
test-e40d1523-d29b-413e-bfff-91bf32dd042a ip l
1: lo: <LOOPBACK> mtu 65536 qdisc noop state DOWN mode DEFAULT group
default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
6: veth0@if51: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
mode DEFAULT group default qlen 1000
link/ether 7a:a0:05:c4:53:39 brd ff:ff:ff:ff:ff:ff link-netnsid 0
9: veth1@if54: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
mode DEFAULT group default qlen 1000
link/ether 82:98:7b:b0:b1:6b brd ff:ff:ff:ff:ff:ff link-netnsid 0
> --
> 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,
Mar 13, 2018, 9:47:47 AM3/13/18
to Antoni Segura Puimedon, Sławek Kapłoński, pyroute2-dev
Ok, I got that. No, it's not done right now, but if it's possible with the netlink, I'll do that. Give me some time, pls.


> For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.

Sławek Kapłoński

unread,
Mar 13, 2018, 9:58:38 AM3/13/18
to pyroute2-dev
Sure. Thanks a lot for Your response. I will wait for any update.
I don't know very deeply pyroute2 library but if You could give me some tips where I should start looking into this, I can try to do it by self maybe and push PR to pyroute2 repo :) 

> For more options, visit https://groups.google.com/d/optout.

--
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.
Reply all
Reply to author
Forward
0 new messages