Results 1 to 7 of 7
Hi there,
I want to know how the network restart works. I mean when we issue a command like -
Code:
#service network restart
What exactly happened, whether the new ...
- 02-08-2012 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 44
Network restart
Hi there,
I want to know how the network restart works. I mean when we issue a command like -
What exactly happened, whether the new connections are created or the existing connections are used .Code:#service network restart
Do the existing connections get blocked or dropped.
Thanks in advance.
- 02-09-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
There are scripts that this invokes in /etc/rc.d. Which are run depends upon the current runlevel. For example, on my RHEL 6.0 system, the network start/stop/restart script for runlevel 5 (GUI login) is /etc/rc.d/rc.5/S10network. When you execute the command "service restart network" it will invoke this script with the "restart" argument. FWIW, this is just a bash shell script that you can examine at will. I have learned a lot from reading these scripts.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-09-2012 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
As for existing connections, restarting the network infrastructure WILL terminate all existing connections whether hardwired or wireless.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-09-2012 #4Just Joined!
- Join Date
- Dec 2010
- Posts
- 44
I'm a newbie to linux, and also I'm bit weak in bash scripting, if somebody explains me the underlying procedure of network start/stop/restart then it would be a great help.
Thanks.
- 02-09-2012 #5Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Each script mentioned has a section that deals with start/stop/restart commands. Each acts according to the arguments passed from the caller, the service command in this case. If you don't understand this, then either just take it at face value, or dig in and study the subject until you understand what is going on under the covers. The purpose of these forums is not to provide you a free education, or to do your work for you, but to help you solve problems that have stymied you after an honest attempt to solve them on your own!
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 02-09-2012 #6Just Joined!
- Join Date
- Dec 2010
- Posts
- 44
Thank you very much for encouraging me to learn and also for letting me know that these forums are not for free education or doing my work (and I was not asking for that also
).
I had tried to understand the network script but couldn't understand in that, and also I googled many things but couldn't find any thing entering in my mind. I tried all these for some days then thought of posting on this forum so that I could get some way to start or some resources.
I hope you understood what I meant.
- 02-09-2012 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Well, I thought that was what I did, in pointing you to the scripts that actually do the work of starting, stopping, restarting, and checking on the status of system services. If I want to know what is done to actually start some service, such as the network time protocol daemon, then I would read the appropriate script in /etc/rc.d and look for the start section. That would tell me exactly what was being done. The "service start service-name" command will invoke that script with the appropriate arguments. In any case, you must have at least a rudimentary knowledge of the bash scripting language before you get into this. That should be your first priority.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote
