misc: move configs to extras/configs

Type: refactor

Change-Id: I64665b290e2c42bbd9b0e877e9e4b028090b0ede
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2020-01-30 21:18:39 +01:00
committed by Damjan Marion
parent d1e6b2937d
commit ffad890961
8 changed files with 0 additions and 0 deletions

View File

@@ -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 >}}

View File

@@ -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

View File

@@ -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
}

View File

@@ -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

View File

@@ -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

View File

@@ -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
}
}

View File

@@ -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 }

View File

@@ -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