• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OpenThread CLI - SRP Server
2
3## Quick Start
4
5See [README_SRP.md](README_SRP.md).
6
7## Command List
8
9- [help](#help)
10- [addrmode](#addrmode)
11- [disable](#disable)
12- [domain](#domain)
13- [enable](#enable)
14- [host](#host)
15- [lease](#lease)
16- [seqnum](#seqnum)
17- [service](#service)
18- [state](#state)
19
20## Command Details
21
22### help
23
24Usage: `srp server help`
25
26Print SRP server help menu.
27
28```bash
29> srp server help
30addrmode
31disable
32domain
33enable
34help
35host
36lease
37seqnum
38service
39state
40Done
41```
42
43### addrmode
44
45Usage: `srp server addrmode [unicast|anycast]`
46
47Get or set the address mode used by the SRP server.
48
49Address mode specifies how the address and port number are determined by the SRP server and this is published in the Thread Network Data.
50
51Get the address mode.
52
53```bash
54> srp server addrmode
55unicast
56Done
57```
58
59Set the address mode.
60
61```bash
62> srp server addrmode anycast
63Done
64
65> srp server addrmode
66anycast
67Done
68```
69
70### disable
71
72Usage: `srp server disable`
73
74Disable the SRP server.
75
76```bash
77> srp server disable
78Done
79```
80
81### domain
82
83Usage: `srp server domain [domain-name]`
84
85Get the domain.
86
87```bash
88> srp server domain
89default.service.arpa.
90Done
91```
92
93Set the domain.
94
95```bash
96> srp server domain thread.service.arpa.
97Done
98```
99
100### enable
101
102Usage: `srp server enable`
103
104Enable the SRP server.
105
106```bash
107> srp server enable
108Done
109```
110
111### host
112
113Usage: `srp server host`
114
115Print information of all registered hosts.
116
117```bash
118> srp server host
119srp-api-test-1.default.service.arpa.
120    deleted: false
121    addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
122srp-api-test-0.default.service.arpa.
123    deleted: false
124    addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
125Done
126```
127
128### lease
129
130Usage: `srp server lease [<min-lease>] [<max-lease>] [<min-key-lease>] [<max-key-lease>]`
131
132Get LEASE and KEY-LEASE values.
133
134```bash
135> srp server lease
136min lease: 1800
137max lease: 7200
138min key-lease: 86400
139max key-lease: 1209600
140Done
141```
142
143Set LEASE and KEY-LEASE values.
144
145```bash
146> srp server lease 1800 7200 86400 1209600
147Done
148```
149
150### seqnum
151
152Usage: `srp server seqnum [<seqnum>]`
153
154Get or set the sequence number used with anycast address mode.
155
156The sequence number is included in "DNS/SRP Service Anycast Address" entry published in the Network Data.
157
158```bash
159> srp server seqnum 20
160Done
161
162> srp server seqnum
16320
164Done
165```
166
167### service
168
169Usage: `srp server service`
170
171Print information of all registered services.
172
173```bash
174> srp server service
175srp-api-test-1._ipps._tcp.default.service.arpa.
176    deleted: false
177    subtypes: (null)
178    port: 49152
179    priority: 0
180    weight: 0
181    TXT: 0130
182    host: srp-api-test-1.default.service.arpa.
183    addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
184srp-api-test-0._ipps._tcp.default.service.arpa.
185    deleted: false
186    subtypes: _sub1,_sub2
187    port: 49152
188    priority: 0
189    weight: 0
190    TXT: 0130
191    host: srp-api-test-0.default.service.arpa.
192    addresses: [fdde:ad00:beef:0:0:ff:fe00:fc10]
193Done
194```
195
196### state
197
198Usage: `srp server state`
199
200Print the state of the SRP server. It could be `disabled`, `stopped` or `running`.
201
202- disabled: The SRP server is not enabled.
203- stopped: The SRP server is enabled but not active due to existing SRP servers already active in the Thread network. The SRP server may become active when existing SRP servers are no longer active within the Thread network.
204- running: The SRP server is active and will handle service registrations.
205
206```bash
207> srp server state
208running
209Done
210```
211