Howto disable Consistent Network Device Naming

RHEL 7 (and CentOS 7) introduced the concept of Consistent Network Device Naming. In practice this means that an old network device name like eth0 would change into something enp0s25. Should it not be obvious how those funky new network device names are generated then read SystemD: Understanding Predictable Network Interface Names

Here are the steps to disable Consistent Network Device Naming on RHEL 7 or CentOS 7:

Step 1) add kernel boot args & regenerate the grub config

The following kernel boot arguments need to be added:

Open /etc/default/grub with your favorite editor and add those two options to the line starting with GRUB_CMDLINE_LINUX:

Now let’s regenerate the grub config with the following command:

[root@test ~]# grub2-mkconfig -o /boot/grub2/grub.cfg

And you should see output like this:

Step 2) add a udev symlink, just to make sure

Basically adding the biosdevname=0 and net.ifnames=0 arguments to grub should be enough. But here’s another way just in case:

[root@test ~]# ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

After rebooting the host, the old familiar network ethX devices should be back.

How to disable delta RPMs on Fedora 20

If you maintain a local mirror of Fedora or have fast WAN access to a Fedora mirror near you then it is quite inefficient to let yum download the delta RPMs and then take ages to rebuild them. It’s much faster to just download the full update RPMs instead. Here’s how you disable delta RPMs:

Open /etc/yum.conf and in the [main] section add deltarpm=0:

Note that this is a global setting. So none of your repositories will use delta RPMs anymore.

How to disable delta RPMS for individual repositories

If you want to disable delta RPMS for individual repositories then here’s a neat trick. In /etc/yum.repos.d/your.repo add the following setting:

From man yum.conf:

deltarpm_percentage When the relative size of delta vs pkg is larger than this, delta is not used. Default value is 75 (Deltas must be at least 25% smaller than the pkg). Use `0′ to turn off delta rpm processing. Local repositories (with file://baseurl) have delta rpms turned off by default.

How to disable IPv6 on RHEL5, CentOS5 and RHEL6, CentOS6

Since there seems to be some confusion how to disable IPv6 on RHEL and CentOS, here is how to do it.

How not to do it

Do not disable the IPv6 kernel module. The reason is that IPv6 is quite integrated into the kernel in spite of being a kernel module. Things like SELinux need the IPv6 kernel module to be loaded. If you disable the IPv6 kernel module expect strange AVCs and generally things falling apart.

On up-to-date RHEL5 or CentOS5 (currently that means 5.10 aka 5U10)

Add the following line to /etc/sysctl.conf:

On a live system you can disable it with:

On up-to-date RHEL6 or CentOS6 (currently that means 6.4 aka 6U4)

Add the following lines to /etc/sysctl.conf:

On a live system you can disable it with:

In case of any sshd problems on RHEL6, CentOS6 edit /etc/ssh/sshd_config and change ‘#AddressFamily any’ to ‘AddressFamily inet’ *or* uncomment ‘#ListenAddress’.