Reading — step 1 of 5
Read
~2 min readRecord Types & Lookups
MX, SRV, and SOA Records — Byte-Exact RDATA
Beyond A/AAAA/CNAME, three RR types matter the most in real ops: MX for mail routing, SRV for service discovery, and SOA for zone administration. Their RDATA formats are precise — let's encode them down to the byte.
MX (Mail Exchange) — RFC 1035 §3.3.9
+--+--+
| PREFERENCE |
+--+--+
| EXCHANGE (encoded name)
+--/--+
- PREFERENCE (16-bit, big-endian): smaller = higher priority. Senders try low pref first.
- EXCHANGE: the hostname of the mail server (e.g.
mail.example.com).
Example: 10 mail.example.com →
00 0a 04 6d 61 69 6c 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
SRV (Service Locator) — RFC 2782
+--+--+--+--+--+--+
| PRIORITY | WEIGHT | PORT |
+--+--+--+--+--+--+
| TARGET (encoded name)
+--/--+
- PRIORITY (16-bit): clients try lower priority first.
- WEIGHT (16-bit): tie-breaker within the same priority — relative random selection.
- PORT (16-bit): TCP/UDP port number.
- TARGET: hostname providing the service.
Used for: SIP, XMPP, Kerberos, LDAP. Lookup form: _service._proto.name, e.g. _sip._tcp.example.com.
SOA (Start of Authority) — RFC 1035 §3.3.13
+--+--+--+--+--+--+--+--+--+--+--+
| MNAME (encoded name) |
+--+--+--+--+--+--+--+--+--+--+--+
| RNAME (encoded name) |
+--+--+--+--+--+--+--+--+--+--+--+
| SERIAL (32) |
+--+--+--+--+--+--+--+--+--+--+--+
| REFRESH (32) |
+--+--+--+--+--+--+--+--+--+--+--+
| RETRY (32) |
+--+--+--+--+--+--+--+--+--+--+--+
| EXPIRE (32) |
+--+--+--+--+--+--+--+--+--+--+--+
| MINIMUM (32, negative TTL) |
+--+--+--+--+--+--+--+--+--+--+--+
- MNAME: primary name server.
- RNAME: admin email —
@becomes a dot in the wire (e.g.[email protected]→admin.example.com). - SERIAL: zone version. Secondaries reload when serial increases (typically
YYYYMMDDnn). - REFRESH: how often secondaries poll (seconds).
- RETRY: if refresh fails, retry interval.
- EXPIRE: secondaries discard the zone after this without contact.
- MINIMUM: per RFC 2308, this is the negative-cache TTL (NOT the default record TTL — that was the original meaning, then redefined).
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…