Deep inside sysctl.conf

GEEKS !!

There is no better way to start your Sunday with a little Linux.

I was feeling lazy to record a video, so sharing it with text.

Those who had done ‎rhce training or rhcss training or have working knowledge of Linux knows what /etc/sysctl.conf does.

You have used it many time to enable IP Forwarding during your rhce training… right.

Lets go slightly deep inside /etc/sysctl.conf.

Here goes the points.

1. It is used to change startup or runtime kernel options.

2. You use the sysctl tool to manipulate the runtime kernel options.

3. These options are stored under /proc/sys. So for example, when you change the ip_forward option of ipv4 it goes under – /proc/sys/net/ipv4. But the main directory is /proc/sys

4. procps-3.2.8-21.el6.x86_64 is the package that provides sysctl. You can find out the package name responsible for #sysctl with the command – rpm -qf `(which sysctl)`

5. Global startup file is – /etc/sysctl.conf

6. The binary location is – /sbin/sysctl

7. You can check all the kernel runtime possibilities with the command – sysctl -a | less and to find out the number of options available to you you can use – sysctl -a | wc -l, which on RHEL 6x is giving 1112 possibilities

8. One of the simple option other than enabling IP Forwarding is that you can use #sysctl to set the domain name, if it is not set. You can check the current domain name with the command – sysctl -a | grep -i domainname. And then you can set the domain name within the kernel with the command –

sysctl “kernel.domainame=networknuts.net”

Its recommended to put it under ” ” to separate command from argument.

9. It can also be used to increase number of pty terminals. Can be useful for hosting companies.

So GEEKS !!

sysctl is much more than just enabling IP Forwarding. You need to understand the location where the kernel runtime values goes (read point #3) and more.

Refer the screenshot for your reference.

Connect with us on Facebook – http://www.facebook.com/networknuts

Enjoy your Sunday.

Deep inside sysctl

Deep inside sysctl

Advertisements