Skip to content

DNS in n2x.io

Internal DNS Service

n2x.io provides each node on your network with a unique IP address that stays the same no matter where your devices are. However, managing nodes on your network often involves remembering complex IP addresses. This can be cumbersome and error-prone. n2x.io offers a solution with its built-in internal DNS (Domain Name System) service.

The internal DNS automatically assigns a unique FQDN (Fully Qualified Domain Name) to every node on your network. This eliminates the need to memorize IP addresses, streamlining nodes management and making it more user-friendly.

The FQDN for the nodes comprises two parts:

Node FQDN

In the case of Kubernetes integration, the fully qualified domain name for workloads or services comprises three parts:

K8s Node FQDN

Querying the Internal DNS Service

By default, you can query this internal DNS service on UDP port 53535 of any n2x-node. Here's a command using the dig tool to illustrate this process:

dig @<NODE-IP> -p 53535 A <FQDN>

Info

Replace <NODE-IP> with the IP address of a n2x-node and <FQDN> with the specific FQDN you want to resolve.

Example

dig @10.254.0.213 -p 53535 A node-demo.n2x.local

; <<>> DiG 9.18.18-0ubuntu0.22.04.2-Ubuntu <<>> @10.254.0.213 -p 53535 A node-demo.n2x.local
; (1 server found)
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49538
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;node-demo.n2x.local.       IN  A

;; ANSWER SECTION:
node-demo.n2x.local.    300 IN  A   10.254.0.175

;; Query time: 15 msec
;; SERVER: 10.254.0.213#53535(10.254.0.213) (UDP)
;; WHEN: Tue Apr 16 11:12:49 CEST 2024
;; MSG SIZE  rcvd: 76

DNS Integration

The .n2x.local domain can be seamlessly integrated into your existing DNS infrastructure for further flexibility. Refer to the DNS Integration guide for more details.