3

I have problem with adding a phyisical ethernet interface to a predefined namespace , adding that to interfaces file in pre-up/post-up event do not work. It adds eth to namespace, but ip address and LOWER_UP state never appear. Removing namespace in down event doesnt work either, making restart of networking service impractical: it flags it as failed if namespace already exist, in result interface never comes to "up" state.

auto lo
iface lo inet loopback

#description of other interfaces

auto eth2
iface eth2 inet static
    address 196.10.10.200
    network 196.10.10.0
    gateway 196.10.10.100
    netmask 255.255.255.0
    pre-up ip netns add mynetns
    pre-up ip link set eth2 netns mynetns
    down ip netns delete mynetns

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.