From 0cd8dbfd3a1760565a0515f3449a7c1b5dcd5cd4 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 2 Jul 2014 01:58:42 +0200 Subject: Bug #39: Add op mode commands for sending gratuitous ARP requests/replies. --- templates/force/arp/node.def | 1 + templates/force/arp/reply/interface/node.def | 1 + templates/force/arp/reply/interface/node.tag/address/node.def | 1 + .../arp/reply/interface/node.tag/address/node.tag/count/node.def | 1 + .../interface/node.tag/address/node.tag/count/node.tag/node.def | 2 ++ .../force/arp/reply/interface/node.tag/address/node.tag/node.def | 2 ++ templates/force/arp/reply/interface/node.tag/node.def | 6 ++++++ templates/force/arp/reply/node.def | 1 + templates/force/arp/request/interface/node.def | 1 + templates/force/arp/request/interface/node.tag/address/node.def | 1 + .../arp/request/interface/node.tag/address/node.tag/count/node.def | 1 + .../interface/node.tag/address/node.tag/count/node.tag/node.def | 3 +++ .../force/arp/request/interface/node.tag/address/node.tag/node.def | 2 ++ templates/force/arp/request/interface/node.tag/node.def | 6 ++++++ templates/force/arp/request/node.def | 1 + 15 files changed, 30 insertions(+) create mode 100644 templates/force/arp/node.def create mode 100644 templates/force/arp/reply/interface/node.def create mode 100644 templates/force/arp/reply/interface/node.tag/address/node.def create mode 100644 templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.def create mode 100644 templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.tag/node.def create mode 100644 templates/force/arp/reply/interface/node.tag/address/node.tag/node.def create mode 100644 templates/force/arp/reply/interface/node.tag/node.def create mode 100644 templates/force/arp/reply/node.def create mode 100644 templates/force/arp/request/interface/node.def create mode 100644 templates/force/arp/request/interface/node.tag/address/node.def create mode 100644 templates/force/arp/request/interface/node.tag/address/node.tag/count/node.def create mode 100644 templates/force/arp/request/interface/node.tag/address/node.tag/count/node.tag/node.def create mode 100644 templates/force/arp/request/interface/node.tag/address/node.tag/node.def create mode 100644 templates/force/arp/request/interface/node.tag/node.def create mode 100644 templates/force/arp/request/node.def diff --git a/templates/force/arp/node.def b/templates/force/arp/node.def new file mode 100644 index 0000000..950c9b4 --- /dev/null +++ b/templates/force/arp/node.def @@ -0,0 +1 @@ +help: Send gratuitous ARP request or reply diff --git a/templates/force/arp/reply/interface/node.def b/templates/force/arp/reply/interface/node.def new file mode 100644 index 0000000..7679d1a --- /dev/null +++ b/templates/force/arp/reply/interface/node.def @@ -0,0 +1 @@ +help: Send gratuitous ARP reply on specified interface diff --git a/templates/force/arp/reply/interface/node.tag/address/node.def b/templates/force/arp/reply/interface/node.tag/address/node.def new file mode 100644 index 0000000..d184b9a --- /dev/null +++ b/templates/force/arp/reply/interface/node.tag/address/node.def @@ -0,0 +1 @@ +help: Send gratuitous ARP reply for specified address diff --git a/templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.def b/templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.def new file mode 100644 index 0000000..beddd12 --- /dev/null +++ b/templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.def @@ -0,0 +1 @@ +help: Send specificed number of ARP replies diff --git a/templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.tag/node.def b/templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.tag/node.def new file mode 100644 index 0000000..220117d --- /dev/null +++ b/templates/force/arp/reply/interface/node.tag/address/node.tag/count/node.tag/node.def @@ -0,0 +1,2 @@ +help: Send specified number of ARP replies +run: sudo arping -I $5 -c $9 -A $7 diff --git a/templates/force/arp/reply/interface/node.tag/address/node.tag/node.def b/templates/force/arp/reply/interface/node.tag/address/node.tag/node.def new file mode 100644 index 0000000..13689df --- /dev/null +++ b/templates/force/arp/reply/interface/node.tag/address/node.tag/node.def @@ -0,0 +1,2 @@ +help: Send gratuitous ARP reply for specified address +run: sudo arping -I $5 -c 1 -A $7 diff --git a/templates/force/arp/reply/interface/node.tag/node.def b/templates/force/arp/reply/interface/node.tag/node.def new file mode 100644 index 0000000..53ab7d2 --- /dev/null +++ b/templates/force/arp/reply/interface/node.tag/node.def @@ -0,0 +1,6 @@ +help: Send gratuitous ARP reply for specific address +allowed: local -a vals; + vals=($(${vyatta_sbindir}/vyatta-interfaces.pl --show ethernet)); + vals+=($(${vyatta_sbindir}/vyatta-interfaces.pl --show bridge)); + vals+=($(${vyatta_sbindir}/vyatta-interfaces.pl --show bonding)); + echo ${vals[@]}; diff --git a/templates/force/arp/reply/node.def b/templates/force/arp/reply/node.def new file mode 100644 index 0000000..f3e2cbf --- /dev/null +++ b/templates/force/arp/reply/node.def @@ -0,0 +1 @@ +help: Send gratuitous ARP reply diff --git a/templates/force/arp/request/interface/node.def b/templates/force/arp/request/interface/node.def new file mode 100644 index 0000000..a510469 --- /dev/null +++ b/templates/force/arp/request/interface/node.def @@ -0,0 +1 @@ +help: Send gratuitous ARP request on specified interface diff --git a/templates/force/arp/request/interface/node.tag/address/node.def b/templates/force/arp/request/interface/node.tag/address/node.def new file mode 100644 index 0000000..d9c709f --- /dev/null +++ b/templates/force/arp/request/interface/node.tag/address/node.def @@ -0,0 +1 @@ +help: Send gratuitous ARP request for specified address diff --git a/templates/force/arp/request/interface/node.tag/address/node.tag/count/node.def b/templates/force/arp/request/interface/node.tag/address/node.tag/count/node.def new file mode 100644 index 0000000..43154a8 --- /dev/null +++ b/templates/force/arp/request/interface/node.tag/address/node.tag/count/node.def @@ -0,0 +1 @@ +help: Send specificed number of ARP requests diff --git a/templates/force/arp/request/interface/node.tag/address/node.tag/count/node.tag/node.def b/templates/force/arp/request/interface/node.tag/address/node.tag/count/node.tag/node.def new file mode 100644 index 0000000..9066e74 --- /dev/null +++ b/templates/force/arp/request/interface/node.tag/address/node.tag/count/node.tag/node.def @@ -0,0 +1,3 @@ +help: Send specified number for ARP requests +allowed: echo -n ' Number of ARP requests' +run: sudo arping -I $5 -c $9 -U $7 diff --git a/templates/force/arp/request/interface/node.tag/address/node.tag/node.def b/templates/force/arp/request/interface/node.tag/address/node.tag/node.def new file mode 100644 index 0000000..76e2773 --- /dev/null +++ b/templates/force/arp/request/interface/node.tag/address/node.tag/node.def @@ -0,0 +1,2 @@ +help: Send gratuitous ARP request for specified address +run: sudo arping -I $5 -c 1 -U $7 diff --git a/templates/force/arp/request/interface/node.tag/node.def b/templates/force/arp/request/interface/node.tag/node.def new file mode 100644 index 0000000..26497eb --- /dev/null +++ b/templates/force/arp/request/interface/node.tag/node.def @@ -0,0 +1,6 @@ +help: Send gratuitous ARP request for specific address +allowed: local -a vals; + vals=($(${vyatta_sbindir}/vyatta-interfaces.pl --show ethernet)); + vals+=($(${vyatta_sbindir}/vyatta-interfaces.pl --show bridge)); + vals+=($(${vyatta_sbindir}/vyatta-interfaces.pl --show bonding)); + echo ${vals[@]}; diff --git a/templates/force/arp/request/node.def b/templates/force/arp/request/node.def new file mode 100644 index 0000000..234961e --- /dev/null +++ b/templates/force/arp/request/node.def @@ -0,0 +1 @@ +help: Send gratuitous ARP request -- cgit v1.2.3