While attempting to examine the plumbing of OpenStack Neutron networking you can find yourself with horribly long commands along the lines of…
# ip netns exec qdhcp-e4ea15c9-8597-4f0b-a3eb-81a74a402a24 ip addr # ip netns exec qdhcp-e4ea15c9-8597-4f0b-a3eb-81a74a402a24 ip route
Save yourself a little sanity, and use the trick recommended by Open Cloud Blog. Simply launch a shell in that namespace, and the results of subsequent commands while be scoped to that namespace.
# ip netns exec qdhcp-e4ea15c9-8597-4f0b-a3eb-81a74a402a24 bash # ip addr # ip route # exit
Just type ‘exit’ to back out.