blob: e0a85fd736ed476a07d4812e9a12c21535ceb05b [file] [log] [blame]
Neale Rannsdfd39542020-11-09 10:09:42 +00001.. _debugging:
2
3Debugging
4---------
5
6the anatomy of a route:
7
8.. code-block:: console
9
10 BGvpp# sh ip fib 1.1.1.3/32
11 ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] epoch:0 flags:none locks:[adjacency:1, recursive-resolution:4, default-route:1, ]
12 1.1.1.0/24 fib:0 index:9 locks:2
13 CLI refs:1 src-flags:added,contributing,active,
14 path-list:[24] locks:4 flags:shared, uPRF-list:11 len:1 itfs:[1, ]
15 path:[26] pl-index:24 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved,
16 10.0.0.1 loop0
17 [@0]: arp-ipv4: via 10.0.0.1 loop0
18
19 forwarding: unicast-ip4-chain
20 [@0]: dpo-load-balance: [proto:ip4 index:11 buckets:1 uRPF:11 to:[0:0]]
21 [0] [@3]: arp-ipv4: via 10.0.0.1 loop0
22
23let's go line by line.
24
25.. code-block:: console
26
27 ipv4-VRF:0, fib_index:0, flow hash:[src dst sport dport proto ] epoch:0 flags:none locks:[adjacency:1, recursive-resolution:4, default-route:1, ]
28
29Each field in turn:
30
31- ipv4-VRF:0: the name of the table (as given by the user, or
32 automatically generated by VPP).
33- fib-index:0; in the VPP pool of FIB objects, this is index 0
34- flow hash:[src dst sport dport proto ]: When calculating the flow
35 hash to use for load-balanacing, these are the fields in the packet
36 that are used. There is an API to change this per-table.
37- epoch:0; Used during mark-n-sweep.
38- flags:none; use the force, to find the per-table flags.
39- locks: per-source reference counting, a table can only be deleted
40 when all sources no longer reference it.
41
42next line:
43
44.. code-block:: console
45
46 1.1.1.0/24 fib:0 index:9 locks:2
47
48this shows the route that matched the show request. note that it is not
49an exact match, it's an LPM. The route is in FIB index 0, its index
50(in the VPP pool of fib_entry_t objects) is nine and there are two
51references to the entry.
52You'll get the same output if you type "sh fib entry 9"
53
54next line:
55
56.. code-block:: console
57
58 CLI refs:1 src-flags:added,contributing,active,
59
60the 'CLI' has sourced this route (it was added via CLI). This source
61has been added (well duh) it is 'active', meaning it is the best
62source, and it is contributing a forwarding object. There are some
63scenarios where sources other than the active source contribute,
64namely interpose sources.
65
66next line:
67
68.. code-block:: console
69
70 path-list:[24] locks:4 flags:shared, uPRF-list:11 len:1 itfs:[1, ]
71
72This is path-list inex 24 (see "sh fib path-list 24" this will also
73show the children), it is 'shared',
74meaning that if other prefixes were to use the same set of paths,
75then they would also use this path-list object. It has uRPF list 11 of
76length 1 containing interface index 1 (which is loop0, see "sh int").
77
78next line:
79
80.. code-block:: console
81
82 path:[26] pl-index:24 ip4 weight=1 pref=0 attached-nexthop: oper-flags:resolved,
83 10.0.0.1 loop0
84 [@0]: arp-ipv4: via 10.0.0.1 loop0
85
86This is path 26 (see "sh fib path 26"). It's a member of
87path-list 24. It's ip4 has a weight of 1 and a preference of 0. It's
88of type 'attached-nexthop' and currently resolved - woohoo.
89It is a path 'via 10.0.0.1 loop0'. It is contributing an incomplete adjacency.
90
91next line:
92
93.. code-block:: console
94
95 forwarding: unicast-ip4-chain
96 [@0]: dpo-load-balance: [proto:ip4 index:11 buckets:1 uRPF:11 to:[0:0]]
97 [0] [@3]: arp-ipv4: via 10.0.0.1 loop0
98
99This section describes how packets of type 'unicast-ip4' will be
100forwarded. It is the result of processing the path information from
101above.
102Here we see load-balance object 11, which has 1 bucket/choice. It is
103also linked to uRPF instance 11 (which it got from path-list 24).
104In bucket 0 there is the incomplete adjacnecy that was contributed by
105path 26.
106