debian add ip range

 

post-up for last in `seq 17 23`; do ip addr add 192.168.0.$last/32 dev vmbr0; done || true
pre-down for ip in `ip addr show dev vmbr0 | sed -n ‘s@.* inet \([0-9.]*/32\) .*@\1@ p’`; do ip addr del $ip dev vmbr0; done || true

Leave a Reply

Your email address will not be published. Required fields are marked *