[j-nsp] Clearing ARP on Logical Interface (M/MX Series)

Ross Vandegrift ross at kallisti.us
Tue Feb 2 12:08:48 EST 2010


On Tue, Feb 02, 2010 at 11:56:56AM +0100, Felix Sch?ueren wrote:
> show arp no-resolve | match x/y/z | save tempfile
> (which takes ~5 seconds on an ethernet router with just ~20k ARP entries)
> start shell
> awk '{print "clear arp hostname " $2}' < tempfile
>
> and then copy-paste hundreds or thousands of "clear arp" lines.

A quick tip - JUNOS's cli is generally well-behaved shell, which means
you can just use cli in your pipeline.  This will do it:

echo "show arp no-resolve" | cli | grep 'x/y/z' | awk '{ print "clear arp hostname " $2 }' | cli

Ross

-- 
Ross Vandegrift
ross at kallisti.us

"If the fight gets hot, the songs get hotter.  If the going gets tough,
the songs get tougher."
	--Woody Guthrie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://puck.nether.net/pipermail/juniper-nsp/attachments/20100202/6c1f4e5d/attachment.bin>


More information about the juniper-nsp mailing list