- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- How to change a kernel parameter in linux?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2002 09:05 AM
тАО09-09-2002 09:05 AM
I need to know how to change a kernel parameter in linux and if is possible to make it online. The parameter I want to change is ip_forwarding.
Regards.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2002 11:39 AM
тАО09-09-2002 11:39 AM
Re: How to change a kernel parameter in linux?
Check out Documentation/filesystems/proc.txt in the kernel source tree. There is a section on the ip_forward parameter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2002 12:58 PM
тАО09-09-2002 12:58 PM
SolutionWith Linux, certain kernel parameters can be changed "on-the-fly" using /proc subsystem features.
Here is an example :
echo "1" >/proc/sys/net/ipv4/ip_forward
echo "134217728" >/proc/sys/kernel/shmmax
Of course you can put these lines in /etc/rc.local to have it done at system bootup.
On a RedHat system, this is already done for you. Just edit /etc/sysctl.conf file as follows :
net.ipv4.ip_forward = 0
kernel.shmmax = 134217728
Good luck.
Kodjo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-09-2002 11:33 PM
тАО09-09-2002 11:33 PM
Re: How to change a kernel parameter in linux?
First of all thanks for your help, I have found the commnad sysctl that seems the right way to change the value of the kernel parameters:
[root@cache1]# sysctl -w net.ipv4.ip_forward=0
net.ipv4.ip_forward = 0
I have now another problem is that the value of the parameter was 1 although in the file sysctl.conf it was 0:
[root@cache1]# more /etc/sysctl.conf
# Disables packet forwarding
net.ipv4.ip_forward = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Disables automatic defragmentation (needed for masquerading, LVS)
net.ipv4.ip_always_defrag = 0
# Disables the magic-sysrq key
kernel.sysrq = 0
Any idea?
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2002 05:40 AM
тАО09-10-2002 05:40 AM
Re: How to change a kernel parameter in linux?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-10-2002 02:07 PM
тАО09-10-2002 02:07 PM
Re: How to change a kernel parameter in linux?
You may find the shell script that forces the ip_forward parameter.
Good luck.
Kodjo