Skip to content

Instantly share code, notes, and snippets.

@karampok
Last active October 4, 2022 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karampok/c3121c1659265910f95462fe6dd45354 to your computer and use it in GitHub Desktop.
Save karampok/c3121c1659265910f95462fe6dd45354 to your computer and use it in GitHub Desktop.
ipv6-ping-linklocal-bridge
# setup
ip netns add radio
ip netns add ocp
ip link add veth1 netns radio type veth peer name veth2 netns ocp
# First network namespace == radio
ip netns exec radio bash
ip link set dev veth1 up
veth1@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 6e:90:92:21:48:c2 brd ff:ff:ff:ff:ff:ff link-netns ocp
inet6 fe80::6c90:92ff:fe21:48c2/64 scope link
# Second networknamespace == OCP
ip netns exec ocp bash
ip link set dev veth2 up
veth2@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether fa:d7:8e:31:41:58 brd ff:ff:ff:ff:ff:ff link-netns radio
inet6 fe80::f8d7:8eff:fe31:4158/64 scope link
valid_lft forever preferred_lft forever
ping6 fe80::6c90:92ff:fe21:48c2%veth2 // through veth2 works
# set up the bridge in OCP namespace (like br-ex)
ip link add name br0 type bridge
ip link set dev br0 up
ip link set dev veth2 master br0 // here ping through veth2 stops but LL address remain
veth2@if2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP group default qlen 1000
link/ether fa:d7:8e:31:41:58 brd ff:ff:ff:ff:ff:ff link-netns radio
inet6 fe80::f8d7:8eff:fe31:4158/64 scope link
valid_lft forever preferred_lft forever
br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether fa:d7:8e:31:41:58 brd ff:ff:ff:ff:ff:ff
inet6 fe80::d8c2:f4ff:fe0c:ff86/64 scope link
valid_lft forever preferred_lft forever
ip netns exec ocp ping6 fe80::6c90:92ff:fe21:48c2%br0 //now it works through the br0 (== br-ex in real setup)_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment