blob: 0a50212f0ce0ae18ab86f3ce73c32ccc5dfcbedf [file] [log] [blame]
Charles Chan78a737f2019-09-12 13:55:22 -07001Troubleshooting Guide
2*********************
3
Charles Chan4ade88d2019-09-16 16:30:31 -07004Overview
5========
6
Zack Williamsd63d35b2020-06-23 14:12:46 -07007The **Trellis Troubleshooting Tools (T3)** is an ONOS application intended to
8**help you troubleshoot traffic-related problems** in your network by **tracing
9installed flows and groups**.
10
11T3 works both on simulated OVS-based topologies but also on real HW, basing
12it's internal decisions on the driver assigned to the device.
13
14T3 also currently supports dual links between leaf and spine and properly
15handles the difference between deferred and immediate rules. Dual Homed hosts
16are also supported in T3.
Charles Chan4ade88d2019-09-16 16:30:31 -070017
18To activate this tool on your ONOS environment, you need to run:
19
20.. code-block:: console
21
Charles Chan8299f072019-09-23 11:32:26 -070022 onos> app activate t3
Charles Chan4ade88d2019-09-16 16:30:31 -070023
24T3 supports tracing of following packet types:
25
26- L2 Unicast
27- L2 Broadcast
28- L3 Unicast (both IPv4 and IPv6)
29- L3 Multicast (both IPv4 and IPv6)
30- LLDP and BDDP
31- ARP
32- DHCP
33
34
35t3-troubleshoot
36===============
Zack Williamsd63d35b2020-06-23 14:12:46 -070037
Charles Chan4ade88d2019-09-16 16:30:31 -070038As of right now the tools provides a CLI command (troubleshoot).
Zack Williamsd63d35b2020-06-23 14:12:46 -070039
40As arguments to the CLI command you have to pass arguments describing the
41packet you want to trace through the network.
Charles Chan4ade88d2019-09-16 16:30:31 -070042
43t3-troubleshoot Help
44--------------------
45
46.. code-block:: console
47
Charles Chan8299f072019-09-23 11:32:26 -070048 onos> t3-troubleshoot --help
49 DESCRIPTION
50 onos:troubleshoot
Charles Chan4ade88d2019-09-16 16:30:31 -070051
Charles Chan8299f072019-09-23 11:32:26 -070052 troubleshoots flows and groups between source and destination
Charles Chan4ade88d2019-09-16 16:30:31 -070053
Charles Chan8299f072019-09-23 11:32:26 -070054 SYNTAX
55 onos:troubleshoot [options]
Charles Chan4ade88d2019-09-16 16:30:31 -070056
Charles Chan8299f072019-09-23 11:32:26 -070057 OPTIONS
58 -sm, --srcMac
59 Source MAC
60 -j, --json
61 Output JSON
62 --help
63 Display this help message
64 -v, --verbose
65 Outputs complete path
66 -ipp, --ipProto
67 IP Proto
68 -s, --srcIp
69 Source IP
70 -dm, --dstMac
71 Destination MAC
72 -ml, --mplsLabel
73 Mpls label of incoming packet
74 -vv, --veryverbose
75 Outputs flows and groups for every device
76 -udps, --udpSrc
77 UDP Source
78 -mb, --mplsBos
79 MPLS BOS
80 -et, --ethType
81 ETH Type
82 (defaults to ipv4)
83 -sp, --srcPort
84 Source Port
85 -dtp, --dstTcpPort
86 destination TCP Port
87 -udpd, --udpDst
88 UDP Destination
89 -stp, --srcTcpPort
90 Source TCP Port
91 -d, --dstIp
92 Destination IP
93 -vid, --vlanId
94 Vlan of incoming packet
95 (defaults to None)
Charles Chan4ade88d2019-09-16 16:30:31 -070096
97Default Verbosity Level
98-----------------------
99Let's look at an example.
100
101.. code-block:: console
102
Charles Chan8299f072019-09-23 11:32:26 -0700103 onos> t3-troubleshoot -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -et IPV4 -d 10.0.3.1 -dm 00:00:00:00:02:04 -vid None
Charles Chan4ade88d2019-09-16 16:30:31 -0700104
105with this command we are asking the t3 tool to trace a packet with
106
107- Source IP of ``10.0.2.1/32``
108- Input port ``of:0000000000000204/3``
109- Source MAC ``00:AA:00:00:00:01``
110- ethType ``IPv4``
111- Source TCP Port ``12345``
112- Destination IP ``10.0.3.1/32``
113- Destination MAC ``00:AA:00:00:00:01``
114- Destination TCP Port ``80`` and
115- VLAN ID ``None``
116
117This command has a verbosity level of 0 and will output just the paths that the packet might take inside the network.
118In the example deployment taken from trellis.py [#trellis.py]_, the output will be:
119
120.. code-block:: console
121
Charles Chan8299f072019-09-23 11:32:26 -0700122 Tracing packet: [IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_SRC:00:AA:00:00:00:01, ETH_TYPE:ipv4, VLAN_VID:None, IPV4_SRC:10.0.2.1/32, IPV4_DST:10.0.3.1/32, TCP_SRC:12345, TCP_DST:80, MPLS_BOS:true]
123 Paths
124 [of:0000000000000204/3, of:0000000000000204/2, of:0000000000000227/1, of:0000000000000227/2, of:0000000000000205/2, of:0000000000000205/3]
125 [of:0000000000000204/3, of:0000000000000204/1, of:0000000000000226/1, of:0000000000000226/2, of:0000000000000205/1, of:0000000000000205/3]
126 Result:
127 Reached required destination Host
128 Reached required destination Host
Charles Chan4ade88d2019-09-16 16:30:31 -0700129
130Middle Verbosity Level
131----------------------
132There are also two other verbosity levels.
133
134.. code-block:: console
135
Charles Chan8299f072019-09-23 11:32:26 -0700136 onos> t3-troubleshoot -v -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -et IPV4 -d 10.0.3.1 -dm 00:00:00:00:02:04 -vid None
Charles Chan4ade88d2019-09-16 16:30:31 -0700137
138prints flows selectors and groupId that are met along the path
139
140.. code-block:: console
141
Charles Chan8299f072019-09-23 11:32:26 -0700142 Tracing packet: [IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_SRC:00:AA:00:00:00:01, ETH_TYPE:ipv4, VLAN_VID:None, IPV4_SRC:10.0.2.1/32, IPV4_DST:10.0.3.1/32, TCP_SRC:12345, TCP_DST:80, MPLS_BOS:true]
143 Path [of:0000000000000204/3, of:0000000000000204/2, of:0000000000000227/1, of:0000000000000227/2, of:0000000000000205/2, of:0000000000000205/3]
144 Device of:0000000000000204
145 Input from of:0000000000000204/3
146 Flows
147 flowId=a20000bd57cb49, selector=[]
148 flowId=900000d4173ff7, selector=[IN_PORT:3, VLAN_VID:None]
149 flowId=9000004b3d1965, selector=[IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_TYPE:ipv4, VLAN_VID:20]
150 flowId=900000499769f5, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.0/24]
151 flowId=a2000038b487e7, selector=[]
152 Groups
153 groupId=GroupId{id=0x70000010}
154 groupId=GroupId{id=0x9200000d}
155 groupId=GroupId{id=0x9000000c}
156 groupId=GroupId{id=0xffe0002}
157 groupId=GroupId{id=0x9200000f}
158 groupId=GroupId{id=0x9000000e}
159 groupId=GroupId{id=0xffe0001}
160 Output through of:0000000000000204/2
161 Device of:0000000000000227
162 Input from of:0000000000000227/1
163 Flows
164 flowId=a200005577bcd6, selector=[]
165 flowId=900000498457b2, selector=[IN_PORT:1, VLAN_VID:None]
166 flowId=900000f87746c9, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:27, ETH_TYPE:mpls_unicast, VLAN_VID:4094]
167 flowId=a200005bfd6ed7, selector=[]
168 flowId=9000009f3d554f, selector=[ETH_TYPE:mpls_unicast, MPLS_LABEL:205, MPLS_BOS:true]
169 flowId=a20000e601fc35, selector=[]
170 Groups
171 groupId=GroupId{id=0x70000017}
172 groupId=GroupId{id=0x20000016}
173 groupId=GroupId{id=0xffe0002}
174 Output through of:0000000000000227/2
175 Device of:0000000000000205
176 Input from of:0000000000000205/2
177 Flows
178 flowId=a200008d542817, selector=[]
179 flowId=900000be3179a0, selector=[IN_PORT:1, VLAN_VID:None]
180 flowId=900000766be164, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:05, ETH_TYPE:ipv4, VLAN_VID:4094]
181 flowId=900000ec1d5779, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.1/32]
182 flowId=a2000042d8e6b5, selector=[]
183 Groups
184 groupId=GroupId{id=0x2000002a}
185 groupId=GroupId{id=0x1e0003}
186 groupId=GroupId{id=0x2000002a}
187 groupId=GroupId{id=0x1e0003}
188 Output through of:0000000000000205/3
189 Path [of:0000000000000204/3, of:0000000000000204/1, of:0000000000000226/1, of:0000000000000226/2, of:0000000000000205/1, of:0000000000000205/3]
190 Device of:0000000000000204
191 Input from of:0000000000000204/3
192 Flows
193 flowId=a20000bd57cb49, selector=[]
194 flowId=900000d4173ff7, selector=[IN_PORT:3, VLAN_VID:None]
195 flowId=9000004b3d1965, selector=[IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_TYPE:ipv4, VLAN_VID:20]
196 flowId=900000499769f5, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.0/24]
197 flowId=a2000038b487e7, selector=[]
198 Groups
199 groupId=GroupId{id=0x70000010}
200 groupId=GroupId{id=0x9200000d}
201 groupId=GroupId{id=0x9000000c}
202 groupId=GroupId{id=0xffe0002}
203 groupId=GroupId{id=0x9200000f}
204 groupId=GroupId{id=0x9000000e}
205 groupId=GroupId{id=0xffe0001}
206 Output through of:0000000000000204/1
207 Device of:0000000000000226
208 Input from of:0000000000000226/1
209 Flows
210 flowId=a20000e9b27d24, selector=[]
211 flowId=9000004bd76105, selector=[IN_PORT:1, VLAN_VID:None]
212 flowId=90000069f274d1, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:26, ETH_TYPE:mpls_unicast, VLAN_VID:4094]
213 flowId=a200000ec7529e, selector=[]
214 flowId=90000050f9a350, selector=[ETH_TYPE:mpls_unicast, MPLS_LABEL:205, MPLS_BOS:true]
215 flowId=a20000b15cada6, selector=[]
216 Groups
217 groupId=GroupId{id=0x7000000b}
218 groupId=GroupId{id=0x20000009}
219 groupId=GroupId{id=0xffe0002}
220 Output through of:0000000000000226/2
221 Device of:0000000000000205
222 Input from of:0000000000000205/1
223 Flows
224 flowId=a200008d542817, selector=[]
225 flowId=900000be3179a0, selector=[IN_PORT:1, VLAN_VID:None]
226 flowId=900000766be164, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:05, ETH_TYPE:ipv4, VLAN_VID:4094]
227 flowId=900000ec1d5779, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.1/32]
228 flowId=a2000042d8e6b5, selector=[]
229 Groups
230 groupId=GroupId{id=0x2000002a}
231 groupId=GroupId{id=0x1e0003}
232 groupId=GroupId{id=0x2000002a}
233 groupId=GroupId{id=0x1e0003}
234 Output through of:0000000000000205/3
235 Result:
236 Reached required destination Host
237 Reached required destination Host
Charles Chan4ade88d2019-09-16 16:30:31 -0700238
239High Verbosity Level
240--------------------
241The most verbose output you can get is
242
243.. code-block:: console
244
Charles Chan8299f072019-09-23 11:32:26 -0700245 onos> t3-troubleshoot -vv -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -et IPV4 -d 10.0.3.1 -dm 00:00:00:00:02:04 -vid None
Charles Chan4ade88d2019-09-16 16:30:31 -0700246
Zack Williamsd63d35b2020-06-23 14:12:46 -0700247This verbosity level prints all the flows and groups that are met along the
248path:
Charles Chan4ade88d2019-09-16 16:30:31 -0700249
250.. code-block:: console
251
Charles Chan8299f072019-09-23 11:32:26 -0700252 Tracing packet: [IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_SRC:00:AA:00:00:00:01, ETH_TYPE:ipv4, VLAN_VID:None, IPV4_SRC:10.0.2.1/32, IPV4_DST:10.0.3.1/32, TCP_SRC:12345, TCP_DST:80, MPLS_BOS:true]
253 Path [of:0000000000000204/3, of:0000000000000204/2, of:0000000000000227/1, of:0000000000000227/2, of:0000000000000205/2, of:0000000000000205/3]
254 Device of:0000000000000204
255 Input from of:0000000000000204/3
256 Flows
257 ADDED, bytes=733506, packets=8691, table=0, priority=0, selector=[], treatment=[transition=TABLE:10]
258 ADDED, bytes=11110, packets=61, table=10, priority=32768, selector=[IN_PORT:3, VLAN_VID:None], treatment=[immediate=[VLAN_PUSH:vlan, VLAN_ID:20], transition=TABLE:20]
259 ADDED, bytes=8698, packets=29, table=20, priority=32768, selector=[IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_TYPE:ipv4, VLAN_VID:20], treatment=[transition=TABLE:30]
260 ADDED, bytes=16612, packets=50, table=30, priority=48010, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.0/24], treatment=[deferred=[GROUP:0x70000010], transition=TABLE:60]
261 ADDED, bytes=34400, packets=112, table=60, priority=0, selector=[], treatment=[immediate=[NOACTION]]
262 Groups
263 id=0x70000010, state=ADDED, type=SELECT, bytes=16906, packets=53, appId=org.onosproject.segmentrouting, referenceCount=3
264 id=0x70000010, bucket=1, bytes=490, packets=5, actions=[GROUP:0x9200000d]
265 id=0x70000010, bucket=2, bytes=16416, packets=48, actions=[GROUP:0x9200000f]
266 id=0x9200000d, state=ADDED, type=INDIRECT, bytes=490, packets=5, appId=org.onosproject.segmentrouting, referenceCount=0
267 id=0x9200000d, bucket=1, bytes=490, packets=5, actions=[VLAN_POP, MPLS_PUSH:mpls_unicast, MPLS_LABEL:205, GROUP:0x9000000c, VLAN_PUSH:vlan, VLAN_ID:4095]
268 id=0x9000000c, state=ADDED, type=INDIRECT, bytes=490, packets=5, appId=org.onosproject.segmentrouting, referenceCount=0
269 id=0x9000000c, bucket=1, bytes=490, packets=5, actions=[ETH_DST:00:00:00:00:02:27, ETH_SRC:00:00:00:00:02:04, VLAN_ID:4094, GROUP:0xffe0002]
270 id=0xffe0002, state=ADDED, type=INDIRECT, bytes=726, packets=7, appId=org.onosproject.segmentrouting, referenceCount=0
271 id=0xffe0002, bucket=1, bytes=726, packets=7, actions=[VLAN_POP, OUTPUT:2]
272 id=0x9200000f, state=ADDED, type=INDIRECT, bytes=16416, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
273 id=0x9200000f, bucket=1, bytes=16416, packets=48, actions=[VLAN_POP, MPLS_PUSH:mpls_unicast, MPLS_LABEL:205, GROUP:0x9000000e, VLAN_PUSH:vlan, VLAN_ID:4095]
274 id=0x9000000e, state=ADDED, type=INDIRECT, bytes=16416, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
275 id=0x9000000e, bucket=1, bytes=16416, packets=48, actions=[ETH_DST:00:00:00:00:02:26, ETH_SRC:00:00:00:00:02:04, VLAN_ID:4094, GROUP:0xffe0001]
276 id=0xffe0001, state=ADDED, type=INDIRECT, bytes=16416, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
277 id=0xffe0001, bucket=1, bytes=16416, packets=48, actions=[VLAN_POP, OUTPUT:1]
278 Output through of:0000000000000204/2
279 Device of:0000000000000227
280 Input from of:0000000000000227/1
281 Flows
282 ADDED, bytes=702318, packets=8511, table=0, priority=0, selector=[], treatment=[transition=TABLE:10]
283 ADDED, bytes=343130, packets=4234, table=10, priority=32768, selector=[IN_PORT:1, VLAN_VID:None], treatment=[immediate=[VLAN_PUSH:vlan, VLAN_ID:4094], transition=TABLE:20]
284 ADDED, bytes=754, packets=7, table=20, priority=32768, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:27, ETH_TYPE:mpls_unicast, VLAN_VID:4094], treatment=[transition=TABLE:23]
285 ADDED, bytes=17566, packets=57, table=23, priority=0, selector=[], treatment=[transition=TABLE:24]
286 ADDED, bytes=510, packets=5, table=24, priority=100, selector=[ETH_TYPE:mpls_unicast, MPLS_LABEL:205, MPLS_BOS:true], treatment=[deferred=[MPLS_POP:ipv4, DEC_TTL, GROUP:0x70000017], transition=TABLE:60]
287 ADDED, bytes=17566, packets=57, table=60, priority=0, selector=[], treatment=[immediate=[NOACTION]]
288 Groups
289 id=0x70000017, state=ADDED, type=SELECT, bytes=754, packets=7, appId=org.onosproject.segmentrouting, referenceCount=2
290 id=0x70000017, bucket=1, bytes=754, packets=7, actions=[GROUP:0x20000016]
291 id=0x20000016, state=ADDED, type=INDIRECT, bytes=754, packets=7, appId=org.onosproject.segmentrouting, referenceCount=0
292 id=0x20000016, bucket=1, bytes=754, packets=7, actions=[ETH_DST:00:00:00:00:02:05, ETH_SRC:00:00:00:00:02:27, VLAN_ID:4094, GROUP:0xffe0002]
293 id=0xffe0002, state=ADDED, type=INDIRECT, bytes=754, packets=7, appId=org.onosproject.segmentrouting, referenceCount=0
294 id=0xffe0002, bucket=1, bytes=754, packets=7, actions=[VLAN_POP, OUTPUT:2]
295 Output through of:0000000000000227/2
296 Device of:0000000000000205
297 Input from of:0000000000000205/2
298 Flows
299 ADDED, bytes=2105886, packets=24084, table=0, priority=0, selector=[], treatment=[transition=TABLE:10]
300 ADDED, bytes=358792, packets=4275, table=10, priority=32768, selector=[IN_PORT:1, VLAN_VID:None], treatment=[immediate=[VLAN_PUSH:vlan, VLAN_ID:4094], transition=TABLE:20]
301 ADDED, bytes=16416, packets=48, table=20, priority=32768, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:05, ETH_TYPE:ipv4, VLAN_VID:4094], treatment=[transition=TABLE:30]
302 ADDED, bytes=196, packets=2, table=30, priority=64010, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.1/32], treatment=[deferred=[GROUP:0x2000002a], transition=TABLE:60]
303 ADDED, bytes=1370884, packets=15163, table=60, priority=0, selector=[], treatment=[immediate=[NOACTION]]
304 Groups
305 id=0x2000002a, state=ADDED, type=INDIRECT, bytes=196, packets=2, appId=org.onosproject.segmentrouting, referenceCount=1
306 id=0x2000002a, bucket=1, bytes=196, packets=2, actions=[ETH_DST:00:AA:00:00:00:03, ETH_SRC:00:00:00:00:02:05, VLAN_ID:30, GROUP:0x1e0003]
307 id=0x1e0003, state=ADDED, type=INDIRECT, bytes=12960, packets=126, appId=org.onosproject.segmentrouting, referenceCount=1
308 id=0x1e0003, bucket=1, bytes=12960, packets=126, actions=[VLAN_POP, OUTPUT:3]
309 id=0x2000002a, state=ADDED, type=INDIRECT, bytes=196, packets=2, appId=org.onosproject.segmentrouting, referenceCount=1
310 id=0x2000002a, bucket=1, bytes=196, packets=2, actions=[ETH_DST:00:AA:00:00:00:03, ETH_SRC:00:00:00:00:02:05, VLAN_ID:30, GROUP:0x1e0003]
311 id=0x1e0003, state=ADDED, type=INDIRECT, bytes=12960, packets=126, appId=org.onosproject.segmentrouting, referenceCount=1
312 id=0x1e0003, bucket=1, bytes=12960, packets=126, actions=[VLAN_POP, OUTPUT:3]
313 Output through of:0000000000000205/3
314 Path [of:0000000000000204/3, of:0000000000000204/1, of:0000000000000226/1, of:0000000000000226/2, of:0000000000000205/1, of:0000000000000205/3]
315 Device of:0000000000000204
316 Input from of:0000000000000204/3
317 Flows
318 ADDED, bytes=733506, packets=8691, table=0, priority=0, selector=[], treatment=[transition=TABLE:10]
319 ADDED, bytes=11110, packets=61, table=10, priority=32768, selector=[IN_PORT:3, VLAN_VID:None], treatment=[immediate=[VLAN_PUSH:vlan, VLAN_ID:20], transition=TABLE:20]
320 ADDED, bytes=8698, packets=29, table=20, priority=32768, selector=[IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_TYPE:ipv4, VLAN_VID:20], treatment=[transition=TABLE:30]
321 ADDED, bytes=16612, packets=50, table=30, priority=48010, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.0/24], treatment=[deferred=[GROUP:0x70000010], transition=TABLE:60]
322 ADDED, bytes=34400, packets=112, table=60, priority=0, selector=[], treatment=[immediate=[NOACTION]]
323 Groups
324 id=0x70000010, state=ADDED, type=SELECT, bytes=16906, packets=53, appId=org.onosproject.segmentrouting, referenceCount=3
325 id=0x70000010, bucket=1, bytes=490, packets=5, actions=[GROUP:0x9200000d]
326 id=0x70000010, bucket=2, bytes=16416, packets=48, actions=[GROUP:0x9200000f]
327 id=0x9200000d, state=ADDED, type=INDIRECT, bytes=490, packets=5, appId=org.onosproject.segmentrouting, referenceCount=0
328 id=0x9200000d, bucket=1, bytes=490, packets=5, actions=[VLAN_POP, MPLS_PUSH:mpls_unicast, MPLS_LABEL:205, GROUP:0x9000000c, VLAN_PUSH:vlan, VLAN_ID:4095]
329 id=0x9000000c, state=ADDED, type=INDIRECT, bytes=490, packets=5, appId=org.onosproject.segmentrouting, referenceCount=0
330 id=0x9000000c, bucket=1, bytes=490, packets=5, actions=[ETH_DST:00:00:00:00:02:27, ETH_SRC:00:00:00:00:02:04, VLAN_ID:4094, GROUP:0xffe0002]
331 id=0xffe0002, state=ADDED, type=INDIRECT, bytes=726, packets=7, appId=org.onosproject.segmentrouting, referenceCount=0
332 id=0xffe0002, bucket=1, bytes=726, packets=7, actions=[VLAN_POP, OUTPUT:2]
333 id=0x9200000f, state=ADDED, type=INDIRECT, bytes=16416, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
334 id=0x9200000f, bucket=1, bytes=16416, packets=48, actions=[VLAN_POP, MPLS_PUSH:mpls_unicast, MPLS_LABEL:205, GROUP:0x9000000e, VLAN_PUSH:vlan, VLAN_ID:4095]
335 id=0x9000000e, state=ADDED, type=INDIRECT, bytes=16416, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
336 id=0x9000000e, bucket=1, bytes=16416, packets=48, actions=[ETH_DST:00:00:00:00:02:26, ETH_SRC:00:00:00:00:02:04, VLAN_ID:4094, GROUP:0xffe0001]
337 id=0xffe0001, state=ADDED, type=INDIRECT, bytes=16416, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
338 id=0xffe0001, bucket=1, bytes=16416, packets=48, actions=[VLAN_POP, OUTPUT:1]
339 Output through of:0000000000000204/1
340 Device of:0000000000000226
341 Input from of:0000000000000226/1
342 Flows
343 ADDED, bytes=701910, packets=8507, table=0, priority=0, selector=[], treatment=[transition=TABLE:10]
344 ADDED, bytes=358984, packets=4275, table=10, priority=32768, selector=[IN_PORT:1, VLAN_VID:None], treatment=[immediate=[VLAN_PUSH:vlan, VLAN_ID:4094], transition=TABLE:20]
345 ADDED, bytes=16608, packets=48, table=20, priority=32768, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:26, ETH_TYPE:mpls_unicast, VLAN_VID:4094], treatment=[transition=TABLE:23]
346 ADDED, bytes=17158, packets=53, table=23, priority=0, selector=[], treatment=[transition=TABLE:24]
347 ADDED, bytes=16608, packets=48, table=24, priority=100, selector=[ETH_TYPE:mpls_unicast, MPLS_LABEL:205, MPLS_BOS:true], treatment=[deferred=[MPLS_POP:ipv4, DEC_TTL, GROUP:0x7000000b], transition=TABLE:60]
348 ADDED, bytes=17158, packets=53, table=60, priority=0, selector=[], treatment=[immediate=[NOACTION]]
349 Groups
350 id=0x7000000b, state=ADDED, type=SELECT, bytes=16608, packets=48, appId=org.onosproject.segmentrouting, referenceCount=2
351 id=0x7000000b, bucket=1, bytes=16608, packets=48, actions=[GROUP:0x20000009]
352 id=0x20000009, state=ADDED, type=INDIRECT, bytes=16608, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
353 id=0x20000009, bucket=1, bytes=16608, packets=48, actions=[ETH_DST:00:00:00:00:02:05, ETH_SRC:00:00:00:00:02:26, VLAN_ID:4094, GROUP:0xffe0002]
354 id=0xffe0002, state=ADDED, type=INDIRECT, bytes=16608, packets=48, appId=org.onosproject.segmentrouting, referenceCount=0
355 id=0xffe0002, bucket=1, bytes=16608, packets=48, actions=[VLAN_POP, OUTPUT:2]
356 Output through of:0000000000000226/2
357 Device of:0000000000000205
358 Input from of:0000000000000205/1
359 Flows
360 ADDED, bytes=2105886, packets=24084, table=0, priority=0, selector=[], treatment=[transition=TABLE:10]
361 ADDED, bytes=358792, packets=4275, table=10, priority=32768, selector=[IN_PORT:1, VLAN_VID:None], treatment=[immediate=[VLAN_PUSH:vlan, VLAN_ID:4094], transition=TABLE:20]
362 ADDED, bytes=16416, packets=48, table=20, priority=32768, selector=[IN_PORT:1, ETH_DST:00:00:00:00:02:05, ETH_TYPE:ipv4, VLAN_VID:4094], treatment=[transition=TABLE:30]
363 ADDED, bytes=196, packets=2, table=30, priority=64010, selector=[ETH_TYPE:ipv4, IPV4_DST:10.0.3.1/32], treatment=[deferred=[GROUP:0x2000002a], transition=TABLE:60]
364 ADDED, bytes=1370884, packets=15163, table=60, priority=0, selector=[], treatment=[immediate=[NOACTION]]
365 Groups
366 id=0x2000002a, state=ADDED, type=INDIRECT, bytes=196, packets=2, appId=org.onosproject.segmentrouting, referenceCount=1
367 id=0x2000002a, bucket=1, bytes=196, packets=2, actions=[ETH_DST:00:AA:00:00:00:03, ETH_SRC:00:00:00:00:02:05, VLAN_ID:30, GROUP:0x1e0003]
368 id=0x1e0003, state=ADDED, type=INDIRECT, bytes=12960, packets=126, appId=org.onosproject.segmentrouting, referenceCount=1
369 id=0x1e0003, bucket=1, bytes=12960, packets=126, actions=[VLAN_POP, OUTPUT:3]
370 id=0x2000002a, state=ADDED, type=INDIRECT, bytes=196, packets=2, appId=org.onosproject.segmentrouting, referenceCount=1
371 id=0x2000002a, bucket=1, bytes=196, packets=2, actions=[ETH_DST:00:AA:00:00:00:03, ETH_SRC:00:00:00:00:02:05, VLAN_ID:30, GROUP:0x1e0003]
372 id=0x1e0003, state=ADDED, type=INDIRECT, bytes=12960, packets=126, appId=org.onosproject.segmentrouting, referenceCount=1
373 id=0x1e0003, bucket=1, bytes=12960, packets=126, actions=[VLAN_POP, OUTPUT:3]
374 Output through of:0000000000000205/3
375 Result:
376 Reached required destination Host
377 Reached required destination Host
Charles Chan4ade88d2019-09-16 16:30:31 -0700378
379Successful Example
380------------------
Zack Williamsd63d35b2020-06-23 14:12:46 -0700381
382In this example we trace a packet that should be bridged between two hosts in
383the same subnet
Charles Chan4ade88d2019-09-16 16:30:31 -0700384
385.. code-block:: console
386
Charles Chan8299f072019-09-23 11:32:26 -0700387 onos> t3-troubleshoot -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -et IPV4 -d 10.0.3.1 -dm 00:AA:00:00:00:02 -vid None
388 Tracing packet: [IN_PORT:3, ETH_DST:00:AA:00:00:00:02, ETH_SRC:00:AA:00:00:00:01, ETH_TYPE:ipv4, VLAN_VID:None, IPV4_SRC:10.0.2.1/32, IPV4_DST:10.0.2.2/32, TCP_SRC:12345, TCP_DST:80, MPLS_BOS:true]
389 Paths
390 [of:0000000000000204/3, of:0000000000000204/4]
391 Result:
392 Reached required destination Host
Charles Chan4ade88d2019-09-16 16:30:31 -0700393
394Failed Example
395--------------
Zack Williamsd63d35b2020-06-23 14:12:46 -0700396
Charles Chan4ade88d2019-09-16 16:30:31 -0700397Obviously failures can happen along one of the paths that the packet can take.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700398
399In our sample we removed a flow in ``of:0000000000000226`` thus disabling that
400possible path for our initial packet.
401
402The output of our trace would then look something like:
Charles Chan4ade88d2019-09-16 16:30:31 -0700403
404.. code-block:: console
405
Charles Chan8299f072019-09-23 11:32:26 -0700406 onos> t3-troubleshoot -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -et IPV4 -d 10.0.3.1 -dm 00:00:00:00:02:04 -vid None
407 Tracing packet: [IN_PORT:3, ETH_DST:00:00:00:00:02:04, ETH_SRC:00:AA:00:00:00:01, ETH_TYPE:ipv4, VLAN_VID:None, IPV4_SRC:10.0.2.1/32, IPV4_DST:10.0.3.1/32, TCP_SRC:12345, TCP_DST:80, MPLS_BOS:true]
408 Paths
409 [of:0000000000000204/3, of:0000000000000204/2, of:0000000000000227/1, of:0000000000000227/2, of:0000000000000205/2, of:0000000000000205/3]
410 [of:0000000000000204/3, of:0000000000000204/1, of:0000000000000226/1]
411 Result:
412 Reached required destination Host
413 No output out of device of:0000000000000226 Packet is dropped
Charles Chan4ade88d2019-09-16 16:30:31 -0700414
Zack Williamsd63d35b2020-06-23 14:12:46 -0700415Notice that on the second path that was previously going through
416``of:0000000000000226`` now the packet is dropped due to the rule we removed.
Charles Chan4ade88d2019-09-16 16:30:31 -0700417
418Example of Various Packet Types
419-------------------------------
420These sample commands refer to the Mininet environment found in trellis.py [#trellis.py]_
421
422- L2 Unicast IPv4
423
424 .. code-block:: console
425
Charles Chan8299f072019-09-23 11:32:26 -0700426 t3-troubleshoot -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -d 10.0.2.2 -dm 00:AA:00:00:00:02
Charles Chan4ade88d2019-09-16 16:30:31 -0700427
428- L2 Unicast IPv6
429
430 .. code-block:: console
431
Charles Chan8299f072019-09-23 11:32:26 -0700432 t3-troubleshoot -vv -s 2000::301 -sp of:0000000000000205/5 -sm 00:BB:00:00:00:03 -d 2000::302 -dm 00:BB:00:00:00:04 -et ipv6
Charles Chan4ade88d2019-09-16 16:30:31 -0700433
434- L3 Unicast IPv4
435
436 .. code-block:: console
437
Charles Chan8299f072019-09-23 11:32:26 -0700438 t3-troubleshoot -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -d 10.0.3.1 -dm 00:00:00:00:02:04
Charles Chan4ade88d2019-09-16 16:30:31 -0700439
440- L3 Unicast IPv6
441
442 .. code-block:: console
443
Charles Chan8299f072019-09-23 11:32:26 -0700444 t3-troubleshoot -vv -s 2000::301 -sp of:0000000000000205/5 -sm 00:BB:00:00:00:03 -d 2000::202 -dm 00:00:00:00:02:05 -et ipv6
Charles Chan4ade88d2019-09-16 16:30:31 -0700445
446- ARP
447
448 .. code-block:: console
449
Charles Chan8299f072019-09-23 11:32:26 -0700450 t3-troubleshoot -sp of:0000000000000204/3 -et ARP
Charles Chan4ade88d2019-09-16 16:30:31 -0700451
452- DHCP
453
454 .. code-block:: console
455
Charles Chan8299f072019-09-23 11:32:26 -0700456 t3-troubleshoot -vv -s 10.0.2.1 -sp of:0000000000000204/3 -sm 00:AA:00:00:00:01 -d 10.0.3.253 -dm 00:00:00:00:02:04 -ipp 17 -udps 67 -udpd 67
Charles Chan4ade88d2019-09-16 16:30:31 -0700457
458- LLDP
459
460 .. code-block:: console
461
Charles Chan8299f072019-09-23 11:32:26 -0700462 t3-troubleshoot -sp of:0000000000000204/3 -et lldp
Charles Chan4ade88d2019-09-16 16:30:31 -0700463
464- BDDP
465
466 .. code-block:: console
467
Charles Chan8299f072019-09-23 11:32:26 -0700468 t3-troubleshoot -sp of:0000000000000204/3 -et bddp
Charles Chan4ade88d2019-09-16 16:30:31 -0700469
470- LLDP from CONTROLLER
471
472 T3 is also capable of tracing packets coming in from the CONTROLLER.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700473
474 We use the same input port with the possibility to give CONTROLLER as logical
475 port number.
476
477 This is a mere convenience to carry the information inside T3 and do the
478 proper flooding to all the ports of the given device.
479
480 This case is not treated like all the rest and the input port here is a
481 logical entity that has no match on any physical element on the device.
Charles Chan4ade88d2019-09-16 16:30:31 -0700482
483 .. code-block:: console
484
Charles Chan8299f072019-09-23 11:32:26 -0700485 t3-troubleshoot -sp of:0000000000000204/CONTROLLER -et lldp
Charles Chan4ade88d2019-09-16 16:30:31 -0700486
487- Multicast
488
489 T3 is also capable of tracing multicast packets.
490
491 .. code-block:: console
492
Charles Chan8299f072019-09-23 11:32:26 -0700493 t3-troubleshoot -vv -sp of:0000000000000205/9 -et ipv4 -d 224.0.0.1 -dm 01:00:5e:00:00:01
Charles Chan4ade88d2019-09-16 16:30:31 -0700494
495
496t3-troubleshoot-simple
497======================
Zack Williamsd63d35b2020-06-23 14:12:46 -0700498
499T3 also offers a simplified version of the command to be able to ping between
500two given hosts without having to specify all the information.
501
502This commands bases itself on top of some configuration present in ONOS through
503netcfg, namely the VLAN interface configuration and the segment routing leaf
504router MAC for L3 Unicast. If that is not present the user needs to input this
505information manually recurring to the the previously shown command. Same
506verbosity levels and output as the troubleshoot command are possible.
Charles Chan4ade88d2019-09-16 16:30:31 -0700507
508t3-troubleshoot-simple Help
509---------------------------
510.. code-block:: console
511
Charles Chan8299f072019-09-23 11:32:26 -0700512 onos> t3-troubleshoot-simple --help
513 DESCRIPTION
514 onos:troubleshoot-simple
Charles Chan4ade88d2019-09-16 16:30:31 -0700515
Charles Chan8299f072019-09-23 11:32:26 -0700516 Given two hosts troubleshoots flows and groups between them, in case of segment routing
Charles Chan4ade88d2019-09-16 16:30:31 -0700517
Charles Chan8299f072019-09-23 11:32:26 -0700518 SYNTAX
519 onos:troubleshoot-simple [options] one two
Charles Chan4ade88d2019-09-16 16:30:31 -0700520
Charles Chan8299f072019-09-23 11:32:26 -0700521 ARGUMENTS
522 one
523 One host ID
524 two
525 Another host ID
Charles Chan4ade88d2019-09-16 16:30:31 -0700526
Charles Chan8299f072019-09-23 11:32:26 -0700527 OPTIONS
528 -vv, --veryverbose
529 Outputs flows and groups for every device
530 -j, --json
531 Output JSON
532 --help
533 Display this help message
534 -et, --ethType
535 ETH Type
536 (defaults to ipv4)
537 -v, --verbose
538 Outputs complete path
Charles Chan4ade88d2019-09-16 16:30:31 -0700539
540t3-troubleshoot-simple Example
541------------------------------
542Examples are given for the same trellis.py [#trellis.py]_ script.
543
544- L2 Unicast
545
546 Hosts are under the same leaf, only interface configuration is needed.
547
548 .. code-block:: console
549
Charles Chan8299f072019-09-23 11:32:26 -0700550 t3-troubleshoot-simple -v -et IPV4 00:AA:00:00:00:01/None 00:AA:00:00:00:02/None
Charles Chan4ade88d2019-09-16 16:30:31 -0700551
552- L3 Multicast
553
554 Hosts are under different leafs, also segment routing configuration config is needed for the leaf's routerMac.
555
556 .. code-block:: console
557
Charles Chan8299f072019-09-23 11:32:26 -0700558 t3-troubleshoot-simple -et IPV4 00:AA:00:00:00:01/None 00:AA:00:00:00:03/None
Charles Chan4ade88d2019-09-16 16:30:31 -0700559
560
561t3-troubleshoot-pingall
562=======================
563T3 also offers a ping-all command to be able to test ping between any given hosts of an EthType.
564This commands bases itself on top of the simplified Host to Host command. It has two verbosity levels,
565one just with Host and Destination with the result message of the Trace and one that shows also the packet and the paths.
566
567t3-troubleshoot-pingall Help
568----------------------------
569.. code-block:: console
570
Charles Chan8299f072019-09-23 11:32:26 -0700571 onos> t3-troubleshoot-pingall --help
572 DESCRIPTION
573 onos:t3-troubleshoot-pingall
Charles Chan4ade88d2019-09-16 16:30:31 -0700574
Charles Chan8299f072019-09-23 11:32:26 -0700575 Traces a ping between all hosts in the system of a given ETH type
Charles Chan4ade88d2019-09-16 16:30:31 -0700576
Charles Chan8299f072019-09-23 11:32:26 -0700577 SYNTAX
578 onos:t3-troubleshoot-pingall [options]
Charles Chan4ade88d2019-09-16 16:30:31 -0700579
Charles Chan8299f072019-09-23 11:32:26 -0700580 OPTIONS
581 -j, --json
582 Output JSON
583 --help
584 Display this help message
585 -et, --ethType
586 ETH Type
587 (defaults to ipv4)
588 -v, --verbose
589 Outputs trace for each host to host combination
Charles Chan4ade88d2019-09-16 16:30:31 -0700590
591t3-troubleshoot-pingall Examples
592--------------------------------
593- IPv4 hosts
594
595 .. code-block:: console
596
Charles Chan8299f072019-09-23 11:32:26 -0700597 t3-troubleshoot-pingall
Charles Chan4ade88d2019-09-16 16:30:31 -0700598
599- IPv6 hosts
600
601 .. code-block:: console
602
603 t3-troubleshoot-pingall -et IPV6
604
605
606t3-troubleshoot-mcast
607=====================
Zack Williamsd63d35b2020-06-23 14:12:46 -0700608
609T3 also offers a mcast command queries the system for all the multicast routes
610given a certain vlanId. It prints all the traces given a certain group, source
611and source connect point. It has two "standard" verbosity levels.
Charles Chan4ade88d2019-09-16 16:30:31 -0700612
613t3-troubleshoot-mcast Help
614--------------------------
615.. code-block:: console
616
Charles Chan8299f072019-09-23 11:32:26 -0700617 onos> t3-troubleshoot-mcast --help
618 DESCRIPTION
619 onos:t3-troubleshoot-mcast
Charles Chan4ade88d2019-09-16 16:30:31 -0700620
Charles Chan8299f072019-09-23 11:32:26 -0700621 Traces all the mcast routes present in the system
Charles Chan4ade88d2019-09-16 16:30:31 -0700622
Charles Chan8299f072019-09-23 11:32:26 -0700623 SYNTAX
624 onos:t3-troubleshoot-mcast [options]
Charles Chan4ade88d2019-09-16 16:30:31 -0700625
Charles Chan8299f072019-09-23 11:32:26 -0700626 OPTIONS
627 -j, --json
628 Output JSON
629 --help
630 Display this help message
631 -vv, --veryverbose
632 Outputs details of every trace
633 -vid, --vlanId
634 Vlan of incoming packet
635 (defaults to None)
636 -v, --verbose
637 Outputs trace for each host to host combination
Charles Chan4ade88d2019-09-16 16:30:31 -0700638
639REST API
640========
641T3 now also offers a way to execute the troubleshoot through REST API endpoints.
642You can find the description and test the API at the ONOS docs endpoint here:
643
644.. code-block:: text
645
Charles Chan8299f072019-09-23 11:32:26 -0700646 <ONOS_IP>:8181/onos/v1/docs/#/t3
Charles Chan4ade88d2019-09-16 16:30:31 -0700647
648The rest API offered are a non verbose and a verbose version of the troubleshoot simple command.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700649
650It bases itself on top of some configuration present in ONOS through netcfg,
651namely the VLAN interface configuration and the segment routing leaf router MAC
652for L3 Unicast.
653
654The use need to specify just the Source Host, the destination host and the ETH
655type.
Charles Chan4ade88d2019-09-16 16:30:31 -0700656
657.. code-block:: console
658
Charles Chan8299f072019-09-23 11:32:26 -0700659 curl -X GET --header 'Accept: application/json' 'http://localhost:8181/onos/v1/t3/t3/simple/<host_src>/<host_dst>/<eht_type>'
Charles Chan4ade88d2019-09-16 16:30:31 -0700660
661.. code-block:: console
662
Charles Chan8299f072019-09-23 11:32:26 -0700663 curl -X GET --header 'Accept: application/json' 'http://localhost:8181/onos/v1/t3/t3/simple/<host_src>/<host_dst>/<eht_type>/verbose
Charles Chan4ade88d2019-09-16 16:30:31 -0700664
665
666Last Resort
667===========
668
Zack Williamsd63d35b2020-06-23 14:12:46 -0700669In the case where you can't figure out what is going wrong even with help of
670T3, you can seek help on Trellis developer mailing list
671``trellis-dev@opennetworking.org``.
672
Charles Chan4ade88d2019-09-16 16:30:31 -0700673There are a few things we would like you to attach:
674
675- **Issue description**
Zack Williamsd63d35b2020-06-23 14:12:46 -0700676
677- **Environment description**, such as ONOS version, switch model and OF-DPA
678 version
679
Charles Chan4ade88d2019-09-16 16:30:31 -0700680- **Steps of reproduction**, as detail as possible
Zack Williamsd63d35b2020-06-23 14:12:46 -0700681
Charles Chan4ade88d2019-09-16 16:30:31 -0700682- **Diagnostics**.
Zack Williamsd63d35b2020-06-23 14:12:46 -0700683
684 We have built a tool ``onos-diagnostics`` (see `ONOS Remote Admin Tools
685 <https://wiki.onosproject.org/display/ONOS/ONOS+Remote+Admin+Tools>`_) to
686 help you easily collect and package ONOS diagnostics
Charles Chan4ade88d2019-09-16 16:30:31 -0700687
688
689Reference
690=========
691
692.. [#trellis.py] `<https://github.com/opennetworkinglab/routing/blob/master/trellis/trellis.py>`_