LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No network packets sent immediately after quick physical disconnect and reconnect (https://www.linuxquestions.org/questions/linux-newbie-8/no-network-packets-sent-immediately-after-quick-physical-disconnect-and-reconnect-867586/)

miracles 03-09-2011 07:49 PM

No network packets sent immediately after quick physical disconnect and reconnect
 
Hi,I am using tcp for data transmission between 2pcs running linux.During transmission, I have noticed that if I unplug the network cable and reinsert it quickly,connection is not lost(same as i expect)and the sender start to resend the packet after 5s(what i expect is that network packets sent immediately after quick physical disconnect and reconnect).My question is can i reduce 5s to 0s(resend immediately after network cable reconnect)?Any parameters(tcp rto,txqueuelength,..) can be modified to achieve this condition?

Thanks.

corp769 03-09-2011 08:01 PM

Technically you don't want to so you don't have as much packet loss.

miracles 03-09-2011 08:30 PM

Yes,actually it is one of project requirements.We would like to show trarffic jam during data transmission.So our expected condition is when we disconnect the network cable for 1s the receiver dispaly will be slow down and after reconnect the cable, transmission will continue as before.But if the interval time between stop sending & resending time takes 5s,we have to prebuffer the huge amount of data in receiver side and the traffic jam testing may not be obviously observed during data transmission.Any solution to achieve this condition?

Thanks.

corp769 03-09-2011 08:46 PM

Gotcha. It's all about timing...

Are you using TCP or UDP?

miracles 03-09-2011 08:47 PM

I am using TCP.

corp769 03-09-2011 08:54 PM

The most feasible way to me would be to change your TCP retransmission timeout settings. Unlike other network settings, you can not change this within /proc/sys/net. You would need to change TCP_RTO_MAX within your kernel.

Hope that helps man.

Josh

corp769 03-09-2011 09:00 PM

To add to my previous post - It should be in include/net/tcp.h. I am not talking about user-space; this would be within the kernel source directory.

miracles 03-09-2011 09:35 PM

Thanks for your reply.One more question:this kind of condition(quick physical disconnect and reconnect between swiches) has any relationship with network switch performance between sender & receiver?

Thaks again.

corp769 03-09-2011 10:08 PM

What exactly do you mean?

miracles 03-09-2011 11:26 PM

I mean can I reduce the interval time between stop sending & resending time(5s) by using the better performance network switch between sender & receiver?switch is independent with my testing,isn't it?

Note:My testing environment is sender-switch-switch-receiver (connecting via network cable).I physically disconnect and reconnect the network cable between 2switches.

Sorry if my question make confused you.As I am newbie in linux networking,I may not know how to present my problem in professional way.


Thanks.

corp769 03-09-2011 11:48 PM

It might. What kind of hardware are you working with?


All times are GMT -5. The time now is 06:34 PM.