diff options
author | Aristeidis Iliopoulos <ailiopou@cisco.com> | 2016-09-15 11:36:44 -0700 |
---|---|---|
committer | Aristeidis Iliopoulos <ailiopou@cisco.com> | 2016-09-15 18:21:20 -0700 |
commit | 417c664ee2bc2a032969639d53b43b732d428e9e (patch) | |
tree | 3f17e15f6d0861bb0e35d79771e42e3b7a2d92ea /vpp-userdemo/tutorials | |
parent | 764d4be74089c635598c6f139afc087d1ac55659 (diff) |
Added GUI for tutorials that runs entirely inside the VM
-fixed issue with webserver not spinning up properly
Change-Id: I3724f1640ba2b84b7d84fab29febbbd047120812
Signed-off-by: Aristeidis Iliopoulos <ailiopou@cisco.com>
Diffstat (limited to 'vpp-userdemo/tutorials')
-rw-r--r-- | vpp-userdemo/tutorials/bridging | 57 | ||||
-rw-r--r-- | vpp-userdemo/tutorials/routing | 57 | ||||
-rw-r--r-- | vpp-userdemo/tutorials/tracing | 46 |
3 files changed, 160 insertions, 0 deletions
diff --git a/vpp-userdemo/tutorials/bridging b/vpp-userdemo/tutorials/bridging new file mode 100644 index 0000000..533986e --- /dev/null +++ b/vpp-userdemo/tutorials/bridging @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +C1_IP="172.16.1.2/24" +C1_GW="172.16.1.1" +C2_IP="172.16.1.3/24" +C2_GW="172.16.1.1" + +INSTR=() +CMD=() +INSTR+=("Welcome to the bridging demo. This will show you some simple commands to connect two linux containers to VPP via an L2 bridge.") +CMD+=("") + +INSTR+=("To show interfaces type:") +CMD+=("sudo vppctl show inter") + +INSTR+=("Lets examine our workloads cone and ctwo") +CMD+=("sudo lxc-attach -n cone -- ip -o a") + +INSTR+=("") +CMD+=("sudo lxc-attach -n ctwo -- ip -o a") + +INSTR+=("To add interfaces, we add the host-side of the veth link pair.") +CMD+=("ip link") + +INSTR+=("The links we need to add are link1 and link2 so lets add them with") +CMD+=("sudo vppctl create host-interface name link1; sudo vppctl create host-interface name link2; sudo vppctl show inter") + +INSTR+=("Change the links state to up") +CMD+=("sudo vppctl set interface state host-link1 up; sudo vppctl set interface state host-link2 up; sudo vppctl show inter") + +INSTR+=("Add IP addresses for the other end of each veth link") +CMD+=("sudo vppctl set interface l2 bridge host-link1 1; sudo vppctl set interface l2 bridge host-link2 1") + +INSTR+=("You can also see the bridge-domain") +CMD+=("sudo vppctl show bridge-domain 1 detail") + +INSTR+=("At long last you probably want to see some pings") +CMD+=("sudo lxc-attach -n cone -- ping -c3 172.16.1.3") + +INSTR+=("") +CMD+=("sudo lxc-attach -n ctwo -- ping -c3 172.16.1.2") + +INSTR+=("Thanks for doing the bridging demo. To restart this demo and type these commands yourself \nvagrant ssh \nsudo /vagrant/netns.sh \ncat /vagrant/bridging.cmd") +CMD+=("") diff --git a/vpp-userdemo/tutorials/routing b/vpp-userdemo/tutorials/routing new file mode 100644 index 0000000..cd3d4cc --- /dev/null +++ b/vpp-userdemo/tutorials/routing @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +C1_IP="172.16.1.2/24" +C1_GW="172.16.1.1" +C2_IP="172.16.2.2/24" +C2_GW="172.16.2.1" + +INSTR=() +CMD=() +INSTR+=("Welcome to the routing demo. This will show you some simple commands to connect two linux containers to VPP and ping between them.") +CMD+=("") + +INSTR+=("To show interfaces type:") +CMD+=("sudo vppctl show inter") + +INSTR+=("Lets examine our workloads cone and ctwo") +CMD+=("sudo lxc-attach -n cone -- ip -o a") + +INSTR+=("") +CMD+=("sudo lxc-attach -n ctwo -- ip -o a") + +INSTR+=("To add interfaces, we add the host-side of the veth link pair.") +CMD+=("ip link") + +INSTR+=("The links we need to add are link1 and link2 so lets add them with") +CMD+=("sudo vppctl create host-interface name link1; sudo vppctl create host-interface name link2; sudo vppctl show inter") + +INSTR+=("Change the links state to up") +CMD+=("sudo vppctl set interface state host-link1 up; sudo vppctl set interface state host-link2 up; sudo vppctl show inter") + +INSTR+=("Add IP addresses for the other end of each veth link") +CMD+=("sudo vppctl set interface ip address host-link1 172.16.1.1/24; sudo vppctl set interface ip address host-link2 172.16.2.1/24; sudo vppctl show interface address") + +INSTR+=("You can also see the L3 table, or FIB by doing") +CMD+=("sudo vppctl show ip fib") + +INSTR+=("At long last you probably want to see some pings") +CMD+=("sudo lxc-attach -n cone -- ping -c3 172.16.2.2") + +INSTR+=("") +CMD+=("sudo lxc-attach -n ctwo -- ping -c3 172.16.1.2") + +INSTR+=("Thanks for doing the routing demo. To restart this demo and type these commands yourself \nvagrant ssh \nsudo /vagrant/netns.sh \ncat /vagrant/routing.cmd") +CMD+=("") diff --git a/vpp-userdemo/tutorials/tracing b/vpp-userdemo/tutorials/tracing new file mode 100644 index 0000000..3ef6d15 --- /dev/null +++ b/vpp-userdemo/tutorials/tracing @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# Copyright (c) 2016 Cisco and/or its affiliates. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +C1_IP="172.16.1.2/24" +C1_GW="172.16.1.1" +C2_IP="172.16.2.2/24" +C2_GW="172.16.2.1" + +INSTR=() +CMD=() +INSTR+=("Welcome to the tracing demo. This will show you some simple commands to connect two +linux netnamespaces to VPP and show packet tracing.") +CMD+=("") + +INSTR+=("The links we need to add are link1 and link2 so lets add them with") +CMD+=("sudo vppctl create host-interface name link1; sudo vppctl create host-interface name link2; sudo vppctl set interface state host-link1 up; sudo vppctl set interface state host-link2 up; sudo vppctl show inter") + +INSTR+=("Add IP addresses for the other end of each veth link") +CMD+=("sudo vppctl set interface ip address host-link1 172.16.1.1/24; sudo vppctl set interface ip address host-link2 172.16.2.1/24; sudo vppctl show interface address") + +INSTR+=("Lets add the trace command for the graph-node our type of interface af-packet...") +CMD+=("sudo vppctl trace add af-packet-input 50") + +INSTR+=("At long last you probably want to see some pings") +CMD+=("sudo lxc-attach -n cone -- ping -c3 172.16.2.2") + +INSTR+=("") +CMD+=("sudo lxc-attach -n ctwo -- ping -c3 172.16.1.2") + +INSTR+=("Viewing the trace:") +CMD+=("sudo vppctl show trace") + +INSTR+=("Thanks for doing the tracing demo. To restart this demo and type these commands yourself \nvagrant ssh \nsudo /vagrant/netns.sh \ncat /vagrant/tracing.cmd") +CMD+=("") |