Use puppet to make changes to ip route and sysctl

Posted by Quintin Par on Server Fault See other posts from Server Fault or by Quintin Par
Published on 2012-08-06T10:46:44Z Indexed on 2012/09/24 21:40 UTC
Read the original article Hit count: 124

Filed under:
|
|

I have two changes to ip route & sysctl that disable tcp slow start. Here’s how I do it

ip route show

Make a note of the line starting with default.

Pick up the IP from the default line and run

sudo ip route change default via $ip_address dev eth0 initcwnd 12 
sudo sysctl -w net.ipv4.tcp_slow_start_after_idle=0

How can I create a puppet script out of this? One that can be deployed to many machines of the same type – CentOS 6

Edit: Added bounty to get a working example for

sudo ip route change default via $ip_address dev eth0 initcwnd 12 

© Server Fault or respective owner

Related posts about linux

Related posts about centos