Re: Multiple broadcasts
From: Zuka (askme_at_formyemail.com)
Date: 02/26/04
- Next message: Mohit Talwar [MSFT]: "Re: deleting route on Windows 2003 machine"
- Previous message: brylki: "Windows Registry - Incoming Data?"
- In reply to: Alan J. McFarlane: "Re: Multiple broadcasts"
- Next in thread: Alan J. McFarlane: "Re: Multiple broadcasts"
- Reply: Alan J. McFarlane: "Re: Multiple broadcasts"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Feb 2004 00:30:27 +0100
This doesn't sound right to me.
If you send to 255.255.255.255, wouldn't that cover all networks ?
If you send to 192.168.0.255, that should broadcast on the particular net
adapter that is configured with IP on 192.168.0.* network, right ?
"Alan J. McFarlane" <alanjmcf@yahoo.com.INVALID> wrote in message
news:kqTYb.1242$1h7.9795@newsfep4-glfd.server.ntli.net...
> Arkady Frenkel <arkadyf@hotmailxdotxcom> wrote:
> > "Christoffer Bergman" <christoffer.bergman@audiodev.com> wrote in
> > message news:82C75297-08D9-4573-8B50- F535E504111F@microsoft.com...
> >> I want to make a broadcast on my subnet, and I have written it like
> >> this:
> [...]
> >> The question is, will this be broadcasted on all my network cards,
> >> or just one of them? I read an article that said that there are no
> >> standard here. According to
> >> that article, BSD had implemented broadcast so that it was
> >> only boadcasted on the first available network card.
> >> How does it work for Windows?
>
> I'm pretty sure that's a broadcast is only sent on one interface in
Windows.
> I don't know where exactly the stack came from (or how), but it behaves a
> lot like the BSD one.
>
>
> >> If it is only broadcasted on the first network card, how do I make it
> >> broadcast on ALL available cards in the computer?
> >>
>
> When using broadcast, bind a socket to each local IP Address (maybe also
> checking whether any of the addresses are on the same interface) and send
> each packet out of each.
>
> > I think ( never try that ) that broadcast will be send from adapter
> > which have lowest metric ( or first if equal ) in route table.
> > If my proposition correct , you can change ( increase ) after send
> > that metric on adapter you just send and try next time , it have to
> > be sent from next one. Try and tell us the results.
> >
> And change the routing of all other traffic (unicast etc) too? Yikes!
>
> See my discoveries on how the interface to send a multicast packet on is
> chosen, at
>
http://groups.google.co.uk/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=
0BDia.1372%240i4.7501%40newsfep4-glfd.server.ntli.net ,
> broadcast might behave something the same... However there's apparently
> only ever one 255.255.255.255 route in the table though ("route print").
I
> wonder whether this is all covered in Microsoft's tcpip2000.doc.
>
>
> By the way, there are only a few good reason today to use broadcast rather
> than multicast. One possiblity is if you are communicating with some
> embedded device with a very slim TCP/IP stack that doesn't implement
> multicast receive (but does do broadcast). As well as all the good
reasons
> to use multicast for its effect on the network etc (network load, CPU
load,
> for future upgrade to IPv6, ability to scale off the local segments in the
> future if required) the programming of each is similar in scale. Though
> you've already written the broadcast code. :-)
>
> * Broadcast:
> ** sender:
> setsockopt(SO_BROADCAST)
> sendto(255.255.255.255)
> ** receiver:
> setsockopt(SO_BROADCAST) -- If KB197511/KB154460 are to be believed.
> recvfrom()
>
> * Multicast
> ** sender:
> sendto(239.255.yy.zz etc)
> ** receiver:
> setsockopt(IP_ADD_MEMBERSHIP <same group address>)
> recfrom() etc
> --
> Alan J. McFarlane
> http://homepage.ntlworld.com/alanjmcf/
> Please follow-up in the newsgroup for the benefit of all.
>
>
- Next message: Mohit Talwar [MSFT]: "Re: deleting route on Windows 2003 machine"
- Previous message: brylki: "Windows Registry - Incoming Data?"
- In reply to: Alan J. McFarlane: "Re: Multiple broadcasts"
- Next in thread: Alan J. McFarlane: "Re: Multiple broadcasts"
- Reply: Alan J. McFarlane: "Re: Multiple broadcasts"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|