Operations 7 min read

Mastering curl, wget, and Linux Bonding with nmcli: Essential Commands

This guide explains how to use curl and wget for fetching web content and downloading files, outlines Linux bonding modes for network interface aggregation, and provides step‑by‑step nmcli commands to configure both bonded and regular network interfaces on Linux systems.

Raymond Ops
Raymond Ops
Raymond Ops
Mastering curl, wget, and Linux Bonding with nmcli: Essential Commands

curl

curl

is a command-line tool for transferring data with servers, supporting protocols such as HTTP, HTTPS, FTP, and more.

Basic usage

Get webpage content : curl http://example.com Download file : curl -O http://example.com/file.zip Save file with specific name : curl -o myfile.zip http://example.com/file.zip Test port : curl -v ip:port Limit download speed :

curl --limit-rate 100K http://example.com

wget

wget

is a command-line utility for downloading files from the web, supporting HTTP, HTTPS, and FTP.

Basic usage

Download file : wget http://example.com/file.zip Download and save as specific filename : wget -O myfile.zip http://example.com/file.zip Background download : wget -b http://example.com/file.zip Show progress bar : wget --progress=bar http://example.com/file.zip Download specific file types (e.g., all PDFs) :

wget -r -A pdf http://example.com

bond

Linux bonding modes:

mode=0 (Round-robin) : distributes outbound traffic evenly across all NICs, increasing bandwidth.

mode=1 (Active-backup) : only one NIC is active; a backup takes over if the active fails.

mode=2 (XOR) : uses MAC address hash to assign traffic to NICs.

mode=3 (Broadcast) : sends packets to all NICs, providing high availability without bandwidth gain.

mode=4 (802.3ad) : dynamic link aggregation using LACP.

mode=5 (TLB – Adaptive Transmit Load Balancing) : outbound traffic balanced adaptively; inbound uses primary NIC.

mode=6 (ALB – Adaptive Load Balancing) : combines TLB and ARP monitoring for bidirectional load balancing.

nmcli configure bond

1. Create bond interface
nmcli connection add type bond con-name bond0 ifname bond0 mode active-backup miimon 100

2. Add slave NICs
nmcli connection add type bond-slave con-name bond0-slave1 ifname ens224 master bond0
nmcli connection add type bond-slave con-name bond0-slave2 ifname ens256 master bond0

3. Configure static IP
nmcli connection modify bond0 ipv4.addresses 192.168.5.130/24 ipv4.gateway 192.168.5.1 ipv4.dns "8.8.8.8" ipv4.method manual

4. Configure DHCP
nmcli connection modify bond0 ipv4.method auto

5. Activate connections
nmcli connection up bond0
nmcli connection up bond0-slave1
nmcli connection up bond0-slave2

6. Check bond status
cat /proc/net/bonding/bond0

nmcli configure regular NIC

1. List interfaces
nmcli device

2. Create new Ethernet connection
nmcli connection add type ethernet ifname eth0 con-name eth0

3. Set static IP
nmcli connection modify ens8 ipv4.addresses 192.168.5.110/24
nmcli connection modify ens8 ipv4.gateway 192.168.5.1
nmcli connection modify ens8 ipv4.dns 8.8.8.8
nmcli connection modify ens8 ipv4.method manual

4. Enable DHCP
nmcli connection modify my-ethernet ipv4.method auto

5. Show active connections
nmcli connection show --active
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

curlLinux NetworkingwgetnmcliBonding
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.