Skip to content

Usage Examples

These examples showcase how to combine different features for powerful DNS querying.

Basic Queries

  1. Simple A record lookup:

    Terminal window
    doggo example.com
  2. Query for a specific record type:

    Terminal window
    doggo AAAA example.com
  3. Query multiple record types simultaneously:

    Terminal window
    doggo A AAAA MX example.com
  4. Query using Globalping API from a specific location:

    Terminal window
    doggo example.com --gp-from Germany

Using Different Resolvers

  1. Query using a specific DNS resolver:

    Terminal window
    doggo example.com @1.1.1.1
  2. Use DNS-over-HTTPS (DoH):

    Terminal window
    doggo example.com @https://cloudflare-dns.com/dns-query
  3. Use DNS-over-TLS (DoT):

    Terminal window
    doggo example.com @tls://1.1.1.1
  4. Query multiple resolvers and compare results:

    Terminal window
    doggo example.com @1.1.1.1 @8.8.8.8 @9.9.9.9
  5. Using Globalping API

    Terminal window
    doggo example.com @1.1.1.1 --gp-from Germany

Advanced Queries

  1. Perform a reverse DNS lookup:

    Terminal window
    doggo --reverse 8.8.8.8
  2. Set query flags for DNSSEC validation:

    Terminal window
    doggo example.com --do --cd
  3. Use the short output format for concise results:

    Terminal window
    doggo example.com --short
  4. Show query timing information:

    Terminal window
    doggo example.com --time

Combining Flags

  1. Perform a reverse lookup with short output and custom resolver:

    Terminal window
    doggo --reverse 8.8.8.8 --short @1.1.1.1
  2. Query for MX records using DoH with JSON output:

    Terminal window
    doggo MX example.com @https://dns.google/dns-query --json
  3. Use IPv6 only with a specific timeout and DNSSEC checking:

    Terminal window
    doggo AAAA example.com -6 --timeout 3s --do

Scripting and Automation

  1. Use JSON output for easy parsing in scripts:

    Terminal window
    doggo example.com --json | jq '.responses[0].answers[].address'
  2. Batch query multiple domains from a file:

    Terminal window
    cat domains.txt | xargs -I {} doggo {} --short
  3. Find all nameservers for a domain and its parent domains:

    Terminal window
    doggo NS example.com example.com. com. . --short
  4. Extract all MX records and their priorities:

    Terminal window
    doggo MX gmail.com --json | jq -r '.responses[0].answers[] | "\(.address) \(.preference)"'
  5. Count the number of IPv6 addresses for a domain:

    Terminal window
    doggo AAAA example.com --json | jq '.responses[0].answers | length'

EDNS Options

  1. Request Name Server Identifier (NSID) to see which server responded:

    Terminal window
    doggo example.com --nsid @1.1.1.1
  2. Use EDNS Client Subnet (ECS) for geo-aware CDN responses:

    Terminal window
    doggo example.com --ecs 8.8.8.0/24 @8.8.8.8

    This is particularly useful for testing how CDNs route traffic based on client location.

  3. Compare responses from different geographic locations using ECS:

    Terminal window
    # North America subnet
    doggo example.com --ecs 8.8.8.0/24 @8.8.8.8
    # Europe subnet
    doggo example.com --ecs 1.1.1.0/24 @8.8.8.8
  4. Real-world example: Test geo-aware DNS with Netflix

    Netflix uses geo-aware DNS to route users to regional servers. Query from different locations to see how they return different IP addresses:

    Terminal window
    # From USA (using subnet 8.8.8.0/24)
    doggo netflix.com --ecs 8.8.8.0/24 @8.8.8.8
    # Returns: 3.225.92.8 (AWS US-East servers)
    # From India (using subnet 49.207.0.0/24)
    doggo netflix.com --ecs 49.207.0.0/24 @8.8.8.8
    # Returns: 54.246.79.9 (AWS EU-Ireland servers)
    # From Germany (using subnet 5.9.0.0/24)
    doggo netflix.com --ecs 5.9.0.0/24 @8.8.8.8
    # Returns: 54.74.73.31 (AWS EU-Ireland servers)

    Notice how Netflix returns completely different IP addresses based on your location. This ensures you connect to the closest data center for faster streaming.

    Understanding CDN behavior:

    • Some services like Netflix use geo-aware DNS (different IPs per region)
    • Others like Cloudflare use Anycast (same IPs globally, routing happens at network level)
    • ECS lets you test this without actually traveling!
  5. Use DNS Cookie for enhanced security:

    Terminal window
    doggo example.com --cookie @1.1.1.1
  6. Combine EDNS options for privacy and debugging:

    Terminal window
    doggo example.com --nsid --cookie --padding @1.1.1.1

    The --padding flag helps protect against traffic analysis attacks.

Troubleshooting and Debugging

  1. Enable debug logging for verbose output:

    Terminal window
    doggo example.com --debug
  2. Request Extended DNS Errors (EDE) for detailed failure information:

    Terminal window
    doggo nonexistent.example --ede @1.1.1.1
  3. Test DNSSEC validation:

    Terminal window
    doggo rsasecured.net --do @8.8.8.8

    This example uses a domain known to be DNSSEC-signed. The --do flag sets the DNSSEC OK bit.

    Note: DNSSEC validation can be complex and depends on various factors:

    • The domain must be properly DNSSEC-signed
    • The resolver must support DNSSEC
    • The resolver must be configured to perform DNSSEC validation

    If you don’t see DNSSEC-related information in the output, try using a resolver known to support DNSSEC, like 8.8.8.8 (Google) or 9.9.9.9 (Quad9).

  4. Check for DNSSEC records (DNSKEY, DS, RRSIG):

    Terminal window
    doggo DNSKEY example.com @8.8.8.8
    doggo DS example.com @8.8.8.8
    doggo RRSIG example.com @8.8.8.8
  5. Verify DNSSEC chain of trust:

    Terminal window
    doggo example.com --type=A --do --cd=false @8.8.8.8

Internationalized Domain Names (IDN)

  1. Query Unicode domain names directly:

    Terminal window
    doggo münchen.de

    Doggo automatically converts Unicode to punycode for DNS queries and displays results in Unicode for readability.

  2. Query international domains in different scripts:

    Terminal window
    # German (Umlauts)
    doggo die-förderer.net
    # Arabic
    doggo مصر.eg
    # Chinese
    doggo 中国.cn
    # Japanese
    doggo 日本.jp
  3. Use IDN domains with different resolvers:

    Terminal window
    doggo münchen.de @https://dns.google/dns-query

DNS Additional Section (Glue Records)

  1. Query TLD nameservers to see glue records:

    Terminal window
    doggo NS com. @a.gtld-servers.net --rd=false

    The Additional section shows IPv4 and IPv6 addresses for nameservers, preventing circular dependencies.

  2. Investigate DNS delegation for a domain:

    Terminal window
    doggo NS example.org @a.gtld-servers.net --rd=false

    This reveals how the domain is delegated at the TLD level, including glue records for in-zone nameservers.

  3. Query root servers for TLD nameserver information:

    Terminal window
    doggo NS org. @a.root-servers.net --rd=false
  4. Debug nameserver configuration:

    Terminal window
    doggo NS yourdomain.com @ns1.yourdomain.com --rd=false

    Verify that nameserver IPs are correctly configured in glue records.

  5. See MX target addresses in Additional section:

    Terminal window
    doggo MX gmail.com

    The Additional section may include A/AAAA records for mail servers, optimizing resolution.