LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   What does "service network restart" do on RHEL? (https://www.linuxquestions.org/questions/linux-networking-3/what-does-service-network-restart-do-on-rhel-938280/)

resetreset 04-05-2012 08:28 AM

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?

acid_kewpie 04-05-2012 08:39 AM

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?

MensaWater 04-05-2012 08:40 AM

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).

resetreset 04-05-2012 02:13 PM

???!! I'm VERY curious to know how it "stops the networking stack"!
Is there a system call for this or something?

acid_kewpie 04-06-2012 03:38 AM

we already told you what it does. try reading our replies.

MensaWater 04-06-2012 07:10 AM

Quote:

Originally Posted by resetreset (Post 4645735)
???!! 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.


All times are GMT -5. The time now is 12:22 PM.