Nc - No Compression
This modifier disables DNS compression in the response, overriding any DNS compression settings specified in the configuration file.
This modifier is compatible with and can be combined with any other existing feature or modifier.
Category: Packet manipulation
Format
*.nc.*
This module has no parameters.
Examples
In this example, we use the basic always feature which always resolves to an IP address. Additionally, we request to disable DNS compression for the response:
# dig always.nc.yourdomain.com @127.0.0.1 ; <<>> DiG 9.18.10-2-Debian <<>> always.nc.yourdomain.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50368 ;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;always.nc.yourdomain.com. IN A ;; ANSWER SECTION: always.nc.yourdomain.com. 60 IN A 2.3.4.5 ;; Query time: 3 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP) ;; WHEN: Tue Oct 22 00:07:02 +04 2024 ;; MSG SIZE rcvd: 82
We can see that with compression disabled, the response is 82 bytes long.
Similar to the previous example, but in this case we request to enable DNS compression for the response using the fc modifier:
# dig always.fc.yourdomain.com @127.0.0.1 ; <<>> DiG 9.18.10-2-Debian <<>> always.fc.yourdomain.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15206 ;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;always.fc.yourdomain.com. IN A ;; ANSWER SECTION: always.fc.yourdomain.com. 60 IN A 2.3.4.5 ;; Query time: 3 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP) ;; WHEN: Tue Oct 22 00:07:03 +04 2024 ;; MSG SIZE rcvd: 58
We can see that with compression enabled, the response is 58 bytes long.
In this example, we use the size feature to fit as many A records as possible within 300-byte size limit. Additionally, we request to disable DNS compression for the response:
# dig size.300.nc.yourdomain.com @127.0.0.1 ; <<>> DiG 9.18.10-2-Debian <<>> size.300.nc.yourdomain.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6481 ;; flags: qr aa; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;size.300.nc.yourdomain.com. IN A ;; ANSWER SECTION: size.300.nc.yourdomain.com. 60 IN A 127.0.0.96 size.300.nc.yourdomain.com. 60 IN A 127.0.0.111 size.300.nc.yourdomain.com. 60 IN A 127.0.0.8 size.300.nc.yourdomain.com. 60 IN A 127.0.0.161 size.300.nc.yourdomain.com. 60 IN A 127.0.0.115 size.300.nc.yourdomain.com. 60 IN A 127.0.0.67 ;; Query time: 3 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP) ;; WHEN: Tue Oct 22 00:07:05 +04 2024 ;; MSG SIZE rcvd: 296
With compression disabled, we can only fit six (6) A records within the 300-byte limit.
Similar to the previous example, but in this case we request to enable DNS compression for the response:
# dig size.300.fc.yourdomain.com @127.0.0.1 ; <<>> DiG 9.18.10-2-Debian <<>> size.300.fc.yourdomain.com @127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25884 ;; flags: qr aa; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;size.300.fc.yourdomain.com. IN A ;; ANSWER SECTION: size.300.fc.yourdomain.com. 60 IN A 127.0.0.9 size.300.fc.yourdomain.com. 60 IN A 127.0.0.12 size.300.fc.yourdomain.com. 60 IN A 127.0.0.38 size.300.fc.yourdomain.com. 60 IN A 127.0.0.233 size.300.fc.yourdomain.com. 60 IN A 127.0.0.39 size.300.fc.yourdomain.com. 60 IN A 127.0.0.156 size.300.fc.yourdomain.com. 60 IN A 127.0.0.52 size.300.fc.yourdomain.com. 60 IN A 127.0.0.60 size.300.fc.yourdomain.com. 60 IN A 127.0.0.69 size.300.fc.yourdomain.com. 60 IN A 127.0.0.122 size.300.fc.yourdomain.com. 60 IN A 127.0.0.30 size.300.fc.yourdomain.com. 60 IN A 127.0.0.87 size.300.fc.yourdomain.com. 60 IN A 127.0.0.75 size.300.fc.yourdomain.com. 60 IN A 127.0.0.102 size.300.fc.yourdomain.com. 60 IN A 127.0.0.214 size.300.fc.yourdomain.com. 60 IN A 127.0.0.215 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP) ;; WHEN: Tue Oct 22 00:07:06 +04 2024 ;; MSG SIZE rcvd: 300
With compression enabled, we can fit sixteen (16) A records within the same 300-byte limit.
From the same category
- Add - Add N Bytes to the End of the Packet
- Cnk - Send Response in Chunks (TCP only)
- Cut - Cut N Bytes from the End of the Packet
- Fc - Force Compression
- Len - Set Custom Length in TCP
- Noq - Remove the Query Section
- Rl - Recalculate Length in TCP
- Slp - Add a Delay (Latency)
- Tc - Set Truncated Flag (Force TCP Mode)
- Ttl - Set Custom TTL Value
See also
- NewId - Set Random Transaction ID
- Flgs - Set Custom Flags in the Header
- Qurr - Set Question RRs in the Header
- Anrr - Set Answer RRs in the Header
- Aurr - Set Authority RRs in the Header
- Adrr - Set Additional RRs in the Header