Start typing to search across invoices, services, domains, tickets, and more...
Site-cluster (multi-IP) servers often come with one or more /24 blocks, giving you 253+ usable addresses per block. Adding them one by one is slow and error-prone. This guide shows how to bind a full /24 IP block on a Linux site-cluster server: bind quickly with a loop, persist via Netplan or NetworkManager, auto-bind at boot with systemd, and verify in bulk. It covers Ubuntu, Debian and CentOS/Rocky/AlmaLinux.
Check the primary NIC and default route; we call it eth0 below:
ip -br addr show
ip route show defaultA single for loop binds the whole block, which is handy for testing. It is lost on reboot:
for i in $(seq 2 254); do
ip addr add 203.0.113.$i/24 dev eth0
doneAdd addresses only. Do not add another default gateway for the extra block, or you will get multiple default routes.
Typing 253 lines by hand invites mistakes. Generate the YAML lines and paste them under addresses in your /etc/netplan/ file:
for i in $(seq 2 254); do echo " - 203.0.113.$i/24"; doneThe result looks like this:
network:
version: 2
ethernets:
eth0:
addresses:
- 198.51.100.5/24
- 203.0.113.2/24
- 203.0.113.3/24
# ... 203.0.113.254/24
routes:
- to: default
via: 198.51.100.1netplan try
netplan applyNetworkManager stores the addresses in the connection profile and restores them at boot:
for i in $(seq 2 254); do
nmcli connection modify eth0 +ipv4.addresses 203.0.113.$i/24
done
nmcli connection up eth0The loop may take a minute or two; do not interrupt it.
On Debian (ifupdown), or if you prefer not to touch network config files, run a script from systemd at boot. Create /usr/local/bin/bind-ips.sh:
#!/bin/bash
# /usr/local/bin/bind-ips.sh
DEV=eth0
NET=203.0.113
for i in $(seq 2 254); do
ip addr add ${NET}.${i}/24 dev ${DEV} 2>/dev/null
done
exit 0Then create /etc/systemd/system/bind-ips.service:
[Unit]
Description=Bind extra IPv4 block
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/local/bin/bind-ips.sh
RemainAfterExit=yes
[Install]
WantedBy=multi-user.targetMake it executable and enable it:
chmod +x /usr/local/bin/bind-ips.sh
systemctl daemon-reload
systemctl enable --now bind-ips.serviceOn systems managed by nmcli, prefer Step 4 so NetworkManager does not drop script-added addresses when it re-activates the connection.
Count the bound addresses and spot-check outbound traffic:
ip -4 addr show dev eth0 | grep -c "inet 203.0.113."
for i in 2 100 254; do curl -s --interface 203.0.113.$i https://ifconfig.me; echo; doneThe first command should print 253 (or your actual count). If curl returns the matching IP, that address works outbound. Reboot once to confirm persistence.
for i in $(seq 2 254); do
ip addr del 203.0.113.$i/24 dev eth0
doneAlso clean up the persistent config: remove the lines from Netplan, use nmcli -ipv4.addresses, or disable bind-ips.service.
It depends on whether the block shares the layer-2 network with the primary IP or is routed to it. Follow the delivery information, or open a ticket to confirm.
Make sure the IP is in the usable range and check the firewall; test it individually with curl --interface. If it still fails, send the list of IPs in a ticket.
A few hundred addresses have negligible kernel impact, although netplan apply may take a little longer.
Still stuck? Open a ticket with IMIDC 24/7 technical support.