Score:1

Unable to make bridge interface UP state

mg flag

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

pt flag
You are never calling `ip link set <device> up` for your veth links.
Raheel avatar
mg flag
it get missed from the question, But I am calling it
Raheel avatar
mg flag
updated my question
pt flag
You're still not setting `veth-red-br` and `veth-blue-br` `up`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.