Re: [iproute2] iproute2: Allow 'ip addr flush' to loop more than 10 times.
From: Ben Greear <hidden>
Date: 2010-06-29 16:31:08
From: Ben Greear <hidden>
Date: 2010-06-29 16:31:08
On 06/29/2010 08:48 AM, Alexander Clouter wrote:
Ben Greear[off-list ref] wrote:quoted
quoted
quoted
This is useful for getting rid of large numbers of IP addresses in scripts.Maybe I am missing a trick, but what is wrong with putting this trivial logic into the script: ip addr show ${DEV} | awk '/inet6? / { print $2 }' | xargs -I{} ip addr del '{}' dev ${DEV}This isn't going to be fast if you have thousands of addresses.Obviously not like-for-like but:
You might try comparing against -batch mode v/s individual calls to ip. I'd enjoy adding/removing thousands of IP addrs in < 1 second, but got a bit of work to do before I get there I think. Thanks, Ben -- Ben Greear [off-list ref] Candela Technologies Inc http://www.candelatech.com