]> git.proxmox.com Git - mirror_frr.git/blob - doc/user/sharp.rst
Merge pull request #6873 from mjstapp/fix_topo_retry_sigterm
[mirror_frr.git] / doc / user / sharp.rst
1 .. _sharp:
2
3 *****
4 SHARP
5 *****
6
7 :abbr:`SHARP (Super Happy Advanced Routing Process)` is a daemon that provides
8 miscellaneous functionality used for testing FRR and creating proof-of-concept
9 labs.
10
11 .. _starting-sharp:
12
13 Starting SHARP
14 ==============
15
16 Default configuration file for *sharpd* is :file:`sharpd.conf`. The typical
17 location of :file:`sharpd.conf` is |INSTALL_PREFIX_ETC|/sharpd.conf.
18
19 If the user is using integrated config, then :file:`sharpd.conf` need not be
20 present and the :file:`frr.conf` is read instead.
21
22 .. program:: sharpd
23
24 :abbr:`SHARP` supports all the common FRR daemon start options which are
25 documented elsewhere.
26
27 .. _using-sharp:
28
29 Using SHARP
30 ===========
31
32 All sharp commands are under the enable node and preceded by the ``sharp``
33 keyword. At present, no sharp commands will be preserved in the config.
34
35 .. index:: sharp install
36 .. clicmd:: sharp install routes A.B.C.D <nexthop <E.F.G.H|X:X::X:X>|nexthop-group NAME> (1-1000000) [instance (0-255)] [repeat (2-1000)]
37
38 Install up to 1,000,000 (one million) /32 routes starting at ``A.B.C.D``
39 with specified nexthop ``E.F.G.H`` or ``X:X::X:X``. The nexthop is
40 a ``NEXTHOP_TYPE_IPV4`` or ``NEXTHOP_TYPE_IPV6`` and must be reachable
41 to be installed into the kernel. Alternatively a nexthop-group NAME
42 can be specified and used as the nexthops. The routes are installed into
43 zebra as ``ZEBRA_ROUTE_SHARP`` and can be used as part of a normal route
44 redistribution. Route installation time is noted in the debug
45 log. When zebra successfully installs a route into the kernel and SHARP
46 receives success notifications for all routes this is logged as well.
47 Instance (0-255) if specified causes the routes to be installed in a different
48 instance. If repeat is used then we will install/uninstall the routes the
49 number of times specified.
50
51 .. index:: sharp remove
52 .. clicmd:: sharp remove routes A.B.C.D (1-1000000)
53
54 Remove up to 1,000,000 (one million) /32 routes starting at ``A.B.C.D``. The
55 routes are removed from zebra. Route deletion start is noted in the debug
56 log and when all routes have been successfully deleted the debug log will be
57 updated with this information as well.
58
59 .. index:: sharp data route
60 .. clicmd:: sharp data route
61
62 Allow end user doing route install and deletion to get timing information
63 from the vty or vtysh instead of having to read the log file. This command
64 is informational only and you should look at sharp_vty.c for explanation
65 of the output as that it may change.
66
67 .. index:: sharp label
68 .. clicmd:: sharp label <ipv4|ipv6> vrf NAME label (0-1000000)
69
70 Install a label into the kernel that causes the specified vrf NAME table to
71 be used for pop and forward operations when the specified label is seen.
72
73 .. index:: sharp watch
74 .. clicmd:: [no] sharp watch <nexthop <A.B.C.D|X:X::X:X>|import <A.B.C.D/M:X:X::X:X/M> [connected]
75
76 Instruct zebra to monitor and notify sharp when the specified nexthop is
77 changed. The notification from zebra is written into the debug log.
78 The nexthop or import choice chooses the type of nexthop we are asking
79 zebra to watch for us. This choice affects zebra's decision on what
80 matches. Connected tells zebra whether or not that we want the route
81 matched against to be a static or connected route. The no form of
82 the command obviously turns this watching off.
83
84 .. index:: sharp data nexthop
85 .. clicmd:: sharp data nexthop
86
87 Allow end user to dump associated data with the nexthop tracking that
88 may have been turned on.
89
90 .. index:: sharp lsp
91 .. clicmd:: sharp lsp [update] (0-100000) nexthop-group NAME [prefix A.B.C.D/M TYPE [instance (0-255)]]
92
93 Install an LSP using the specified in-label, with nexthops as
94 listed in nexthop-group ``NAME``. If ``update`` is included, the
95 update path is used. The LSP is installed as type ZEBRA_LSP_SHARP.
96 If ``prefix`` is specified, an existing route with type ``TYPE``
97 (and optional ``instance`` id) will be updated to use the LSP.
98
99 .. index:: sharp remove lsp
100 .. clicmd:: sharp remove lsp (0-100000) nexthop-group NAME [prefix A.B.C.D/M TYPE [instance (0-255)]]
101
102 Remove a SHARPD LSP that uses the specified in-label, where the
103 nexthops are specified in nexthop-group ``NAME``. If ``prefix`` is
104 specified, remove label bindings from the route of type ``TYPE``
105 also.
106
107 .. index:: sharp send opaque
108 .. clicmd:: sharp send opaque type (1-255) (1-1000)
109
110 Send opaque ZAPI messages with subtype ``type``. Sharpd will send
111 a stream of messages if the count is greater than one.
112
113 .. index:: sharp send opaque unicast
114 .. clicmd:: sharp send opaque unicast type (1-255) $proto_str [{instance (0-1000) | session (1-1000)}] (1-1000)
115
116 Send unicast opaque ZAPI messages with subtype ``type``. The
117 protocol, instance, and session_id identify a single target zapi
118 client. Sharpd will send a stream of messages if the count is
119 greater than one.
120
121 .. index:: sharp send opaque reg unreg
122 .. clicmd:: sharp send opaque <reg | unreg> $proto_str [{instance (0-1000) | session (1-1000)}] type (1-1000)
123
124 Send opaque ZAPI registration and unregistration messages for a
125 single subtype. The messages must specify a protocol daemon by
126 name, and can include optional zapi ``instance`` and ``session``
127 values.
128
129 .. index:: sharp create session
130 .. clicmd:: sharp create session (1-1024)
131
132 Create an additional zapi client session for testing, using the
133 specified session id.
134
135 .. index:: sharp remove session
136 .. clicmd:: sharp remove session (1-1024)
137
138 Remove a test zapi client session that was created with the
139 specified session id.