Reputation: 3349
I am trying to write the same Ping-Pong Multicast-Example on Twisted-Example-Page. Though the Example works on IPv4 addresses for multicast-group, I replaced the line
self.transport.joinGroup("228.0.0.5")
with
self.transport.joinGroup("ff02::1")
which is the link-local IPv6 address so the clients with addresses fe80::
can receive the multicast message.
This does not work though the error received is such:
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
Failure: twisted.internet.error.DNSLookupError: DNS lookup failed:
address 'ff02::1' not found: [Errno -9] Address family for hostname not supported.
I have been looking around the API Reference but don't seem to get a proper way to execute this.
This is what I get for cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 testbed
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Any help would be great thanks.
I was using the debian package which was version 13.2 and now have updated to 16.0 but this problem still exists.
Upvotes: 2
Views: 314
Reputation: 3349
Okay so apparently there is still work in progress for assigning IPv6 addresses when using the self.transport.joinGroup()
.
Hence this will not work
self.transport.joinGroup('ff02::1')
nor will this
self.transport.joinGroup('ff02:0000:0000:0000:0000:0000:0000:0001')
One could always go back to basic socket programming in Python where the works get done with IPv6 multicast on both real networks and also on the computer. For the code please check this Link
Upvotes: 1