I am just learning networking, Pardon if my question does not give all details, I can provide if needed.
I am trying to learn network namespaces in Linux.
I have created two namespaces red
and blue
ip netns
blue (id: 1)
red (id: 0)
I have also created a bridge interface and attached veth one end on namespace and one end on brdige interface as follows
ip link add v-net-0 type bridge
ip link set dev v-net-0 up
ip link add veth-red type veth peer name veth-red-br
ip link add veth-blue type veth peer name veth-blue-br
ip link set veth-red netns red
ip link set veth-red-br master v-net-0
ip link set veth-blue netns blue
ip link set veth-blue-br master v-net-0
The problem is that the bridge interface is not showing UP state
ip link show
18: v-net-0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT group default qlen 1000
link/ether 7a:99:f7:ca:7e:f1 brd ff:ff:ff:ff:ff:ff
19: veth-red-br@if20: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master v-net-0 state DOWN mode DEFAULT group default qlen 1000
link/ether e2:ce:34:7b:23:31 brd ff:ff:ff:ff:ff:ff link-netns red
21: veth-blue-br@if22: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master v-net-0 state DOWN mode DEFAULT group default qlen 1000
link/ether 5a:dc:4f:87:63:1a brd ff:ff:ff:ff:ff:ff link-netns blue
Link up both veth on namespaces
ip -n red link set veth-red up
ip -n blue link set veth-blue up
Also the bridge utils showing disabled state, whereas the document I am following says it should be in forwarding
state
bridge link
19: veth-red-br@if20: <BROADCAST,MULTICAST> mtu 1500 master v-net-0 state disabled priority 32 cost 2
21: veth-blue-br@if22: <BROADCAST,MULTICAST> mtu 1500 master v-net-0 state disabled priority 32 cost 2
Help appreciated. Thanks