For Linux o/s where I assign a large quantity of IPv4 addresses, I use a simple bind script to quickly bind all IPs.
Example:
Is there an easier way to do a single line for whatever size subnet?
Say for example I want to bind a full straight /19 to the server. I cannot do for example...
ip addr add xxx.142.101.$i/19 dev eth0
...because of the sequence line.
Is there an alternative to this?
Example:
Code:
for i in $(seq 2 254);
do
ip addr add xxx.142.100.$i/24 dev eth0
ip addr add xxx.142.101.$i/24 dev eth0
ip addr add xxx.142.102.$i/24 dev eth0
ip addr add xxx.142.103.$i/24 dev eth0
done
ip addr show
Is there an easier way to do a single line for whatever size subnet?
Say for example I want to bind a full straight /19 to the server. I cannot do for example...
ip addr add xxx.142.101.$i/19 dev eth0
...because of the sequence line.
Is there an alternative to this?