Lecture Notes 5.0 Nat DCHP and DNS
Lecture Notes 5.0 Nat DCHP and DNS
Generally, private networks use addresses from the following experimental address ranges
(non-routable addresses):
10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255
2
NAT is a router function where IP addresses (and possibly port numbers) of IP datagrams
are replaced at the boundary of a private network
NAT is a method that enables hosts on private networks to communicate with hosts on the
Internet
NAT is run on routers that connect private networks to the public Internet, to replace the
IP address-port pair of an IP packet with another IP address-port pair.
3
Overview of DHCP
Message Types
DHCPREQUEST: Message from a client to servers that does one of the following:
Requests the parameters offered by one of the servers and declines all other offers.
Verifies a previously allocated address after a system or network change (a reboot for
example).
DHCPNACK: Negative acknowledgement from server to client, indicating that the client's
lease has expired or that a requested IP address is incorrect.
DHCPDECLINE: Message from client to server indicating that the offered address is already
in use.
DHCPINFORM: Message from a client that already has an IP address (manually configured
for example), requesting further configuration parameters from the DHCP server.
An application level protocol for message exchange between clients and servers
Why DNS?
Applications such as FTP, HTTP, email, etc., all require the user to input a destination.
The application takes the host name supplied by the user and forwards it to DNS for
translation to an IP address.
A client application will pass the destination host name to the DNS process (in Unix
referred to as the gethostbyname() routine) to get the IP address.
The application then sits and waits for the response to return.
Operation of DNS
The DNS data is stored in the database in the form of resource records (RR). The RRs are
directly inserted in the DNS messages.
The RRs are a 4 tuple that consist of: {name, value, type, TTL}.
RRs
TTL: time to live, used to indicate when an RR can be removed from the DNS cache.
6
NS - then NAME is a domain name and Value is the IP address of an authoritative name
server
CNAME - then NAME is an alias for a host and Value is the canonical name for the host
MX - then NAME is an alias for an email host and Value is the the canonical name for the
email server
Summary
DNS provides a mechanism for maintaining the user friendliness of the Internet by hiding
some of the operational details.
DNS servers have to be created manually. Recently an update protocol was introduced
that allows DNS to exchange data for additions and deletions.