summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2008-07-29 10:24:29 -0700
committerStig Thormodsrud <stig@vyatta.com>2008-07-29 10:24:29 -0700
commit54d18d355f8a0cbb02c82dff616b8588a5aa80d0 (patch)
treef213f28822d683b6b3bd639c569461b9b1e6798c /templates
parent9fa05e4f5b97f604cf610b29626a1a41ab1a044c (diff)
downloadvyatta-op-54d18d355f8a0cbb02c82dff616b8588a5aa80d0.tar.gz
vyatta-op-54d18d355f8a0cbb02c82dff616b8588a5aa80d0.zip
Add some ipv6 op mode commands.
Diffstat (limited to 'templates')
-rw-r--r--templates/clear/arp6/address/node.def1
-rw-r--r--templates/clear/arp6/address/node.tag/node.def3
-rw-r--r--templates/clear/arp6/interface/node.def1
-rw-r--r--templates/clear/arp6/interface/node.tag/node.def5
-rw-r--r--templates/clear/arp6/node.def1
-rw-r--r--templates/clear/ipv6/route/cache/node.def2
-rw-r--r--templates/clear/ipv6/route/cache/node.tag/node.def3
-rw-r--r--templates/clear/ipv6/route/node.def1
-rw-r--r--templates/ping6/node.def4
-rw-r--r--templates/ping6/node.tag/node.def9
-rw-r--r--templates/show/arp6/node.def2
-rw-r--r--templates/show/ipv6/route/cache/node.def2
-rw-r--r--templates/show/ipv6/route/cache/node.tag/node.def3
-rw-r--r--templates/show/ipv6/route/forward/node.def2
-rw-r--r--templates/show/ipv6/route/forward/node.tag/node.def3
-rw-r--r--templates/traceroute6/node.def4
-rw-r--r--templates/traceroute6/node.tag/node.def26
17 files changed, 72 insertions, 0 deletions
diff --git a/templates/clear/arp6/address/node.def b/templates/clear/arp6/address/node.def
new file mode 100644
index 0000000..dc27e11
--- /dev/null
+++ b/templates/clear/arp6/address/node.def
@@ -0,0 +1 @@
+help: Clear ARP cache for an IPv6 address
diff --git a/templates/clear/arp6/address/node.tag/node.def b/templates/clear/arp6/address/node.tag/node.def
new file mode 100644
index 0000000..fe94cdd
--- /dev/null
+++ b/templates/clear/arp6/address/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Clear ARP cache for an IPv6 address
+allowed: echo -n '<h:h:h:h:h:h:h:h>'
+run: sudo /sbin/ip -f inet6 neigh flush to "$4"
diff --git a/templates/clear/arp6/interface/node.def b/templates/clear/arp6/interface/node.def
new file mode 100644
index 0000000..306b999
--- /dev/null
+++ b/templates/clear/arp6/interface/node.def
@@ -0,0 +1 @@
+help: Clear IPv6 ARP cache for interface
diff --git a/templates/clear/arp6/interface/node.tag/node.def b/templates/clear/arp6/interface/node.tag/node.def
new file mode 100644
index 0000000..2766b17
--- /dev/null
+++ b/templates/clear/arp6/interface/node.tag/node.def
@@ -0,0 +1,5 @@
+help: Clear IPv6 ARP cache for interface
+allowed: local -a array ;
+ array=( /sys/class/net/{eth,vmnet}* ) ;
+ echo -n ${array[@]##*/}
+run: sudo /sbin/ip -f inet6 neigh flush dev "$4"
diff --git a/templates/clear/arp6/node.def b/templates/clear/arp6/node.def
new file mode 100644
index 0000000..e4d5ff3
--- /dev/null
+++ b/templates/clear/arp6/node.def
@@ -0,0 +1 @@
+help: Clear IPv6 Address Resolution Protocol (ARP) cache
diff --git a/templates/clear/ipv6/route/cache/node.def b/templates/clear/ipv6/route/cache/node.def
new file mode 100644
index 0000000..7dee140
--- /dev/null
+++ b/templates/clear/ipv6/route/cache/node.def
@@ -0,0 +1,2 @@
+help: Flush the kernel IPv6 route cache
+run: sudo /sbin/ip -f inet6 route flush cache
diff --git a/templates/clear/ipv6/route/cache/node.tag/node.def b/templates/clear/ipv6/route/cache/node.tag/node.def
new file mode 100644
index 0000000..af6a3db
--- /dev/null
+++ b/templates/clear/ipv6/route/cache/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Flush the kernel IPv6 route cache for a given route
+allowed: echo -n '<h:h:h:h:h:h:h:h | h:h:h:h:h:h:h:h/x>'
+run: sudo /sbin/ip -f inet6 route flush cache "$5"
diff --git a/templates/clear/ipv6/route/node.def b/templates/clear/ipv6/route/node.def
new file mode 100644
index 0000000..bb1b049
--- /dev/null
+++ b/templates/clear/ipv6/route/node.def
@@ -0,0 +1 @@
+help: Clear IPv6 route
diff --git a/templates/ping6/node.def b/templates/ping6/node.def
new file mode 100644
index 0000000..20cc018
--- /dev/null
+++ b/templates/ping6/node.def
@@ -0,0 +1,4 @@
+#
+# Operational mode template for the "ping" command
+#
+help: Send IPv6 Internet Control Message Protocol (ICMP) echo request
diff --git a/templates/ping6/node.tag/node.def b/templates/ping6/node.tag/node.def
new file mode 100644
index 0000000..7dc822c
--- /dev/null
+++ b/templates/ping6/node.tag/node.def
@@ -0,0 +1,9 @@
+#
+# Operational mode front-end for "ping" command
+#
+
+help: Send IPv6 ICMP echo request to specified <hostname|IPv6 address>
+allowed:
+ vyatta-allowed-hosts
+
+run: /bin/ping6 $2
diff --git a/templates/show/arp6/node.def b/templates/show/arp6/node.def
new file mode 100644
index 0000000..c45f295
--- /dev/null
+++ b/templates/show/arp6/node.def
@@ -0,0 +1,2 @@
+help: Show IPv6 Address Resolution Protocol (ARP) information
+run: /bin/ip -f inet6 neigh list
diff --git a/templates/show/ipv6/route/cache/node.def b/templates/show/ipv6/route/cache/node.def
new file mode 100644
index 0000000..45604e8
--- /dev/null
+++ b/templates/show/ipv6/route/cache/node.def
@@ -0,0 +1,2 @@
+help: Show kernel IPv6 route cache
+run: ip -s -f inet6 route list cache
diff --git a/templates/show/ipv6/route/cache/node.tag/node.def b/templates/show/ipv6/route/cache/node.tag/node.def
new file mode 100644
index 0000000..8386f1f
--- /dev/null
+++ b/templates/show/ipv6/route/cache/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show kernel IPv6 route cache for a given route
+allowed: echo -n '<h:h:h:h:h:h:h:h | h:h:h:h:h:h:h:h/x>'
+run: ip -s -f inet6 route list cache $5
diff --git a/templates/show/ipv6/route/forward/node.def b/templates/show/ipv6/route/forward/node.def
new file mode 100644
index 0000000..cad0bb9
--- /dev/null
+++ b/templates/show/ipv6/route/forward/node.def
@@ -0,0 +1,2 @@
+help: Show kernel IPv6 route table
+run: ip -f inet6 route list
diff --git a/templates/show/ipv6/route/forward/node.tag/node.def b/templates/show/ipv6/route/forward/node.tag/node.def
new file mode 100644
index 0000000..942a4f1
--- /dev/null
+++ b/templates/show/ipv6/route/forward/node.tag/node.def
@@ -0,0 +1,3 @@
+help: Show kernel IPv6 route table for a given route
+allowed: echo -n '<x.x.x.x | x.x.x.x/x>'
+run: ip -s -f inet6 route list $5
diff --git a/templates/traceroute6/node.def b/templates/traceroute6/node.def
new file mode 100644
index 0000000..1075c44
--- /dev/null
+++ b/templates/traceroute6/node.def
@@ -0,0 +1,4 @@
+#
+# Operational mode template for the "traceroute" command
+#
+help: Track network path to <hostname|IPv6 address>
diff --git a/templates/traceroute6/node.tag/node.def b/templates/traceroute6/node.tag/node.def
new file mode 100644
index 0000000..5148e6d
--- /dev/null
+++ b/templates/traceroute6/node.tag/node.def
@@ -0,0 +1,26 @@
+#
+# Operational mode template for the "traceroute" command
+#
+
+help: Track network path to specified <hostname|IPv6 address>
+allowed:
+ vyatta-allowed-hosts
+
+run:
+ if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $2
+ then
+ /usr/bin/traceroute6 $2
+ echo
+ else
+ if cat /etc/resolv.conf 2> /dev/null | grep -q nameserver
+ then
+ if /usr/bin/host $2 &> /dev/null
+ then
+ /usr/bin/traceroute6 $2
+ else
+ echo "Invalid IPv6 address or host name '$2'"
+ fi
+ else
+ echo "Either enter a valid IPv6 address or configure Domain Name Server to resolve host names"
+ fi
+ fi