| 
									
										
										
										
											2017-12-04 08:28:27 -08:00
										 |  |  | # nsid
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-04 12:53:07 +00:00
										 |  |  | ## Name
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | *nsid* - adds an identifier of this server to each reply. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Description
 | 
					
						
							| 
									
										
										
										
											2017-12-04 08:28:27 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-02-28 18:16:05 -08:00
										 |  |  | This plugin implements [RFC 5001](https://tools.ietf.org/html/rfc5001) and adds an EDNS0 OPT | 
					
						
							|  |  |  | resource record to replies that uniquely identify the server. This is useful in anycast setups to | 
					
						
							|  |  |  | see which server was responsible for generating the reply and for debugging. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | This plugin can only be used once per Server Block. | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-04 08:28:27 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | ## Syntax
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-04 08:49:04 -08:00
										 |  |  | ~~~ txt | 
					
						
							| 
									
										
										
										
											2017-12-04 08:28:27 -08:00
										 |  |  | nsid [DATA] | 
					
						
							| 
									
										
										
										
											2017-12-04 08:49:04 -08:00
										 |  |  | ~~~ | 
					
						
							| 
									
										
										
										
											2017-12-04 08:28:27 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | **DATA** is the string to use in the nsid record. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | If **DATA** is not given, the host's name is used. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Examples
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Enable nsid: | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-04 08:49:04 -08:00
										 |  |  | ~~~ corefile | 
					
						
							| 
									
										
										
										
											2019-09-19 14:17:53 +01:00
										 |  |  | example.org { | 
					
						
							| 
									
										
										
										
											2017-12-09 09:37:02 +00:00
										 |  |  |     whoami | 
					
						
							|  |  |  |     nsid Use The Force | 
					
						
							| 
									
										
										
										
											2017-12-04 08:28:27 -08:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2017-12-04 08:49:04 -08:00
										 |  |  | ~~~ | 
					
						
							| 
									
										
										
										
											2017-12-09 09:37:02 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | And now a client with NSID support will see an OPT record with the NSID option: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ~~~ sh | 
					
						
							|  |  |  | % dig +nsid @localhost a whoami.example.org | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ;; Got answer: | 
					
						
							|  |  |  | ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46880 | 
					
						
							|  |  |  | ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 3 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | .... | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ; OPT PSEUDOSECTION: | 
					
						
							|  |  |  | ; EDNS: version: 0, flags:; udp: 4096 | 
					
						
							|  |  |  | ; NSID: 55 73 65 20 54 68 65 20 46 6f 72 63 65 ("Use The Force") | 
					
						
							|  |  |  | ;; QUESTION SECTION: | 
					
						
							|  |  |  | ;whoami.example.org.		IN	A | 
					
						
							|  |  |  | ~~~ | 
					
						
							| 
									
										
										
										
											2018-02-28 18:16:05 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-10-28 18:56:35 +01:00
										 |  |  | ## See Also
 | 
					
						
							| 
									
										
										
										
											2018-02-28 18:16:05 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  | [RFC 5001](https://tools.ietf.org/html/rfc5001) |