NetworkMulticastNotes - henk52/knowledgesharing GitHub Wiki
Network multicast notes
Virtual bridge
- https://goyalankit.com/blog/linux-bridge
- https://troglobit.com/howto/multicast/
- https://wiki.aalto.fi/download/attachments/70789083/linux_bridging_final.pdf
- brctl addbr br1
- brctl addif br0 veth0
mrouted
Testing mrouted
- sudo ./mrouted --foreground --loglevel=info
- ./mcjoin -s
- ./mcjoin
- sudo mroutectl show igmp groups
- '^C' the client to get how packages where received
It seem like running mcjoin server and client on the same machine without mrouted works.
See alpine notes to see how to build mcjoin on alpine
Mrouted
- sudo -i
- echo 96 > /proc/sys/net/ipv4/igmp_max_memberships
Docker and multicasting
- https://github.com/moby/moby/blob/d3ff00948fe28e40cd876159b92a3026c15d1f2c/docs/sources/articles/networking.md
- https://docs.docker.com/network/bridge/
- http://blog.thestateofme.com/2014/06/08/connecting-docker-containers-between-vms-with-vxlan/
- https://man7.org/linux/man-pages/man4/veth.4.html
Test 1 - std docker0 bridge
- Test 1
- container1 on docker0
- container2 on docker0 : yes
- host client: no
- wireshark of docker0 : yes
Test 2 - Linux std bridge
- sudo brctl addbr bridge0
- sudo ip addr add 192.168.5.1/24 dev bridge0
- sudo ip link set dev bridge0 up
- ip addr show bridge0
- docker run -it --net=none multicast sh
- docker ps
- ./fix_network.sh ecstatic_diffie
- Test 2
- container1 on bridge0
- container1 on bridge0 : not run
- host client: no
- wireshark of bridge0 : yes
- mrouted can see container2 join: yes
test 3 - peer connection between two bridges
requires test2 set-up as well
- sudo brctl addbr bridge1
- sudo ip addr add 192.168.55.1/24 dev bridge1
- sudo ip link set dev bridge1 up
- ip addr show bridge1
- docker run -it --net=none multicast sh
- docker ps
- ./fix_network.sh ecstatic_diffie
- Test 3
- container1 on bridge5
- container2 on bridge55 : no
- host client: no
- wireshark of bridge5 : yes
- wireshark of bridge55 : no
- ping container1 to container2: yes
Test 4 - peer-link the bridges
Start test 3
- sudo ip link add X5 type veth peer name X55
- sudo brctl addif bridge5 X5
- sudo ip link set X5 up
- sudo brctl addif bridge55 X55
- sudo ip link set X55 up
Ohter
Troubleshooting
Troubleshooting mrouted
mrouted warning - Cannot join group 224.0.0.4 on interface 10.1.1.254: No buffer space available
Fix: sudo sysctl -w net.ipv4.igmp_max_memberships=60
sudo mrouted -f
mrouted: 06:50:32.883 warning - Cannot join group 224.0.0.4 on interface 10.1.1.254: No buffer space available
mrouted: 06:50:32.883 warning - Cannot join group 224.0.0.2 on interface 10.1.2.254: No buffer space available
mrouted: 06:50:32.883 warning - Cannot join group 224.0.0.4 on interface 10.1.3.254: No buffer space available
mrouted: 06:50:32.883 warning - Cannot join group 224.0.0.2 on interface 10.1.4.254: No buffer space available
mrouted: 06:56:38.500 warning - too many vifs, ignoring catapultb1.26
See: https://github.com/troglobit/pimd/issues/39
sudo mrouted -r
/usr/src/linux-headers-4.15.0-99/include/uapi/linux/mroute.h:#define MAXVIFS
mrouted repo: ./src/config.c
/*
* If there is room in the uvifs array, install this interface.
*/
if (numvifs == MAXVIFS) {
logit(LOG_WARNING, 0, "too many vifs, ignoring %s", ifa->ifa_name);
continue;
}
mrouted.conf: Invalid interface name br1 near line 1
mrouted warning - ignoring vnic0, same subnet as docker0
mrouted: 08:53:40.989 warning - ignoring vnic0, same subnet as docker0
mrouted: 08:53:40.989 warning - ignoring vnic1, same subnet as docker0
mrouted: 08:53:40.989 warning - mrouted.conf:2: phyint vnic1 not available, continuing ...
mrouted: 08:53:40.989 Cannot forward: only one enabled vif
no phyint
phyint vnic1 enable
phyint enp0s31f6 enable