Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
or just reboot.
It will be affected so that whatever you have changed will be loaded on boot.
Please,edit your profile so that we can know what distro you are using,I belive it's Red hat or Fedora,so I based my answer on that.
You must restart your network (..) or just reboot.
No you don't. Sysctls are dynamic so running 'sysctl -p' (takes /etc/sysctl.conf as default or supply filename) will do fine. And you can check that by running 'sysctl some.value' or catting it. Sysctls are strictly kernel so the GNU/Linux distro used doesn't matter for answering this particular question.
Yes you do,try to change packet forwarding from disabled to enabled,it want work if you don't restart network or system(at least not on distros that I have tried to do it).Besides some sysctl variables can not be changed after reboot.
Quote:
Originally Posted by unSpawn
Sysctls are dynamic so running 'sysctl -p' (takes /etc/sysctl.conf as default or supply filename) will do fine.
Maybe it will,but will not always take affect instantly.
Quote:
Originally Posted by unSpawn
Sysctls are strictly kernel so the GNU/Linux distro used doesn't matter for answering this particular question.
Yes it does,in a matter of how one want to change something,for example the command I have provided in my first post works for some distros(if one wants to change network parameters without rebooting),and some distros don't even change some parameters with sysctl.conf,for example in an old Red hat that I have,packet forwarding one must change in /etc/sysconfig/network,and if OP is using BSD then read this from Wikipedia;
Quote:
In most systems, the command sysctl -w parameter=1 will enable the desired behavior. This will persist until the next reboot. If the behavior should be enabled whenever the system boots, the line parameter=1 can be added to the file /etc/sysctl.conf. Additionally, some sysctl variables cannot be modified after the system is booted, these variables (depending on the variable and the version and flavor of BSD) need to either be set statically in the kernel at compile time or set in /boot/loader.conf.
Yes you do, try to change packet forwarding from disabled to enabled, it wont work if you don't restart network or system
Could that perhaps be due to Something Completely Different? Like say routing and firewalling?
Quote:
Originally Posted by alan_ri
Besides some sysctl variables can not be changed after reboot.
AFAIK there are only three types of sysctls that can't be changed: those set by the kernel directly (like random.boot_id, random.uuid), those that only display device info (like cdrom.info) and those that are related to LSM users (like GRSecurity). AFAIK they can't be set or changed, and regardless when (the exception being sealing GRSecurity at boot), so the argument of using 'sysctl' on unchangable sysctls doesn't compute anyway, does it?
Quote:
Originally Posted by alan_ri
Maybe it will, but will not always take affect instantly.
Only example I can think of is the routing cache for which you need to write to the "flush" sysctl, but maybe you have a better example?
Quote:
Originally Posted by alan_ri
Yes it does, in a matter of how one want to change something. For example the command I have provided in my first post works for some distros (if one wants to change network parameters without rebooting), and
If you look under the hood you see /etc/rc.d/init.d/network uses 'sysctl' to set those variables. So wouldn't you say it's simpler to call 'sysctl -p' directly and achieve setting sysctls?
Quote:
Originally Posted by alan_ri
some distros don't even change some parameters with sysctl.conf. For example in an old Red hat that I have, packet forwarding one must change in /etc/sysconfig/network.
/etc/sysconfig/network is just a configuration file. What distro-agnostic utility do you think picks up those variables to set them?
Quote:
Originally Posted by alan_ri
and if OP is using BSD then
No, this is Linux Newbie. BSD questions go in the Other *NIX forum :-]
Could that perhaps be due to Something Completely Different? Like say routing and firewalling?
No.
Quote:
Originally Posted by unSpawn
No, this is Linux Newbie. BSD questions go in the Other *NIX forum :-]
Well,you just can't be sure,right?
For the rest of this little discussion,I will just say,you're right and I'm right and since OP is not posting anything anymore I will leave it on that.
Last edited by alan_ri; 05-09-2008 at 01:06 PM.
Reason: grammar
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.