Networking Forums

Networking Forums > Computer Networking > Linux Networking > help on broadcast data lost in linux tcp/ip stack

Reply
Thread Tools Display Modes

help on broadcast data lost in linux tcp/ip stack

 
 
Zhang Huan
Guest
Posts: n/a

 
      04-27-2006, 03:44 AM
i have a server, which broadcast data to a client. in the client,
there're two processes waiting on the same port, with SO_REUSEADDR set,
receiving the data comes from server. everytime one client send a
request to the server, it broadcasts at the most 128KB data. after the
client has received all the data, it sends the next request.

the two machine are equiped with gigabit ethernet, 1GB memory and
1.6GHz P4. the client's receiving buffer is set to 20MB by
setsockopt(), i think it 's large enough.


what happens strangely is (somtines) when one process successfully
receives the packet, but the anoter not. and the value of InErrors in
/proc/net/snmp increasing greatly everytime the processes are run.

i have google the related question, some one said that, packet will
loss intra-stack. is there some method to handle this.

thanks in advance.

 
Reply With Quote
 
 
 
 
Maxim Yegorushkin
Guest
Posts: n/a

 
      04-27-2006, 07:50 AM

Zhang Huan wrote:
> i have a server, which broadcast data to a client. in the client,
> there're two processes waiting on the same port,


Port identifies a process. Only one process is ever likely to receive
data for the same port.

> with SO_REUSEADDR set,


You misunderstand the purpose of SO_REUSEADDR. It is intended for TCP
servers doing active close only. Read man ip(7).

 
Reply With Quote
 
Zhang Huan
Guest
Posts: n/a

 
      04-27-2006, 08:04 AM

Maxim Yegorushkin wrote:
> Zhang Huan wrote:
> > i have a server, which broadcast data to a client. in the client,
> > there're two processes waiting on the same port,

>
> Port identifies a process. Only one process is ever likely to receive
> data for the same port.

yes, but not for broadcast or multicast packets, see the kernel code
udp_rcv() in net/ip4/udp.c

>
> > with SO_REUSEADDR set,

>
> You misunderstand the purpose of SO_REUSEADDR. It is intended for TCP
> servers doing active close only. Read man ip(7).


it is also intended for UDP with broadcasting or multicasting.

 
Reply With Quote
 
Maxim Yegorushkin
Guest
Posts: n/a

 
      04-27-2006, 11:25 AM

Zhang Huan wrote:
> Maxim Yegorushkin wrote:
> > Zhang Huan wrote:
> > > i have a server, which broadcast data to a client. in the client,
> > > there're two processes waiting on the same port,

> >
> > Port identifies a process. Only one process is ever likely to receive
> > data for the same port.

> yes, but not for broadcast or multicast packets, see the kernel code
> udp_rcv() in net/ip4/udp.c


Sorry, my mistake.

> > > with SO_REUSEADDR set,

> >
> > You misunderstand the purpose of SO_REUSEADDR. It is intended for TCP
> > servers doing active close only. Read man ip(7).

>
> it is also intended for UDP with broadcasting or multicasting.


Could you point me to the source of this information?

 
Reply With Quote
 
Zhang Huan
Guest
Posts: n/a

 
      04-27-2006, 12:10 PM
see UNIX.Network.Programming.Volume1 3rd edition

chapter 7.5 generic socket options

 
Reply With Quote
 
Maxim Yegorushkin
Guest
Posts: n/a

 
      04-27-2006, 02:18 PM

Zhang Huan wrote:
> see UNIX.Network.Programming.Volume1 3rd edition
>
> chapter 7.5 generic socket options


Thank you, it describes it indeed.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSID broadcast disabled - wireless connection lost GWK Wireless Internet 3 08-22-2007 05:45 AM
Any Documentaion about How Linux Networking IP stack looklike between Linux PC (single NIC card) and Router with multiple Network interfaces (LAN and WAN)? santa19992000@yahoo.com Linux Networking 0 02-11-2007 09:19 PM
Question on broadcast data encryption using WPA sec123 Wireless Internet 3 09-19-2005 06:59 PM
How to tell an application to use a custom tcp/ip stack instead of tcp/ip stack from linux? CDP Linux Networking 18 07-06-2005 01:45 PM
how to remove atcp/ip stack and add a third party stack in linux RajaSekhar.Kavuri Linux Networking 1 03-22-2005 06:30 PM



1 2 3 4 5 6 7 8 9 10 11