Find the answer to your Linux question:
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2010
    Posts
    44

    Lightbulb Network restart


    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 connections are created or the existing connections are used .
    Do the existing connections get blocked or dropped.


    Thanks in advance.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,510
    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!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,510
    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!

  4. #4
    Just 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.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,510
    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!

  6. #6
    Just 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.

  7. #7
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,510
    Quote Originally Posted by taousif View Post
    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.
    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •