LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-31-2013, 10:13 PM   #1
villandra
LQ Newbie
 
Registered: Mar 2013
Posts: 4

Rep: Reputation: Disabled
How do you reset internet connection in Linux?


My housemate has Linux. Today I unplugged his ethernet cable from the household router and plugged it directly into the modem, before shutting down all other computer equipment and leaving the house for the day. Severe storms were expected. The cable company owns the modem and readily replaces it, but I own the router.

My housemate promptly lost his internet connection for the day. His connection was restored when I plugged his cable back into the router, connected the router to the modem, and booted up the router.

I've done the same thing before and he did not lose his internet connection. I don't know if I rebooted the modem. It's the only thing that would have happened different.

Whenever I unplug my Windows computer from the router and connect the ethernet cable directly to the modem, the internet connection won't work until I enter the Netshell command in a command prompt window. It is unclear whether Roadrunner ISP deliberately corrupts your TCP/ IP stack to prevent connecting computers to their network, or the router does that, though I've had the problem with more than one brand of router.

Is there a similar procedure for Linux?

I've searched on the Internet, and found convoluted and seemingly nonresponsive theories, answers that pertain to something different, and answers that pertain to some different operating system like Ubantu. I've seen advanced discussions about what some OTHER procedure is.

The only thing that will make sense to me is the simple command or commands to reset TCP in Linux.

The solution must NOT reset all of my housemate's OTHER computer settings or whatever to their default whatever. ONLY the Internet connection.

Thank you.

Yours,
Dora
 
Old 04-01-2013, 12:14 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,613

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
Quote:
The solution must NOT reset all of my housemate's OTHER computer settings or whatever to their default whatever. ONLY the Internet connection.
If you mean the TCP connection within one system there are many ways of doing that:

1. Manipulating it from the scripts /etc/rc.d/init.d (whatever is found therein) just look for something like "networkmanager" or "inet", cd into that folder (must be root user) then enter that script as command, e. g.--
Code:
--# cd /etc/init.d
--# networkmanager force-restart
you can examine what semantic your script is using by
Code:
--# cat "scriptname"
then look for some loop header like "start", "restart", "reload", or "force-restart".

2. Manipulating it from the ifconfig command may do sometimes--
Code:
--# ifconfig eth0 down
--# ifconfig eth0 up
the IP connection will stop and then try to reconnect. If your interface is named "eth1" or another you many use it accordingly. You will find out what name it uses by querying the interface:
Code:
--# ifconfig -a
3. Manipulating it from the level scripts (this is quite an overkill and longer process, however this will sure render the same service you needed. Under most Gnu/Linux the network daemon initiates at runlevel 3, so you can pass across that level by switching to 1 and 4 (or 5 whatever your system uses).
Code:
--# init 1 <Enter> 
(this shuts down the X and network processes and enters single user mode, you login as root there and from there issue the following similar command)
Code:
--# init 4 <Enter> 
(this returns to X login with fresh network and TCP/IP connections)
4. Manipulating it from the process
Code:
--# ps axu | grep inetd 
(get the process ID # of the inetd)
--# kill HUP xxxx
(xxxx is the process ID number; Note: I believe this only tends to redefine the connection without altering anything from the interface so this may not give you what you wanted as far as I understood from above, but you may try, there's no harm.)
,
/*The following shall affect all other systems connected to the modem. */

5. Manipulating from the ISP side. The modem provided by the ISP usually has a sunked-in button at the back of the modem for resetting. Use a ballpen point or a sharp pencil to push the button for 8 seconds then release. Note: this will re-initiate all connections using the modem.

Hope that helps.

Good luck.

Last edited by malekmustaq; 04-01-2013 at 12:22 AM.
 
Old 04-01-2013, 12:19 AM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

here I'm assuming that both the router and the modem are running standard dhcp servers (otherwise you need to provide more information about your network).

You may need to take the connection down and bring it back up again on the Linux box. The best way do this will depend on the distro that your housemate is running. It may be enough to disconnect and reconnect the ethernet cable where it plugs into the machine after you do the swap at the router/modem end.

Evo2.
 
Old 04-01-2013, 09:35 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
For some systems
Code:
service network restart
 
Old 04-01-2013, 09:58 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,929

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Welcome to LinuxQuestions.

Typically cable ISPs home service only provides one dynamic IP address based upon the MAC address of the connected device which is stored in the MODEMs memory. In order for the computer to connect to the internet when it is directly connected to the MODEM instead of the router you must cycle its (the MODEM) power. And as stated you might need to restart the linux computers network service.
 
Old 04-02-2013, 01:05 AM   #6
lucky9
Member
 
Registered: May 2004
Location: Owasso, USA
Posts: 41

Rep: Reputation: 15
Do the smart thing and buy an inexpensive surge protector. Better yet a battery backup unit.

The correct topology is, wall plug to surge protector (or battery backup) to modem to router to computers.

As far as a restart is concerned it should only take a power-down and start if everything is plugged in. Make sure that the computers are plugged into the same router port. It makes it easier sometimes.
 
Old 04-02-2013, 01:10 AM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,
Quote:
Originally Posted by lucky9 View Post
As far as a restart is concerned it should only take a power-down and start if everything is plugged in.
WTF?! Rebooting may be the answer to most questions in the windows world, but the OP is looking for a real answer.

Evo2.
 
  


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
Install ruby gems - connection reset, connection reset..... deco81 Linux - Software 1 06-16-2010 05:47 PM
Internet connection problem under Linux - "Connection Reset" scmbg Linux - Networking 1 02-25-2010 12:44 PM
Help me.... why Connection reset by peer Connection to medusa closed. Cabellos-Quiroz-JL Linux - Newbie 1 06-04-2009 01:58 PM
eth0 going down (connection reset by peer, then connection refused) Astarath Slackware 1 09-05-2007 06:14 AM


All times are GMT -5. The time now is 01:17 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