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. |
Technically you don't want to so you don't have as much packet loss.
|
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. |
Gotcha. It's all about timing...
Are you using TCP or UDP? |
I am using TCP.
|
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 |
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.
|
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. |
What exactly do you mean?
|
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. |
It might. What kind of hardware are you working with?
|
All times are GMT -5. The time now is 06:34 PM. |