LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-21-2007, 07:30 AM   #1
markraem
Member
 
Registered: Nov 2003
Posts: 82

Rep: Reputation: 15
what is the difference between service network reload and service network restart ?


when I want to change IP address on RHEL, I edit the files in /etc/sysconfig/network-scripts/ifcfg-ethX and then do service network restart or reload

Both options work OK for me, but what is the difference between them?

When is it better to use service network reload ?
When is it better to use service network restart ?

Thanx in advance.

Last edited by markraem; 11-21-2007 at 07:31 AM. Reason: typo
 
Old 11-21-2007, 07:38 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Often they are the same. I think for the network service this is the case because ifdown is called on the interfaces followed by ifup. Other services like xinetd might reload the config without restarting.
 
Old 11-21-2007, 09:27 AM   #3
markraem
Member
 
Registered: Nov 2003
Posts: 82

Original Poster
Rep: Reputation: 15
Is it then correct to say that restart will do ifup/ifdown
but
reload will not do ifup/ifdown ?
 
Old 11-21-2007, 04:08 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
No, I think "service network reload" will call ifdown / ifup. You can try it yourself. Also, you can read the service script. It depends on the particular service script and the binary that is called. The reload option for some services might be included for completeness but it may be restart that is called.

Here is an example from SuSE:
Code:
        reload)
                # NetworkManager does not support reload (2005.01.15).
                # If configuration and running system do not match exec restart.
                # Fall through if NetControl is confiured and NM not active.
                if [ "$NETWORKMANAGER" == yes ] ; then
                        if netcontrol_running; then
                                mesg "Changing Network Control System. Calling $0 restart"
                                exec $0 restart $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS}
                        else
                                # NetworkManager doesn't support signaling --> restarting
                                exec $0 restart $CONFIG $INTERFACE ${OPTIONS:+-o $OPTIONS}
                        fi
                else
                        if nm_running; then
                                mesg "Changing Network Control System. Calling $0 restart"
                                shift
                                exec $0 restart $*
                        fi
                fi
                ;;
 
  


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
In FC6 network interface doesn't come up if 'service network restart' command is run rajat Linux - Networking 2 05-03-2007 12:53 AM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 12:24 PM
reboot works but service network restart does not spikeroo Linux - Networking 4 12-15-2005 05:41 PM
service network restart - mandrake 9.1 problem perry Linux - General 0 01-25-2004 08:04 PM
service network restart perry Linux - Networking 2 12-15-2003 08:00 AM


All times are GMT -5. The time now is 07:58 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration