LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-05-2012, 08:28 AM   #1
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
What does "service network restart" do on RHEL?


TCP/IP is just part of the kernel right? Is there a *daemon* for networking or something? What is its functionality?
 
Old 04-05-2012, 08:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it shuts down all the network interfaces, clears routing tables etc, and recreates them. did you think abuot just LOOKING at the service scripts yourself?
 
Old 04-05-2012, 08:40 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Anything that "service" acts on is a init script. The init scripts can be found in /etc/init.d. (There are links to this from /etc/rc?.d for the various run levels.) You can vi the script to see what it does.

Mainly what it does is stops the interfaces (e.g. ifdown eth0 to stop first ethernet), stops the networking stack then restarts the networking stack and then restarts the interfaces (e.g. ifup eth1 to start the second ethernet). It also conditions the routing table. The files it looks at are /etc/sysconfig/network and /etc/sysconfig/network-scripts (mainly ifcfg* and route* in the latter directory).
 
Old 04-05-2012, 02:13 PM   #4
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
???!! I'm VERY curious to know how it "stops the networking stack"!
Is there a system call for this or something?
 
Old 04-06-2012, 03:38 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
we already told you what it does. try reading our replies.
 
Old 04-06-2012, 07:10 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
Originally Posted by resetreset View Post
???!! I'm VERY curious to know how it "stops the networking stack"!
Is there a system call for this or something?
Read the init script as I suggested before if you want more details.

For more excruciating detail look at the documents in /usr/share/doc/initscripts<version> directory.
 
  


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
Where do I add a "service dhcp3-server restart" micropanther Linux - Server 2 03-16-2012 06:40 AM
Getting "SIOCADDRT: No such process" when running "service network restart" cmlorentz Linux - Networking 1 11-26-2010 01:06 PM
"service __ restart" bash command isn't working case1984 Linux - Newbie 9 04-10-2008 02:35 PM
difference between "service smb restart" and "/etc/rc.d/init.d/smb" powah Linux - Software 1 01-17-2007 05:17 PM
counter part of "service network restart" b0nd Slackware 5 10-10-2005 06:47 AM

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

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