DNS and NAT

Domain Name Server and Network Address Translation

Last Update Unknown

Network Address Translation

Network Address Translation is a system responsible for matching up the private IP addresses with the public IP addresses.


Steps:

1. Router replaces internal IP address and port number of the packet with its own public IP address and a port number that it generates.

2. The router stores the mapping information from the internal IP address and port number to its generated port number.

3. Data sent back from the server will be received by the router which will look up the port number in its translation table to identify the machine that originally sent the request.

4. The router’s IP address in the packet will be replaced with the original computer’s private IP address and port number, as read from the translation table.

5. The packet is then sent to the computer.


Domain Name Server

Uniform Resource Locator (URL): A method for identifying the location of resources on the Internet.

Domain Name: The recognisable name of a domain on the Internet

IP Address: A unique number that identifies a device on a network

The Internet used 32-bit codes for IP addresses, but that did not provide enough permutations for the number of devices on the Internet – so IPv4 was ditched in favour of IPv6 (128 bits).

Domain Name Server: A server that contains a list of domain names and their associated IP addresses.


Further Definitions

Internet Registries: Organisations who allocate and administer domain names and IP addresses.

Routable: Accessible over the Internet and globally unique

Non-Routable: Accessible on a private network and not globally unique.

Router Gateway: The router that is the connection between the Internet and a LAN.


ipconfig /all

Shows a machine’s network parameters, including the address to use for DNS queries.

Machines normally cache DNS lookups in case the same hostname needs to be resolved again.

Quite likely if the user is browsing a web site.


Viewing the DNS cache

C:\> ipconfig /displaydns


Windows IP Configuration


Manual DNS Lookup

If a web site or other service is not reachable, you can check that the hostname is resolving.

  • This also checks you have access to a working DNS server.


C:\> nslookup www.bbc.co.uk


Check Path to Remote Host

Send test packets to the remote host

The “ping” utility sends special echo-request packets to any IP address.

  • If they arrive at the destination, an echo-response is returned.


C:\> ping 212.58.244.71

If a packet doesn’t arrive at the destination OR arrives but the response can’t be returned then there is a “time out”


C:\> ping 212.58.244.71

In this case there is some network problem between the local host and the remote host.

Further investigations can be carried out using a tool called traceroute (tracert)