Showing posts with label RHEL. Show all posts
Showing posts with label RHEL. Show all posts

Monday, February 23, 2026

Using the ip command in Linux

Why you have to stop using ifconfig and start using ip, the modern method for configuring a Linux network interface.
Photo by Tianyi Ma on Unsplash

For a long time, the ifconfig command was the default method for configuring a network interface. It served Linux users well, but networking is complex, and the commands to configure it must be robust. The ip command is the new default networking command for modern systems, and in this article, I'll show you how to use it.

The ip command is functionally organized on two layers of the OSI networking stack: Layer 2 (data link layer) and Layer 3 (network or IP layer). It does all the work in the old net-tools package.

Installing ip

The ip command is included in the iproute2util package. It's probably already included in your Linux distribution. If it's not, you can install it from your distro's software repository.

Comparing ipconfig and ip usage

The ip and ipconfic commands can be used to configure a network interface, but they do things differently. I'll compare how to do common tasks with the old (ipconfig) and new (ip) commands.

View network interface and IP address

If you want to see the IP address of a host or view network interface information, the old ifconfig command, with no arguments, provides a good summary:

$ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
       ether bc:ee:7b:5e:7d:d8  txqueuelen 1000  (Ethernet)                                                       
       RX packets 0  bytes 0 (0.0 B)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 0  bytes 0 (0.0 B)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10<host>
       loop  txqueuelen 1000  (Local Loopback)
       RX packets 41  bytes 5551 (5.4 KiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 41  bytes 5551 (5.4 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 10.1.1.6  netmask 255.255.255.224  broadcast 10.1.1.31
       inet6 fdb4:f58e:49f:4900:d46d:146b:b16:7212  prefixlen 64  scopeid 0x0<global>
       inet6 fe80::8eb3:4bc0:7cbb:59e8  prefixlen 64  scopeid 0x20<link>
       ether 08:71:90:81:1e:b5  txqueuelen 1000  (Ethernet)
       RX packets 569459  bytes 779147444 (743.0 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 302882  bytes 38131213 (36.3 MiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The new ip command provides similar results, but the command is ip address show, or just ip a for short:

$ ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
   inet6 ::1/128 scope host  
      valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
   link/ether bc:ee:7b:5e:7d:d8 brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
   link/ether 08:71:90:81:1e:b5 brd ff:ff:ff:ff:ff:ff
   inet 10.1.1.6/27 brd 10.1.1.31 scope global dynamic wlan0
      valid_lft 83490sec preferred_lft 83490sec
   inet6 fdb4:f58e:49f:4900:d46d:146b:b16:7212/64 scope global noprefixroute dynamic  
      valid_lft 6909sec preferred_lft 3309sec
   inet6 fe80::8eb3:4bc0:7cbb:59e8/64 scope link  
      valid_lft forever preferred_lft forever

Add IP address

To add an IP address to an interface with ifconfig, the command is:

$ ifconfig eth0 add 192.9.203.21

The command is similar for ip:

$ ip address add 192.9.203.21 dev eth0

Subcommands in ip can be shortened, so this command is equally valid:

$ ip addr add 192.9.203.21 dev eth0

You can make it even shorter:

$ ip a add 192.9.203.21 dev eth0

Remove an IP address

The inverse of adding an IP address is to remove one.

With ifconfig, the syntax is:

$ ifconfig eth0 del 192.9.203.21

The ip command syntax is:

$ ip a del 192.9.203.21 dev eth0

Enable or disable multicast

Enabling (or disabling) multicast on an interface with ifconfig happens with the multicast argument:

# ifconfig eth0 multicast

With ip, use the set subcommand with the device (dev) and a Boolean or toggle multicast option:

# ip link set dev eth0 multicast on

Enable or disable a network

Every sysadmin is familiar with the old "turn it off and then on again" trick to fix a problem. In terms of networking interfaces, that translates to bringing a network up or down.

The ifconfig command does this with the up or down keywords:

# ifconfig eth0 up

Or you could use a dedicated command:

# ifup eth0

The ip command uses the set subcommand to set the interface to an up or down state:

# ip link set eth0 up

Enable or disable the Address Resolution Protocol (ARP)

With ifconfig, you enable ARP by declaring it:

# ifconfig eth0 arp

With ip, you set the arp property as on or off:

# ip link set dev eth0 arp on

Pros and cons of ip and ipconfig

The ip command is more versatile and technically more efficient than ifconfig because it uses Netlink sockets rather than ioctl system calls.

The ip command may appear more verbose and more complex than ifconfig, but that's one reason it's more versatile. Once you start using it, you'll get a feel for its internal logic (for instance, using set instead of a seemingly arbitrary mix of declarations or settings).

Ultimately, ifconfig is outdated (for instance, it lacks full support for network namespaces), and ip is designed for the modern network. Try it out, learn it, use it. You'll be glad you did!

Wednesday, January 20, 2021

Red Hat extending its Developer program and RHEL subscriptions

In a quick move, Red Hat announces extensions to its Developer program and RHEL subscriptions including more incenses and production availability

It didn't take long. After communicating the end of the CentOS Linux project and announcing their plans to focus on CentOS Stream going forward, a big part of the community was left without alternative on Linux enterprise software. Soon two emerging clones appeared: Rocky Linux or AlmaLinux.

Turns out that now, Red Hat has announced important changes to its developer subscription. Let's take a look at what that means for those looking for an alternative for their now soon-to-be phased-out CentOS Linux servers.

What changed

To understand why this is important, it's important some context. This is how RHEL and CentOS used to be built:

Fedora -> CentOS Stream -> RHEL -> CentOS

Since the communicating the end of CentOS, this is the new workflow:

Fedora -> CentOS Stream -> RHEL

Two new the new programs added to RHEL

To cover that gap, two new programs were announced: no-cost RHEL for small production workloads and no-cost RHEL for customer development teams.

No-cost RHEL for small production workloads

With the updated program Red Hat now allows the Individual Developer subscription for RHEL to be used in production for up to 16 systems. For comparison, before the program limited its use to single-machine developers and no production availability. That's a big gain for developers and small organizations who now will use RHEL more comfortably as a development platform and potently deploy them to production (no support included) for up to 16 systems.

The program was also expanded so you can You can also use the expanded Red Hat Developer program to run RHEL on major public clouds including AWS, Google Cloud Platform, and Microsoft Azure. You have to pay only the usual hosting fees charged by your provider of choice; the operating system is free for both development and small production workloads.

For more information about the program, check this page.

No-cost RHEL for customer development teams

In addition to the updates mentioned above, a new program called no-cost RHEL for customer development teams was created. Via this program, it will now be easier for customer development teams to join the Red Hat Developer program and take advantage of its benefits. Development teams can now be added to this program at no additional cost via the customer’s existing subscription, helping to make RHEL more accessible as a development platform for the entire organization.

For more information about the program, check this page.

Availability

This updated Individual Developer subscription for RHEL will be available by February 1st, 2021.

Other programs coming

The announcement however still mentions the company is working on a variety of additional programs for other use cases, which should be communicated by mid-February. It's expected that it should cover large CentOS shops deploying more than 16 production servers.

Commitment to CentOS Stream

To finish, Red Hat re-stated their commitment on Fedora and CentOS Stream as innovation and stability pillars for upcoming RHEL releases. They say:

We’re making CentOS Stream the collaboration hub for RHEL, with the landscape looking like this:

  • Fedora Linux is the place for major new operating system innovations, thoughts, and ideas - essentially, this is where the next major version of Red Hat Enterprise Linux is born.

  • CentOS Stream is the continuously delivered platform that becomes the next minor version of RHEL.

  • RHEL is the intelligent operating system for production workloads, used in nearly every industry in the world, from cloud-scale deployments in mission-critical data centers and localized server rooms to public clouds and out to far-flung edges of enterprise networks.

Final Thoughts

This is definitely good news for orphaned CentOS Linux sysadmins. However, most of us wonder why didn't they announce this at the same time they communicated the deprecation of CentOS. Anyhow, developers and smaller companies could definitely benefit from this updated model and migrate their workloads directly to RHEL instead of using alternative CentOS clones such as Rocky Linux or AlmaLinux. Assuming they still trust Red Hat.

See Also

Monday, November 2, 2020

What is Enterprise Linux?

You probably heard the term "Enterprise Linux" before. But do you understand what it means?
Photo by Danielle Barnes on Unsplash

On a previous post we discussed what's a Linux distribution. Today we'll discuss what they are, what they offer and how they differentiate from the traditional community-based desktop distros you use at home or work for free.

With the news that Red Hat is shutting down the CentOS project, we definitely cannot recommend CentOS for your server anymore. 😌 However, it still has its value if you're developing for RHEL.

What is Enterprise Linux?

Enterprise Linux is the term commonly used to refer to a Linux distribution available through a paid subscription service customized for use in commercial organizations. It's frequently used in servers but enterprise software for the desktop is also available. It's available in different architectures.

The first company to popularize the term by specifically targeting a Linux distributions to large enterprise vendors was Red Hat with the first to offer enterprise Linux software with Red Hat Enterprise Linux (RHEL) in early 2000's. Quickly following that, SUSE Linux Enterprise Server, followed by Oracle Linux with Ubuntu following more recently.

On the community side, traditionally the venerable Debian Linux has been the go-to choice for the server disputing with CentOS the top spot in recent years.

Why use enterprise Linux software?

The reasons to by enterprise Linux software are:

  • Solid, bulletproof software - LTS Linux kernel and LTS open-source software 
  • Long term support - up to 10 years support 
  • Super high SLAs - for example, RHEL claims up to 99.999% uptime
  • Enforced Security - Frequent and quick security updates to mitigate CVEs and security vulnerabilities
  • Extended Support - Dedicated support to help troubleshooting production issues
  • Access to certified software, hardware and cloud
  • Access to multiple partnerships, trainings and certifications
  • Access to custom/proprietary technologies - including predictive IT analytics service that identifies potential issues before they become problems

Most popular enterprise distributions

The last category is the commercial/enterprise Linux distributions. Those are distributions that require a financial commitment from the user or organization that plans to use them. The most popular today are:

With the news that Red Hat is shutting down the CentOS project, I definitely cannot recommend CentOS for your server anymore. 😌 However, it still has its value if you're developing for RHEL.

Architectures supported

Enterprise software needs to be available for most architectures, including supercomputers. For example, RHEL is released in server versions for x86-64, Power ISA, ARM64, and IBM Z and a desktop version for x86-64. All of Red Hat's official support and training, together with the Red Hat Certification Program, focuses on the Red Hat Enterprise Linux platform.  

Enterprise-Grade security

Since how critical Linux is for the functioning of the internet today, there are lots of eyes on its security model, especially on Enterprise-grade software. Government agencies like the NSA and others collaborate to build enterprise security tools like SELinux and AppArmor. But Linux's enterprise-grade security goes beyond that. In fact, there are multiple reasons that make if more more secure then other operating systems, including frequent updates, native disk-encryption, encrypted virtual machines, integrity sub-systems that can be used to detect if a file has been altered and encrypted data at rest.

FAQ

How much does it cost?

Since prices are always fluctuating, we'd ask you to consult the vendors linked above for more information.

Is there such a thing as enterprise desktop?

Yes! There are commercially supported Linux software for the desktop as well. The most popular being offered by Red Hat, Canonical and SUSE.

Are enterprise distributions always paid?

The short answer is no. Most vendors offer a development subscription allowing the developers to develop software on the same system they'll run their services. For example, Red Hat offers a Red Hat Enterprise Linux subscription, available as part of the Red Hat Developer Program. This license is offered as a self-supported, non-production developer subscription offering a more stable development platform for building enterprise-grade applications and enables a clear pathway to supported, mission-critical deployments across cloud, physical, virtual and container-centric infrastructures.

Free enterprise Linux distributions

Looking for the best of enterprise Linux for as little as possible for your organization? Indeed there are community based enterprise Linux distributions. The common alternatives to paid enterprise software that we recommend are:

Conclusion

On this post we discussed what the term enterprise Linux means and reviewed some frequently asked questions about it. Hope it helps!

With the news that Red Hat is shutting down the CentOS project, we definitely cannot recommend CentOS for your server anymore. 😌 However, it still has its value if you're developing for RHEL.

See Also

Monday, October 26, 2020

What is a Linux Distribution (aka. Distro)?

New Linux users often encounter the expression "Distribution" (or distro). Learn what that means.
Photo by Derek Oyen on Unsplash

When getting started with Linux you'll often hear the term distribution (aka distro). But what does it means and how a Linux distro is made? First off, let's review how Wikipedia defines it:

A Linux distribution is an operating system made from a software collection that is based upon the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices and personal computers to powerful supercomputers.

What's included in a Linux distribution

A Linux distribution (or distro) is composed of thousands of software packages which are usually built by the community or by the company maintaining that distribution, packaged and assembled in a live-CD (or iso) so it can be deployed somewhere (usually VMs or bare-metals).
 
Today, most distros (desktop or server) are composed of:
  • an installer: the tool you'll use to install the distro.
  • a boot loader: the tool that will initialize your system via its kernel.
  • the Linux kernel: the kernel is software that's responsible for interacting with and managing your hardware resources.
  • kernel modules: also known as drivers.  for common hardware: 
  • an init system: also known as PID 1, it's the first (and only) program executed by the kernel when loading your system. Today, systemd is the most widely used init system.
  • a daemon service: a service to manage background processes. systemd can also be used to be managed daemons (services).
  • a package management system: tooling to manage software (add/remove/search/etc). The most common package managers are Apt (Ubuntu/Debian/Mint), Yum/DNF (Fedora, CentOS, RHEL, SUSE) and pacman (Arch/Manjaro) are the most popular
  • general tools: general tools to interact with your system (ex. ls to list files, mkdir to create directories, ps to list the running processes, etc)
  • libraries: libraries (software extensions) that can be used and shared by multiple programs
  • documentation: software in Linux usually comes with its own documentation that can be consulted without access to the internet.
  • development tools (optional): depending on the vendor, development tools can be pre-installed with the system.
  • a graphical user interface (optional): if you're running a desktop install, most likely your system will be running GNOME or KDE. Servers frequently run GUI-less to reduce their attack surface.

Sustainability Model

It obviously requires money, time a lots of resources to built everything and to guarantee that everything will work on the users and companies' machines. So how do the distributions sustain themselves?

There are essentially three sustainability models for distributions today.

Community-based distributions

Community-based distributions are entities that survive off of donations and often require help from volunteers. The most popular ones these days are:

Commercially-sponsored distributions

Commercially-sponsored distributions are those distributions that receive grants from commercial companies to support the development and maintenance of those systems. Note that there's nothing wrong with this category since most of the distributions tend to run completely independently from their commercial institution. The most popular distributions today are:

Commercial/Enterprise distributions

The last category is the commercial/enterprise Linux distributions. Those are distributions that require a financial commitment from the user or organization that plans to use them. The advantage is bulletproof software and usually a dedicated support to help troubleshooting production issues. The most popular today are:

    Conclusion

    On this post we reviewed what's usually called a Linux distribution, also know as a distro. We also reviewed which components are included in a distribution and the most popular options on the market today. Is your favorite distribution on that list? Let us know!

    See Also

    Featured Article

    Using WebDAV on Linux

    Learn to use WebDAV, a networking tool to mount filesystems, a great option for collaborative environments ...