How To Install xdp-tools on CentOS 8

xdp-tools is Utilities and example programs for use with XDP

Introduction

In this tutorial we learn how to install xdp-tools on CentOS 8.

What is xdp-tools

Utilities and example programs for use with XDP

We can use yum or dnf to install xdp-tools on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install xdp-tools.

Install xdp-tools on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install xdp-tools using dnf by running the following command:

sudo dnf -y install xdp-tools

Install xdp-tools on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install xdp-tools using yum by running the following command:

sudo yum -y install xdp-tools

How To Uninstall xdp-tools on CentOS 8

To uninstall only the xdp-tools package we can use the following command:

sudo dnf remove xdp-tools

xdp-tools Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/29
/usr/lib/.build-id/29/f2d8fdf34f50b434981356b4de3079e77f9297
/usr/lib/.build-id/3e
/usr/lib/.build-id/3e/747e5983bb4a7f345a02c9107ee39f6fe394c5
/usr/lib/.build-id/6f
/usr/lib/.build-id/6f/ac571ce90c7eb6f414250d5c2b393961ddb098
/usr/lib64/bpf/xdpdump_bpf.o
/usr/lib64/bpf/xdpdump_xdp.o
/usr/lib64/bpf/xdpfilt_alw_all.o
/usr/lib64/bpf/xdpfilt_alw_eth.o
/usr/lib64/bpf/xdpfilt_alw_ip.o
/usr/lib64/bpf/xdpfilt_alw_tcp.o
/usr/lib64/bpf/xdpfilt_alw_udp.o
/usr/lib64/bpf/xdpfilt_dny_all.o
/usr/lib64/bpf/xdpfilt_dny_eth.o
/usr/lib64/bpf/xdpfilt_dny_ip.o
/usr/lib64/bpf/xdpfilt_dny_tcp.o
/usr/lib64/bpf/xdpfilt_dny_udp.o
/usr/sbin/xdp-filter
/usr/sbin/xdp-loader
/usr/sbin/xdpdump
/usr/share/licenses/xdp-tools
/usr/share/licenses/xdp-tools/LICENSE
/usr/share/man/man8/xdp-filter.8.gz
/usr/share/man/man8/xdp-loader.8.gz
/usr/share/man/man8/xdpdump.8.gz
/usr/share/xdp-tools
/usr/share/xdp-tools/run_tests.sh
/usr/share/xdp-tools/setup-netns-env.sh
/usr/share/xdp-tools/test_config.sh
/usr/share/xdp-tools/test_long_func_name.o
/usr/share/xdp-tools/test_runner.sh
/usr/share/xdp-tools/tests
/usr/share/xdp-tools/tests/xdp-filter
/usr/share/xdp-tools/tests/xdp-filter/common.py
/usr/share/xdp-tools/tests/xdp-filter/test-xdp-filter.sh
/usr/share/xdp-tools/tests/xdp-filter/test_basic.py
/usr/share/xdp-tools/tests/xdp-filter/test_slow.py
/usr/share/xdp-tools/tests/xdp-loader
/usr/share/xdp-tools/tests/xdp-loader/test-xdp-loader.sh
/usr/share/xdp-tools/tests/xdpdump
/usr/share/xdp-tools/tests/xdpdump/test-xdpdump.sh
/usr/share/xdp-tools/xdp_drop.o
/usr/share/xdp-tools/xdp_pass.o

References

Summary

In this tutorial we learn how to install xdp-tools on CentOS 8 using yum and dnf.