> Hi there,
> is there anyone who can suggest me how to fix this problem?
> I've just tried to implement a client that send datagrams to a multicast
> address
> (224.0.0.11).
> Basically the source code you find below it's a function that creates a
> socket and set IP_MULTICAST_IF flag at the IP level of the socket.
> When a try to run it I get the following message:
> "initsocketss(): setsockopt IP_MULTICAST_IF failed: Cannot assign
> requested address"
> I read some messages in the newsgroup about people having the same
> problem, but I didn't find any answer.
> Other steps that I followed were:
> > ifconfig [bla .. bla ..] multicast
> > route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
>
> I'm using Linux Red Had 2.0.31
> Do you have any idea about what I missed !?
> Thanx a lot.
So what does your ifconfig report? Mine reports flags as follows:
UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1
Is your kernel multicast-enabled? If not, you will have to rebuild it:
CONFIG_IP_MULTICAST=y
If your machine has 2 network cards and you want mcast groups on
either side, you should also set:
CONFIG_IP_MROUTE=y
...but I could never get this to work properly, at least on 2.0.30 :-(
(Although I posted to this group at the time, I got no response. AFAIR
my problem was that packets originating at the host were only sent out
on one side although both sides contained group members. Forwarding
between the sides worked fine.)
--Steve
Stephen Crane, Dept of Computing, Imperial College of Science, Technology and
Medicine, 180 Queen's Gate, London sw7 2bz, UK:jsc@{doc.ic.ac.uk, icdoc.uucp}