liveBook · Manning

Domain name

As explained in Rust in Action: Systems programming concepts and techniques

A domain name is a hierarchical, human-readable identifier for an Internet host or other DNS resource.

A domain name is a human-readable Internet identifier that DNS translates into an IP address. TCP cannot use domain names directly, so a resolver asks DNS servers for the required address. section 8.4.2

A small Rust command-line utility accepts a hostname, constructs a DNS query for an IPv4 address, sends it through a public or selected DNS server, and prints the result. DNS can use UDP or TCP, with TLS available for encrypted requests. section 8.4.2

Resolve a hostname

Running `resolve www.rustinaction.com` produces an IPv4 address such as `35.185.44.232`. The resolver can also accept a DNS server with `-s`.

How Rust in Action: Systems programming concepts and techniques covers it

How deep it goes
Explains DNS resolution, query construction, and Rust representations, but implements only a small portion of the DNS protocol.
Examples
Demonstrates `resolve www.rustinaction.com`, public DNS servers, and a Rust DNS-message query.
What it assumes
Assumes basic Rust and networking familiarity while teaching DNS terminology and hostname resolution through a working utility.
What you can do after
Operate a Rust resolver using the `trust-dns` crate and configure its DNS server from the command line.
How it connects
Connects domain names with DNS, IP addresses, TCP, UDP, TLS, hostnames, and IPv4 records.

Also explained in

Compare how 2 books explain domain name →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Rust in Action: Systems programming concepts and techniques. The section links point to the parts of the book it draws on.