bind ip

bind ip

first, install ipcalc, here is a Debian example

root@172-245-95-2-host:/etc/network# apt install ipcalc

then calculate the ip,
here is an example

root@172-245-95-2-host:/etc/network# ipcalc 172.245.95.0/26
Address:   172.245.95.0         10101100.11110101.01011111.00 000000
Netmask:   255.255.255.192 = 26 11111111.11111111.11111111.11 000000
Wildcard:  0.0.0.63             00000000.00000000.00000000.00 111111
=>
Network:   172.245.95.0/26      10101100.11110101.01011111.00 000000
HostMin:   172.245.95.1         10101100.11110101.01011111.00 000001
HostMax:   172.245.95.62        10101100.11110101.01011111.00 111110
Broadcast: 172.245.95.63        10101100.11110101.01011111.00 111111
Hosts/Net: 62                    Class B

for example,172.245.95.0/26 ,ip range is 172.245.95.1 -172.245.95.62,it shows the HostMin is 172.245.95.1 so 172.245.95.0/26,usualble ip is 172.245.95.2-62,

and you can use this to bind

for ip in $(seq 2 62); do
    ip addr add 172.245.95.$ip/26 dev eno1
done