Digital Forensic Tools

TCP/IP and DNS basics for investigators

Short answer

TCP/IP is the set of rules that devices use to send data across networks, and DNS turns names like example.org into IP addresses. Knowing both helps you read packets and logs correctly.

Layers and addresses

Network data is built in layers. Each layer adds its own header around the data. An IP address says which device the packet is for. A port number says which service on that device. Together with the protocol they identify a connection.

IP addresses can be IPv4 or IPv6. Many home and office devices use private addresses inside and share one public address outside.

TCP and UDP

TCP sets up a connection first, with a three step handshake, and checks that data arrives. UDP just sends messages without a connection. DNS normally uses UDP port 53 for small queries and TCP for larger replies and zone transfers (RFC 1035).

  • TCP: reliable, ordered, used by web and email.
  • UDP: lighter and faster, used by DNS and streaming.
  • A TCP handshake in a capture shows when a connection started.

What DNS does

A device asks a resolver for the address of a name. The answer is made of resource records. An A record gives an IPv4 address, a CNAME gives an alias, an MX record names a mail server and a TXT record holds text.

DNS logs and captures show which names a device looked up and when, even if the later traffic is encrypted.

Why it matters

A name looked up can show intent, such as a visit to a certain site. But a lookup does not prove a person saw the page. Caches and automatic software also make lookups. Procedures and laws differ by country and agency, so follow your lab's own procedure.

Common mistakes

  • Treating a DNS lookup as proof that a user visited a site.
  • Forgetting that many users share one public IP address.
  • Confusing the source port with the service port.
  • Ignoring DNS over TCP and other transports when filtering.

Key terms

IP address
A number that identifies a network interface.
Port
A number that identifies a service on a device.
TCP
A connection based protocol that checks delivery.
UDP
A simple protocol that sends messages without a connection.
Resolver
A server that answers DNS questions for clients.

Questions you may be asked

Which record type names a mail server?

The MX record.

Why is a DNS log useful when traffic is encrypted?

The lookup is often visible even when the later connection is encrypted, so it shows which names were requested.

Free tools to practise with

Learn more

Written in our own words from public forensic training material and standards. Last reviewed 24 Nov 2026. Procedures and laws differ by country and agency. Follow your own lab's procedure.