LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2011, 08:49 PM   #1
miracles
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Rep: Reputation: 0
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.

Last edited by miracles; 03-09-2011 at 08:52 PM.
 
Old 03-09-2011, 09:01 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Technically you don't want to so you don't have as much packet loss.
 
1 members found this post helpful.
Old 03-09-2011, 09:30 PM   #3
miracles
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Original Poster
Rep: Reputation: 0
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.

Last edited by miracles; 03-09-2011 at 09:33 PM.
 
Old 03-09-2011, 09:46 PM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Gotcha. It's all about timing...

Are you using TCP or UDP?
 
Old 03-09-2011, 09:47 PM   #5
miracles
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Original Poster
Rep: Reputation: 0
I am using TCP.
 
Old 03-09-2011, 09:54 PM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
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
 
Old 03-09-2011, 10:00 PM   #7
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
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.
 
Old 03-09-2011, 10:35 PM   #8
miracles
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 03-09-2011, 11:08 PM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
What exactly do you mean?
 
Old 03-10-2011, 12:26 AM   #10
miracles
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 03-10-2011, 12:48 AM   #11
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
It might. What kind of hardware are you working with?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC disconnect immediately after correct login... tripleseven Linux - Server 4 01-03-2012 04:33 AM
How do i make linux-ppp reconnect on disconnect? (pptp) Timtastic Linux - Networking 1 11-29-2010 03:32 PM
How do I manually disconnect/reconnect DHCP DSL internet connection? chaz_bro1972 Linux - Networking 34 06-06-2008 02:17 AM
Mount / unmount / ejecting CD/DVD makes LAN disconnect & reconnect...! GrapefruiTgirl Slackware 9 03-06-2007 11:48 PM
dialup disconnect immediately alma SUSE / openSUSE 6 11-04-2005 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration