Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Modifying Kernel Parameters

The Linux kernel provides a wide array of parameters that can alter how the system behaves. In this lab, you will be tasked with modifying specific parameters for the current session and ensuring that these changes will persist through a reboot.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 30m
Published
Clock icon Apr 10, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Modify the Swappiness Parameter to Equal 10 for the Current Session

    Use sysctl to change the swappiness value to 10:

    sysctl -w vm.swappiness=10

  2. Challenge

    Ensure That the Changes Made to the Swappiness Parameter Will Persist through a Reboot

    Create a file in /etc/sysctl.d/ called 60-swap.conf with the following contents:

    vm.swappiness = 10

    This can be done with a text editor or through the command line:

    echo "vm.swappiness = 10" > /etc/sysctl.d/60-swap.conf

  3. Challenge

    Disable icmp_echo_ignore_all and Enable icmp_echo_ignore_broadcast for the Current Session

    Disable icmp_echo_ignore_all using the sysctl command:

    sysctl -w net.ipv4.icmp_echo_ignore_all=0

    Enable icmp_echo_ignore_broadcast using the sysctl command:

    sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1

  4. Challenge

    Ensure That the Changes Made to icmp_echo_ignore_all and icmp_echo_ignore_broadcast Persist through a Reboot

    Create a file in /etc/sysctl.d/ called 60-icmp.conf with the following system variables:

    icmp_echo_ignore_all = 0
    icmp_echo_ignore_broadcasts = 1
    

    This can be done with a text editor or from the command line using the echo command:

    echo -e 'icmp_echo_ignore_all = 0\nicmp_echo_ignore_broadcasts = 1' > /etc/sysctl.d/60-icmp.conf

  5. Challenge

    Enable ip_forward for the Current Session

    Enable ip_forward using the sysctl command:

    sysctl -w net.ipv4.ip_forward=1

  6. Challenge

    Ensure That the Changes Made to ip_forward will Persist through a Reboot

    Create a file in /etc/sysctl.d/ called 60-ip.conf with the following text:

    net.ipv4.ip_forward = 1
    

    This can be done with a text editor or from the command line:

    echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/60-ip.conf

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans