LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 06: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 06:31 AM. Reason: typo
 
Old 11-21-2007, 06:38 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 08: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, 03:08 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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



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-02-2007 11:53 PM
How do I set the regulatory daemon to restart when I restart the network service? zahadumy Linux - Networking 0 11-05-2006 11:24 AM
reboot works but service network restart does not spikeroo Linux - Networking 4 12-15-2005 04:41 PM
service network restart - mandrake 9.1 problem perry Linux - General 0 01-25-2004 07:04 PM
service network restart perry Linux - Networking 2 12-15-2003 07:00 AM

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

All times are GMT -5. The time now is 07:59 PM.

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