aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-userdemo/tracing
blob: 11b189abf014a52a8af766c5f4eb05d765c949e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 ip netns exec c1 ping -c3 172.16.2.2")

INSTR+=("")
CMD+=("sudo ip netns exec c2 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+=("")