LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-18-2004, 03:56 AM   #1
firedance
Member
 
Registered: Dec 2003
Location: Sweden
Distribution: Arch Linux
Posts: 65

Rep: Reputation: 15
Reconnect after dissconnect


when my linux box gets dissconnected from the router (the router closes the connection some times) it wont reconnect. ... how can i make it reconnect automaticly?
I searched google but i didnt find anything(maby just my non-good searching skills) and in the forum there seemed to be quite alike questions with no answers...
 
Old 04-18-2004, 04:35 AM   #2
chris78
LQ Newbie
 
Registered: Mar 2004
Location: germany
Distribution: Slackware & RedHat
Posts: 28

Rep: Reputation: 15
That depends on what your connection to the router is and why it gets cut off ?

Did you consider a firmware update if your router supports that ?
 
Old 04-18-2004, 05:00 AM   #3
firedance
Member
 
Registered: Dec 2003
Location: Sweden
Distribution: Arch Linux
Posts: 65

Original Poster
Rep: Reputation: 15
It is just a cable .. im not so good with networking.. its a d-link router thet connects to our broadband. It closes the connection sometimes when a new cable is connected or some special settings are changed (we change em often...) all computers with windows reconnects but the linux box does not that.
 
Old 04-18-2004, 05:10 AM   #4
chris78
LQ Newbie
 
Registered: Mar 2004
Location: germany
Distribution: Slackware & RedHat
Posts: 28

Rep: Reputation: 15
I dont know if there is a way to detect a bad ended network device.
I guess the best you can do is set up a scipt that pings the routers ip and if it fails does a "ifconfig eth0 down && ifconfig eth0 up".

Code:
while true
  do if ping -c1 192.168.1.2
    then sleep 1
  else echo "its gone !!!"
    ifconfig eth0 down
    ifconfig eth0 up
  fi
done
I have not tested it but it worked with the echoes, so on your your own risk .
 
Old 04-18-2004, 05:26 AM   #5
firedance
Member
 
Registered: Dec 2003
Location: Sweden
Distribution: Arch Linux
Posts: 65

Original Poster
Rep: Reputation: 15
hehe =) il try that , thanks
 
  


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
pppoe reconnect problems Cloughar Linux - Networking 0 08-25-2005 03:12 AM
PPP Automatic Reconnect! How? tunasashimi Linux - Networking 1 06-14-2005 09:33 AM
Reconnect to pts/0 ihristov SUSE / openSUSE 2 01-28-2005 05:57 PM
Auto-Reconnect JC404 Linux - Newbie 3 07-01-2003 04:04 PM
squid and reconnect saavik Linux - Networking 1 11-21-2001 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:03 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
Open Source Consulting | Domain Registration