]> git.proxmox.com Git - mirror_frr.git/blob - doc/user/sharp.rst
Merge pull request #7306 from donaldsharp/bgp_dest_print
[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 for the nexthop keyword,
82 for the import keyword connected means exact match. The no form of
83 the command obviously turns this watching off.
84
85 .. index:: sharp data nexthop
86 .. clicmd:: sharp data nexthop
87
88 Allow end user to dump associated data with the nexthop tracking that
89 may have been turned on.
90
91 .. index:: sharp lsp
92 .. clicmd:: sharp lsp [update] (0-100000) nexthop-group NAME [prefix A.B.C.D/M TYPE [instance (0-255)]]
93
94 Install an LSP using the specified in-label, with nexthops as
95 listed in nexthop-group ``NAME``. If ``update`` is included, the
96 update path is used. The LSP is installed as type ZEBRA_LSP_SHARP.
97 If ``prefix`` is specified, an existing route with type ``TYPE``
98 (and optional ``instance`` id) will be updated to use the LSP.
99
100 .. index:: sharp remove lsp
101 .. clicmd:: sharp remove lsp (0-100000) nexthop-group NAME [prefix A.B.C.D/M TYPE [instance (0-255)]]
102
103 Remove a SHARPD LSP that uses the specified in-label, where the
104 nexthops are specified in nexthop-group ``NAME``. If ``prefix`` is
105 specified, remove label bindings from the route of type ``TYPE``
106 also.
107
108 .. index:: sharp send opaque
109 .. clicmd:: sharp send opaque type (1-255) (1-1000)
110
111 Send opaque ZAPI messages with subtype ``type``. Sharpd will send
112 a stream of messages if the count is greater than one.
113
114 .. index:: sharp send opaque unicast
115 .. clicmd:: sharp send opaque unicast type (1-255) $proto_str [{instance (0-1000) | session (1-1000)}] (1-1000)
116
117 Send unicast opaque ZAPI messages with subtype ``type``. The
118 protocol, instance, and session_id identify a single target zapi
119 client. Sharpd will send a stream of messages if the count is
120 greater than one.
121
122 .. index:: sharp send opaque reg unreg
123 .. clicmd:: sharp send opaque <reg | unreg> $proto_str [{instance (0-1000) | session (1-1000)}] type (1-1000)
124
125 Send opaque ZAPI registration and unregistration messages for a
126 single subtype. The messages must specify a protocol daemon by
127 name, and can include optional zapi ``instance`` and ``session``
128 values.
129
130 .. index:: sharp create session
131 .. clicmd:: sharp create session (1-1024)
132
133 Create an additional zapi client session for testing, using the
134 specified session id.
135
136 .. index:: sharp remove session
137 .. clicmd:: sharp remove session (1-1024)
138
139 Remove a test zapi client session that was created with the
140 specified session id.
141
142 .. index:: sharp neigh discover
143 .. clicmd:: sharp neigh discover [vrf NAME] <A.B.C.D|X:X::X:X> IFNAME
144
145 Send an ARP/NDP request to trigger the addition of a neighbor in the ARP
146 table.