summaryrefslogtreecommitdiffstats
path: root/extras/configs
diff options
context:
space:
mode:
Diffstat (limited to 'extras/configs')
-rw-r--r--extras/configs/http/sample.md82
-rw-r--r--extras/configs/http/setup.http7
-rw-r--r--extras/configs/http/startup.cfg9
-rw-r--r--extras/configs/nsim/setup.nsim25
-rw-r--r--extras/configs/oddbuf/setup.oddbuf276
-rw-r--r--extras/configs/pcapcli/setup.pcapcli34
-rw-r--r--extras/configs/pcapcli/setup.tracefilter22
-rw-r--r--extras/configs/static_http/setup.http6
8 files changed, 461 insertions, 0 deletions
diff --git a/extras/configs/http/sample.md b/extras/configs/http/sample.md
new file mode 100644
index 00000000000..8451cedd8a5
--- /dev/null
+++ b/extras/configs/http/sample.md
@@ -0,0 +1,82 @@
+---
+title: Home
+---
+
+# VPP Status
+
+### Here's the version...
+
+VPP version: <div id="VPPversion"></div>
+
+build date: <div id="VPPbuilddate"></div>
+
+<div id="like_button_container"></div>
+
+### Show Interface
+
+<p>Enter the interface name, then click "Submit" to display interface stats:</p>
+
+<input id="ifacename" type="text"></input>
+<button onclick="getStats()">Get Stats</button>
+
+<div id="ifacestats"></div>
+
+{{< rawhtml >}}
+
+<script>
+function getStats() {
+ var url="http://192.168.10.1:1234/interface_stats.json?";
+ var iface=document.getElementById("ifacename").value;
+ url=url.concat(iface);
+ fetch(url, {
+ method: 'POST',
+ mode: 'no-cors',
+ cache: 'no-cache',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+})
+.then((response) => response.json())
+.then(function(obj) {
+ console.log(obj)
+ var result=obj.interface_stats.name;
+ result = result.concat(": rx-pkts: ");
+ result = result.concat(obj.interface_stats.rx_packets);
+ result = result.concat(" rx-bytes: ");
+ result = result.concat(obj.interface_stats.rx_bytes);
+ result = result.concat(": tx-pkts: ");
+ result = result.concat(obj.interface_stats.tx_packets);
+ result = result.concat(" tx-bytes: ");
+ result = result.concat(obj.interface_stats.tx_bytes);
+ result = result.concat(" drops: ");
+ result = result.concat(obj.interface_stats.drops);
+ result = result.concat(" ip4: ");
+ result = result.concat(obj.interface_stats.ip4);
+ result = result.concat(" ip6: ");
+ result = result.concat(obj.interface_stats.ip6);
+
+ document.getElementById("ifacestats").innerHTML=result;
+})
+.catch(function(error) {
+ console.log(error);
+})}
+// unconditionally populate vpp version info ->
+fetch('http://192.168.10.1:1234/version.json', {
+ method: 'GET',
+ mode: 'no-cors',
+ cache: 'no-cache',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+})
+.then((response) => response.json())
+.then(function(obj) {
+ document.getElementById("VPPbuilddate").innerHTML=obj.vpp_details.build_date;
+ document.getElementById("VPPversion").innerHTML=obj.vpp_details.version;
+})
+.catch(function(error) {
+ console.log(error);
+});
+</script>
+
+{{< /rawhtml >}}
diff --git a/extras/configs/http/setup.http b/extras/configs/http/setup.http
new file mode 100644
index 00000000000..78b7a2f19e8
--- /dev/null
+++ b/extras/configs/http/setup.http
@@ -0,0 +1,7 @@
+set term pag off
+create tap host-if-name lstack host-ip4-addr 192.168.10.2/24
+set int ip address tap0 192.168.10.1/24
+set int state tap0 up
+
+http static server www-root <path> uri tcp://0.0.0.0/1234 cache-size 10m fifo-size 2048
+builtinurl enable
diff --git a/extras/configs/http/startup.cfg b/extras/configs/http/startup.cfg
new file mode 100644
index 00000000000..b2a50d3412a
--- /dev/null
+++ b/extras/configs/http/startup.cfg
@@ -0,0 +1,9 @@
+unix {
+ interactive
+ poll-sleep-usec 500
+ startup-config /scratch/vpp-http/extras/http/setup.http
+}
+
+tls {
+ use-test-cert-in-ca
+}
diff --git a/extras/configs/nsim/setup.nsim b/extras/configs/nsim/setup.nsim
new file mode 100644
index 00000000000..999b92a901a
--- /dev/null
+++ b/extras/configs/nsim/setup.nsim
@@ -0,0 +1,25 @@
+set term pag off
+
+loop cre
+
+set int ip address loop0 192.168.2.1/24
+set int state loop0 up
+set nsim delay 20 ms bandwidth 1 gbit packet-size 128
+comment { add drop-fraction 0.8 or some such}
+nsim output-feature enable-disable loop0
+
+packet-generator new {
+ name icmp
+ limit 0
+ size 128-128
+ interface local0
+ node ethernet-input
+ data {
+ IP4: 0001.dead.beef -> 0002.dead.beef
+ ICMP: 192.168.1.2 -> 192.168.2.2
+ incrementing 30
+ }
+}
+
+set int ip address pg0 192.168.1.1/24
+set ip arp loop0 192.168.2.2 0003.dead.beef
diff --git a/extras/configs/oddbuf/setup.oddbuf b/extras/configs/oddbuf/setup.oddbuf
new file mode 100644
index 00000000000..d59db566d11
--- /dev/null
+++ b/extras/configs/oddbuf/setup.oddbuf
@@ -0,0 +1,276 @@
+set term pag off
+loop create
+set int state loop0 up
+oddbuf enable loop0
+
+packet-generator new {
+ name oddbuf
+ limit 1
+ size 300-300
+ interface loop0
+ node ethernet-input
+ data { IP4: 1.2.3 -> 4.5.6
+ UDP: 11.22.33.44 -> 11.22.34.44
+ UDP: 1234 -> 2345
+ incrementing 286
+ }
+}
+pcap dispatch trace on max 10000 buffer-trace pg-input 1000
+
+oddbuf configure n_to_copy 2 offset 1 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 1 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 2 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 3 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 4 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 5 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 6 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 7 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 0 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 1 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 2 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 3 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 4 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 5 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 6 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 7 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 0 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 1 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 2 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 3 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 4 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 5 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 6 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 7 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 0 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 1 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 2 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 3 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 4 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 5 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 6 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 7 first_offset 5
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 1 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 1 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 2 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 3 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 4 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 5 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 6 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 2 offset 7 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 0 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 1 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 2 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 3 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 4 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 5 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 6 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 3 offset 7 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 0 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 1 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 2 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 3 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 4 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 5 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 6 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 4 offset 7 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 0 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 1 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 2 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 3 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 4 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 5 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 6 first_offset 0
+pa en oddbuf
+suspend
+
+oddbuf configure n_to_copy 5 offset 7 first_offset 0
+pa en oddbuf
+suspend
+
+pcap dispatch trace off
diff --git a/extras/configs/pcapcli/setup.pcapcli b/extras/configs/pcapcli/setup.pcapcli
new file mode 100644
index 00000000000..66f3caebf63
--- /dev/null
+++ b/extras/configs/pcapcli/setup.pcapcli
@@ -0,0 +1,34 @@
+set term pag off
+loop create
+loop create
+set int ip address loop0 192.168.1.1/24
+set int state loop0 up
+
+set int ip address loop1 192.168.2.1/24
+set int state loop1 up
+
+packet-generator new {
+ name pg0
+ limit 1
+ size 300-300
+ interface loop0
+ node ethernet-input
+ data { IP4: 1.2.3 -> 4.5.6
+ UDP: 192.168.1.10 -> 192.168.2.10
+ UDP: 1234 -> 2345
+ incrementing 286
+ }
+}
+
+packet-generator new {
+ name pg1
+ limit 1
+ size 300-300
+ interface loop1
+ node ethernet-input
+ data { IP4: 1.2.3 -> 4.5.6
+ UDP: 192.168.2.10 -> 192.168.1.10
+ UDP: 1234 -> 2345
+ incrementing 286
+ }
+}
diff --git a/extras/configs/pcapcli/setup.tracefilter b/extras/configs/pcapcli/setup.tracefilter
new file mode 100644
index 00000000000..db07a0e4224
--- /dev/null
+++ b/extras/configs/pcapcli/setup.tracefilter
@@ -0,0 +1,22 @@
+set term pag off
+loop create
+
+set int ip address loop0 192.168.1.1/24
+set int state loop0 up
+
+packet-generator new {
+ name pg0
+ limit 100
+ size 300-300
+ interface loop0
+ node ethernet-input
+ data { IP4: 1.2.3 -> 4.5.6
+ UDP: 192.168.1.10 - 192.168.1.20 -> 192.168.2.10
+ UDP: 1234 -> 2345
+ incrementing 286
+ }
+}
+
+comment { Pick one, uncomment, and "pcap rx ..." or "trace add pg-input ..." }
+comment { classify filter trace mask l3 ip4 src match l3 ip4 src 192.168.1.15 }
+comment { classify filter pcap mask l3 ip4 src match l3 ip4 src 192.168.1.15 }
diff --git a/extras/configs/static_http/setup.http b/extras/configs/static_http/setup.http
new file mode 100644
index 00000000000..9b99f60201b
--- /dev/null
+++ b/extras/configs/static_http/setup.http
@@ -0,0 +1,6 @@
+set term pag off
+create tap host-if-name lstack host-ip4-addr 192.168.10.2/24
+set int ip address tap0 192.168.10.1/24
+set int state tap0 up
+
+http static server www-root /tmp/www uri tcp://0.0.0.0/80 cache-size 1m