2

I having troubles to setup an IPv6 multicast server with Ubuntu 14.04, the server fails with Invalid argument when try to bind to IPv6 multicast address, checked with mcfirst tool and got the same error.

mcfirst -6 ff01::1:1 10000
bind [multicast]: Invalid argument
errno=22

This worked perfectly with Ubuntu 12.04

mcfirst -6 ff01::1:1 10000
mcfirst joined (*,G) = (*,ff01::1:1)

Edit: 1 (Ifconfig output)

eth0      Link encap:Ethernet  HWaddr 00:0c:29:53:a1:fb  
          inet addr:192.168.50.5  Bcast:192.168.50.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe53:a1fb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22424 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11825 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:29238784 (29.2 MB)  TX bytes:1061497 (1.0 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1838133 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1838133 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1026295857 (1.0 GB)  TX bytes:1026295857 (1.0 GB)

Edit: 2 (ip addr) output

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:53:a1:fb brd ff:ff:ff:ff:ff:ff
    inet 192.168.50.5/24 brd 192.168.50.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe53:a1fb/64 scope link 
       valid_lft forever preferred_lft forever
  • Is IPv6 actually enabled on the server? – Michael Hampton Apr 22 '14 at 16:10
  • Yes it is, I have done some more testing and it works perfectly when using multicast address "FF05:0:0:0:0:0:0:2" (Site-Local Scope Multicast Addresses) not sure what is wrong with using ff01::1:1 (Node-Local Scope Multicast Addresses) iana.org/assignments/ipv6-multicast-addresses/… – José Apr 22 '14 at 16:27
3

The kernel expect a scope identifier when binding an IPv6 Link local address, a multicast link local address or a multicast node local address to an IPv6 socket.

The syntax for these is e.g. ff01::1:1%eth0. Make sure that your applications support them correctly. This syntax is supported by getaddressinfo(), so applications that are correctly written should have nothing to do.


This behavior was not present in kernel versions below 3.10, which apparently didn't handle node-local multicast properly. See the actual kernel patch that enforces this and the function definition of __ipv6_addr_needs_scope_id.

| improve this answer | |
  • any idea why this worked with 12.04, some kernel change? – José Apr 22 '14 at 20:09
  • @José: Edited the answer. – BatchyX Apr 23 '14 at 19:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.