SlideShare uma empresa Scribd logo
1 de 40
1
Domain Name System (DNS)
&
K. PALANIVEL
Systems Analyst, Computer Centre
Pondicherry University, Puducherry – 605014.
LECTURE 7
COMS 525: TCPIP
COURSE
TOPIC
Dynamic Host Configuration Protocol - DHCP
Domain Name System - DNS
• DNS is a host name to IP address translation service
• DNS is
 a distributed database implemented in a hierarchy
of name servers
 an application level protocol for message
exchange between clients and servers
Domain Name System - DNS
• Provides mapping from ASCII domain names to IP
addresses
 Hierarchical naming system.
 The set of names is divided into mutually exclusive parts.
• Supplies mechanism for global data storage and information
retrieval.
• Most important principles:
 Distributed system – set of servers sharing information.
 Efficiency - most of the requests resolved by local
servers.
 Use of Caching.
 Reliability – works even if some of the servers fail.
Why DNS?
 It is easier to remember a host name than it is to
remember an IP address.
 An name has more meaning to a user than a 4 byte
number.
 Applications such as FTP, HTTP, email, etc., all
require the user to input a destination.
 The user generally enters a host name.
 The application takes the host name supplied by the
user and forwards it to DNS for translation to an IP
address.
DNS Tree
5
root
orgcom gov net il
cnnibm govcoac
tautechnion
Hierarchy of Name Servers
Domain Names and Labels
Reliability over UDP
•DNS is an application which runs over UDP
 Advantage: not as complex as TCP.
 Disadvantage: requires reliability implementation
at application level .
•Reliability scheme:
 Time out.
 Retransmissions - resends timed out query to a
different server.
DNS Terms
Domain name: any name represented in the DNS
format
mail.yahoo.com
.name.example
DNS label: each string between two ".“
ac.il – 2 labels
DNS zone: a set of names that are under the same
authority
cs.pondiuni.edu.in, ee.pondiuni.edu.in.il and www.
pondiuni.edu.in
Delegation: transfer of authority for a domain
example.org is a delegation from org.
9
DNS Elements
Resolver:
stub: simple, only asks questions;
recursive: takes simple query and makes all
necessary steps to get the full answer.
Server (some perform both roles at the same time):
authoritative: the servers that contain the zone file
for a zone, one Primary, one or more Secondaries;
caching: a recursive resolver that stores prior results
and reuses them.
10
How Does DNS Work?
 The resolver sends a DNS request message over UDP to a
local domain name server.
 DNS caches store data for a short time defined by TTL on the
Record.
 When a name server does not have the requested information,
it starts at longest match on query name it has when
looking for data.
 The root server knows the IP address of each second-level
domain name server.
 Every server knows how to reach servers that are authorities
for names further down the hierarchy.
 The resolver follows delegations until it receives an answer.
DNS Query Example (from IETF slides)
Root Server
Ietf.org Server
Org
Server
Ask org NS
Ask ietf.org NS
www.ietf.org A
65.256.255.51
www.ietf.org A
65.256.255.51
Recursive
Resolver
www.ietf.org
Stub resolver
Example of using the DNS service
DNS Protocol and Messages
DNS protocol: query and reply messages, both with
same message format, msg header
14
 identification: 16 bit #
for query, reply to query
uses same #
 flags:
 query or reply
 recursion desired
 recursion available
 reply is authoritative
15
Name, type fields
for a query
RRs in response
to query
records for
authoritative servers
additional “helpful”
info that may be used
DNS Protocol and Messages
25.16
Query and Response Messages
Header format
 DNS can use either UDP or TCP.
 In both cases the well-known port used by the server
is port 53.
 UDP is used when the size of the response message
is less than 512 bytes because most UDP packages
have a 512-byte packet size limit.
 If the size of the response message is more than 512
bytes, a TCP connection is used.
Header format
Dynamic Domain Name System(DDNS)
 The DNS master file must be updated dynamically.
 The Dynamic Domain Name System (DDNS)
therefore was devised to respond to this need. In
DDNS, when a binding between a name and an
address is determined, the information is sent,
usually by DHCP to a primary DNS server. The
primary server updates the zone.
 The secondary servers are notified either actively or
passively.
20
Dynamic Host Configuration Protocol
DHCP
Dynamic Assignment of IP addresses
Dynamic assignment of IP addresses is desirable for
several reasons:
IP addresses are assigned on-demand
Avoid manual IP configuration
Support mobility of laptops
21
Solutions for dynamic assignment of IP addresses
 Reverse Address Resolution Protocol (RARP)
Works similar to ARP
Broadcast a request for the IP address associated with a
given MAC address
RARP server responds with an IP address
Only assigns IP address (not the default router and
subnetmask)
RARP
Ethernet MAC
address
(48 bit)
ARPIP address
(32 bit)
22
BOOTstrap Protocol (BOOTP)
• BOOTstrap Protocol (BOOTP)
• From 1985
• Host can configure its IP parameters at boot time.
• 3 services.
– IP address assignment.
– Detection of the IP address for a serving machine.
– The name of a file to be loaded and executed by the
client machine (boot file name)
– Not only assign IP address, but also default router, network
mask, etc.
– Sent as UDP messages (UDP Port 67 (server) and 68 (host))
– Use limited broadcast address (255.255.255.255):
• These addresses are never forwarded23
Dynamic Host Configuration Protocol - DHCP
• Runs over UDP as well
• Provides automatic configuration of the host
connected to network or booted
• Provides hosts with initial configuration information
upon bootup:
IP address with subnet mask,
default gateway,
IP address of the DNS server .
BOOTP Interaction
Argon
00:a0:24:71:e4:44 BOOTP Server
BOOTP Request
00:a0:24:71:e4:44
Sent to 255.255.255.255
25
• BOOTP can be used for
downloading memory
image for diskless
workstations
• Assignment of IP addresses
to hosts is static
Argon
128.143.137.144
00:a0:24:71:e4:44 DHCP Server
BOOTP Response:
IP address: 128.143.137.144
Server IP address: 128.143.137.100
Boot file name: filename
(a)
(b)
(c)
DHCP Interaction (simplified)
Argon
128.143.137.144
00:a0:24:71:e4:44 DHCP Server
DHCP Response:
IP address: 128.143.137.144
Default gateway: 128.143.137.1
Netmask: 255.255.0.0
DHCP (cont.)
server A
client
server B
determine
configuration
determine
configuration
DHCP discoverDHCP discover
DHCP offer
DHCP offer
select configuration
DHCP requestDHCP request
DHCP ack
Initialization completes
graceful shutdown
DHCP release
discard lease
using the allocated configuration
(selected)(not selected)
DHCP Operation
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCPDISCOVER
Sent to 255.255.255.255
DHCP Server
DCHP DISCOVER
28
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCP Server
DHCPOFFER
DHCPOFFER
DCHP OFFER
DHCP Operation
29
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCP Server
DHCPREQUEST
DHCPACK
DCHP DISCOVER
At this time, the DHCP
client can start to use the IP
address
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCP Server
DHCPREQUEST
DHCPACK
Renewing a Lease
(sent when 50% of lease
has expired)
If DHCP server sends
DHCPNACK, then
address is released.
DHCP Operation
DHCP Client
00:a0:24:71:e4:44 DHCP Server
DHCP Server
DHCPRELEASE
DCHP RELEASE
At this time, the DHCP
client has released the
IP address
DHCP Messages
• DHCPDISCOVER
– The client broadcasts message in search of available DHCP
servers.
• DHCPOFFER
– The server response to the client DHCPDISCOVER with
offer of configuration parameters .
• DHCPREQUEST
– The client broadcasts to the server, requesting offered
parameters from one server specifically.
– Confirms correctness of previously allocated address after,
e.g., system reboot.
– Extends the lease on a particular network address.
• DHCPRELEASE
– The client-to-server communication, relinquishing network
address and canceling remaining lease.
31
DHCP Messages (Cont.)
•DHCPACK
–The server-to-client communication with configuration
parameters, including committed network address.
•DHCPNAK
–Server to client indicating client's notion of network address
is incorrect (e.g., client has moved to new subnet) or client's
lease as expired
•DHCPDECLINE
–The client-to-server communication, indicating that the
network address is already in use.
•DHCPINFORM
–The client-to-server communication, asking for only local
configuration parameters that the client already has
externally configured as an address.
DHCP message format
•xid
Transaction ID.
•ciaddr
Client IP address
•yiaddr
Your IP address.
•siaddr
Server IP address.
•chaddr
Client MAC address
33
BOOTP/DHCP Message Format
Number of Seconds
OpCode Hardware Type
Your IP address
Unused (in BOOTP)
Flags (in DHCP)
Gateway IP address
Client IP address
Server IP address
Hardware Address
Length
Hop Count
Server host name (64 bytes)
Client hardware address (16 bytes)
Boot file name (128 bytes)
Transaction ID
Options
(There are >100 different options)
DHCP message format (cont.)
 Transaction ID - a random number that is used by the
client to match incoming DHCP messages with pending
requests.
 Client IP address - used when client knows its IP
address.
 Your IP address - the DHCP server will place the
offered client IP address in this field, if the client IP
address is 0.0.0.0.
 Server IP address - the DHCP server address, if it is
known. Otherwise, it is used in DHCPOFFER and
DHCPACK.
 Options - DHCP defines a 'client identifier' option that is
used to pass an explicit client identifier to a server.
DHCP Message Filtering
• DHCPOFFER
Only the client waiting for this message will accept it in
UDP layer.
But what if two clients are waiting for the offer
simultaneously?
• The filtering is possible only at the application layer.
• The transaction ID field is responsible for this
filtering.
• DHCPREQUEST
The message is broadcasted to all the servers.
The server knows if its offer was accepted only upon
reading the server identifier field in the DHCP message.
36
DHCP as UDP application
• DHCP server - port 67, client - port 68
• Reliability is not provided by UDP.
• Client is responsible for reliability
 The client implements timer to measure timeout for the
messages that were not responded.
 The client adopts a retransmission strategy that
incorporates a randomized exponential backoff algorithm
to determine the delay between retransmissions.
 Every next message acts as an acknowledgment for the
previous step.
• For example, DHCPREQUEST is an ACK for
DHCPOFFER.
DHCP Pros
• It relieves the network administrator of a great deal of
manual configuration work.
• The ability for a device to be moved from network to
network and to automatically obtain valid
configuration parameters for the current network can
be of great benefit to mobile users.
• Because IP addresses are only allocated when clients
are actually active, it is possible, by the use of
reasonably short lease times and the fact that mobile
clients do not need to be allocated more than one
address, to reduce the total number of addresses in use
in an organization.
38
DHCP Cons
• Uses UDP, an unreliable and insecure protocol.
• DNS cannot be used for DHCP configured hosts.
QUESTIONS ???

Mais conteúdo relacionado

Mais procurados

Domain Name Server
Domain Name ServerDomain Name Server
Domain Name Servervipulvaid
 
Build Dynamic DNS server from scratch in C (Part1)
Build Dynamic DNS server from scratch in C (Part1)Build Dynamic DNS server from scratch in C (Part1)
Build Dynamic DNS server from scratch in C (Part1)Yen-Kuan Wu
 
03 network services
03 network services03 network services
03 network servicesJadavsejal
 
DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)Netwax Lab
 
Dynamic Domain Name System
Dynamic Domain Name SystemDynamic Domain Name System
Dynamic Domain Name SystemRajan Kumar
 
DNS Security
DNS SecurityDNS Security
DNS Securityinbroker
 
Pmw2 k3ni 1-2b
Pmw2 k3ni 1-2bPmw2 k3ni 1-2b
Pmw2 k3ni 1-2bhariclant1
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name SystemPeter R. Egli
 
Chapter 4 configuring and managing the dns server role
Chapter 4   configuring and managing the dns server roleChapter 4   configuring and managing the dns server role
Chapter 4 configuring and managing the dns server roleLuis Garay
 
Domain name system
Domain name systemDomain name system
Domain name systemVivek Gautam
 
Lesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol ALesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol AMahmmoud Mahdi
 

Mais procurados (20)

Domain Name Server
Domain Name ServerDomain Name Server
Domain Name Server
 
Dns
DnsDns
Dns
 
Dns
DnsDns
Dns
 
Dns
DnsDns
Dns
 
Lecture 14
Lecture 14Lecture 14
Lecture 14
 
Build Dynamic DNS server from scratch in C (Part1)
Build Dynamic DNS server from scratch in C (Part1)Build Dynamic DNS server from scratch in C (Part1)
Build Dynamic DNS server from scratch in C (Part1)
 
Common Network Services
Common Network ServicesCommon Network Services
Common Network Services
 
03 network services
03 network services03 network services
03 network services
 
DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)DHCP (dynamic host configuration protocol)
DHCP (dynamic host configuration protocol)
 
Dynamic Domain Name System
Dynamic Domain Name SystemDynamic Domain Name System
Dynamic Domain Name System
 
DNS Security
DNS SecurityDNS Security
DNS Security
 
Pmw2 k3ni 1-2b
Pmw2 k3ni 1-2bPmw2 k3ni 1-2b
Pmw2 k3ni 1-2b
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name System
 
Dns
DnsDns
Dns
 
7 understanding DNS
7 understanding DNS7 understanding DNS
7 understanding DNS
 
Chapter 4 configuring and managing the dns server role
Chapter 4   configuring and managing the dns server roleChapter 4   configuring and managing the dns server role
Chapter 4 configuring and managing the dns server role
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Lesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol ALesson 6: Dynamic Host Configuration Protocol A
Lesson 6: Dynamic Host Configuration Protocol A
 
DDNS
DDNSDDNS
DDNS
 
Domain Name System (DNS)
Domain Name System (DNS)Domain Name System (DNS)
Domain Name System (DNS)
 

Semelhante a 06 coms 525 tcpip - dhcp and dns

Semelhante a 06 coms 525 tcpip - dhcp and dns (20)

DHCP
DHCPDHCP
DHCP
 
Session_2.ppt
Session_2.pptSession_2.ppt
Session_2.ppt
 
08Mapping.ppt
08Mapping.ppt08Mapping.ppt
08Mapping.ppt
 
IP Layer.pptx
IP Layer.pptxIP Layer.pptx
IP Layer.pptx
 
Unit 6 : Application Layer
Unit 6 : Application LayerUnit 6 : Application Layer
Unit 6 : Application Layer
 
zuiqui_DHC.ppt
zuiqui_DHC.pptzuiqui_DHC.ppt
zuiqui_DHC.ppt
 
Lecture 23 DHCP and NAT.pptx
Lecture 23 DHCP and NAT.pptxLecture 23 DHCP and NAT.pptx
Lecture 23 DHCP and NAT.pptx
 
System and network administration network services
System and network administration network servicesSystem and network administration network services
System and network administration network services
 
Dn sonly
Dn sonlyDn sonly
Dn sonly
 
Dns server converted
Dns server convertedDns server converted
Dns server converted
 
Dns
DnsDns
Dns
 
How to configure dns server(2)
How to configure dns server(2)How to configure dns server(2)
How to configure dns server(2)
 
vpn-radius-5.ppt
vpn-radius-5.pptvpn-radius-5.ppt
vpn-radius-5.ppt
 
3_CHAP~2.PPT
3_CHAP~2.PPT3_CHAP~2.PPT
3_CHAP~2.PPT
 
Deploying and configuring dns service
Deploying and configuring dns serviceDeploying and configuring dns service
Deploying and configuring dns service
 
Rhel4
Rhel4Rhel4
Rhel4
 
Cse -306
Cse -306Cse -306
Cse -306
 
server notes for beginners
server notes for beginners server notes for beginners
server notes for beginners
 
DHCP
DHCPDHCP
DHCP
 
Dns
DnsDns
Dns
 

Mais de Palanivel Kuppusamy

16 coms 525 tcpip - routing protocols -all
16    coms 525 tcpip - routing protocols -all16    coms 525 tcpip - routing protocols -all
16 coms 525 tcpip - routing protocols -allPalanivel Kuppusamy
 
15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocolsPalanivel Kuppusamy
 
14 coms 525 tcpip - applications - snmp
14    coms 525 tcpip - applications - snmp14    coms 525 tcpip - applications - snmp
14 coms 525 tcpip - applications - snmpPalanivel Kuppusamy
 
13 coms 525 tcpip - applications - file transfer protocol
13   coms 525 tcpip - applications - file transfer protocol13   coms 525 tcpip - applications - file transfer protocol
13 coms 525 tcpip - applications - file transfer protocolPalanivel Kuppusamy
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnetPalanivel Kuppusamy
 
11 coms 525 tcpip - internet protocol - forward
11   coms 525 tcpip - internet protocol - forward11   coms 525 tcpip - internet protocol - forward
11 coms 525 tcpip - internet protocol - forwardPalanivel Kuppusamy
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ipPalanivel Kuppusamy
 
07 coms 525 tcpip - udp [autosaved]
07    coms 525 tcpip - udp [autosaved]07    coms 525 tcpip - udp [autosaved]
07 coms 525 tcpip - udp [autosaved]Palanivel Kuppusamy
 
04 coms 525 tcpip - arp and rarp
04   coms 525 tcpip - arp and rarp04   coms 525 tcpip - arp and rarp
04 coms 525 tcpip - arp and rarpPalanivel Kuppusamy
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpipPalanivel Kuppusamy
 
01 coms 525 tcpip - networking concepts review
01   coms 525 tcpip - networking concepts review01   coms 525 tcpip - networking concepts review
01 coms 525 tcpip - networking concepts reviewPalanivel Kuppusamy
 
00 coms 525 tcpip - introduction to networks
00   coms 525 tcpip -  introduction to networks00   coms 525 tcpip -  introduction to networks
00 coms 525 tcpip - introduction to networksPalanivel Kuppusamy
 

Mais de Palanivel Kuppusamy (17)

16 coms 525 tcpip - routing protocols -all
16    coms 525 tcpip - routing protocols -all16    coms 525 tcpip - routing protocols -all
16 coms 525 tcpip - routing protocols -all
 
15 coms 525 tcpip - border gateway protocols
15    coms 525 tcpip - border gateway protocols15    coms 525 tcpip - border gateway protocols
15 coms 525 tcpip - border gateway protocols
 
14 coms 525 tcpip - applications - snmp
14    coms 525 tcpip - applications - snmp14    coms 525 tcpip - applications - snmp
14 coms 525 tcpip - applications - snmp
 
13 coms 525 tcpip - applications - file transfer protocol
13   coms 525 tcpip - applications - file transfer protocol13   coms 525 tcpip - applications - file transfer protocol
13 coms 525 tcpip - applications - file transfer protocol
 
12 coms 525 tcpip - applications - http - telnet
12   coms 525 tcpip - applications - http - telnet12   coms 525 tcpip - applications - http - telnet
12 coms 525 tcpip - applications - http - telnet
 
11 coms 525 tcpip - internet protocol - forward
11   coms 525 tcpip - internet protocol - forward11   coms 525 tcpip - internet protocol - forward
11 coms 525 tcpip - internet protocol - forward
 
10 coms 525 tcpip - internet protocol - ip
10   coms 525 tcpip -  internet protocol - ip10   coms 525 tcpip -  internet protocol - ip
10 coms 525 tcpip - internet protocol - ip
 
09 coms 525 tcpip - tcp 2
09   coms 525 tcpip - tcp 209   coms 525 tcpip - tcp 2
09 coms 525 tcpip - tcp 2
 
08 coms 525 tcpip - tcp 1
08   coms 525 tcpip - tcp 108   coms 525 tcpip - tcp 1
08 coms 525 tcpip - tcp 1
 
07 coms 525 tcpip - udp
07    coms 525 tcpip - udp07    coms 525 tcpip - udp
07 coms 525 tcpip - udp
 
07 coms 525 tcpip - udp [autosaved]
07    coms 525 tcpip - udp [autosaved]07    coms 525 tcpip - udp [autosaved]
07 coms 525 tcpip - udp [autosaved]
 
05 coms 525 tcpip - icmp
05   coms 525 tcpip - icmp05   coms 525 tcpip - icmp
05 coms 525 tcpip - icmp
 
04 coms 525 tcpip - arp and rarp
04   coms 525 tcpip - arp and rarp04   coms 525 tcpip - arp and rarp
04 coms 525 tcpip - arp and rarp
 
03 coms 525 tcpip - ip address
03   coms 525 tcpip -  ip address03   coms 525 tcpip -  ip address
03 coms 525 tcpip - ip address
 
02 coms 525 tcpip - introduction to tcpip
02   coms 525 tcpip -  introduction to tcpip02   coms 525 tcpip -  introduction to tcpip
02 coms 525 tcpip - introduction to tcpip
 
01 coms 525 tcpip - networking concepts review
01   coms 525 tcpip - networking concepts review01   coms 525 tcpip - networking concepts review
01 coms 525 tcpip - networking concepts review
 
00 coms 525 tcpip - introduction to networks
00   coms 525 tcpip -  introduction to networks00   coms 525 tcpip -  introduction to networks
00 coms 525 tcpip - introduction to networks
 

Último

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 

Último (20)

ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 

06 coms 525 tcpip - dhcp and dns

  • 1. 1 Domain Name System (DNS) & K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University, Puducherry – 605014. LECTURE 7 COMS 525: TCPIP COURSE TOPIC Dynamic Host Configuration Protocol - DHCP
  • 2. Domain Name System - DNS • DNS is a host name to IP address translation service • DNS is  a distributed database implemented in a hierarchy of name servers  an application level protocol for message exchange between clients and servers
  • 3. Domain Name System - DNS • Provides mapping from ASCII domain names to IP addresses  Hierarchical naming system.  The set of names is divided into mutually exclusive parts. • Supplies mechanism for global data storage and information retrieval. • Most important principles:  Distributed system – set of servers sharing information.  Efficiency - most of the requests resolved by local servers.  Use of Caching.  Reliability – works even if some of the servers fail.
  • 4. Why DNS?  It is easier to remember a host name than it is to remember an IP address.  An name has more meaning to a user than a 4 byte number.  Applications such as FTP, HTTP, email, etc., all require the user to input a destination.  The user generally enters a host name.  The application takes the host name supplied by the user and forwards it to DNS for translation to an IP address.
  • 5. DNS Tree 5 root orgcom gov net il cnnibm govcoac tautechnion
  • 8. Reliability over UDP •DNS is an application which runs over UDP  Advantage: not as complex as TCP.  Disadvantage: requires reliability implementation at application level . •Reliability scheme:  Time out.  Retransmissions - resends timed out query to a different server.
  • 9. DNS Terms Domain name: any name represented in the DNS format mail.yahoo.com .name.example DNS label: each string between two ".“ ac.il – 2 labels DNS zone: a set of names that are under the same authority cs.pondiuni.edu.in, ee.pondiuni.edu.in.il and www. pondiuni.edu.in Delegation: transfer of authority for a domain example.org is a delegation from org. 9
  • 10. DNS Elements Resolver: stub: simple, only asks questions; recursive: takes simple query and makes all necessary steps to get the full answer. Server (some perform both roles at the same time): authoritative: the servers that contain the zone file for a zone, one Primary, one or more Secondaries; caching: a recursive resolver that stores prior results and reuses them. 10
  • 11. How Does DNS Work?  The resolver sends a DNS request message over UDP to a local domain name server.  DNS caches store data for a short time defined by TTL on the Record.  When a name server does not have the requested information, it starts at longest match on query name it has when looking for data.  The root server knows the IP address of each second-level domain name server.  Every server knows how to reach servers that are authorities for names further down the hierarchy.  The resolver follows delegations until it receives an answer.
  • 12. DNS Query Example (from IETF slides) Root Server Ietf.org Server Org Server Ask org NS Ask ietf.org NS www.ietf.org A 65.256.255.51 www.ietf.org A 65.256.255.51 Recursive Resolver www.ietf.org Stub resolver
  • 13. Example of using the DNS service
  • 14. DNS Protocol and Messages DNS protocol: query and reply messages, both with same message format, msg header 14  identification: 16 bit # for query, reply to query uses same #  flags:  query or reply  recursion desired  recursion available  reply is authoritative
  • 15. 15 Name, type fields for a query RRs in response to query records for authoritative servers additional “helpful” info that may be used DNS Protocol and Messages
  • 18.  DNS can use either UDP or TCP.  In both cases the well-known port used by the server is port 53.  UDP is used when the size of the response message is less than 512 bytes because most UDP packages have a 512-byte packet size limit.  If the size of the response message is more than 512 bytes, a TCP connection is used. Header format
  • 19. Dynamic Domain Name System(DDNS)  The DNS master file must be updated dynamically.  The Dynamic Domain Name System (DDNS) therefore was devised to respond to this need. In DDNS, when a binding between a name and an address is determined, the information is sent, usually by DHCP to a primary DNS server. The primary server updates the zone.  The secondary servers are notified either actively or passively.
  • 21. Dynamic Assignment of IP addresses Dynamic assignment of IP addresses is desirable for several reasons: IP addresses are assigned on-demand Avoid manual IP configuration Support mobility of laptops 21
  • 22. Solutions for dynamic assignment of IP addresses  Reverse Address Resolution Protocol (RARP) Works similar to ARP Broadcast a request for the IP address associated with a given MAC address RARP server responds with an IP address Only assigns IP address (not the default router and subnetmask) RARP Ethernet MAC address (48 bit) ARPIP address (32 bit) 22
  • 23. BOOTstrap Protocol (BOOTP) • BOOTstrap Protocol (BOOTP) • From 1985 • Host can configure its IP parameters at boot time. • 3 services. – IP address assignment. – Detection of the IP address for a serving machine. – The name of a file to be loaded and executed by the client machine (boot file name) – Not only assign IP address, but also default router, network mask, etc. – Sent as UDP messages (UDP Port 67 (server) and 68 (host)) – Use limited broadcast address (255.255.255.255): • These addresses are never forwarded23
  • 24. Dynamic Host Configuration Protocol - DHCP • Runs over UDP as well • Provides automatic configuration of the host connected to network or booted • Provides hosts with initial configuration information upon bootup: IP address with subnet mask, default gateway, IP address of the DNS server .
  • 25. BOOTP Interaction Argon 00:a0:24:71:e4:44 BOOTP Server BOOTP Request 00:a0:24:71:e4:44 Sent to 255.255.255.255 25 • BOOTP can be used for downloading memory image for diskless workstations • Assignment of IP addresses to hosts is static Argon 128.143.137.144 00:a0:24:71:e4:44 DHCP Server BOOTP Response: IP address: 128.143.137.144 Server IP address: 128.143.137.100 Boot file name: filename (a) (b) (c)
  • 26. DHCP Interaction (simplified) Argon 128.143.137.144 00:a0:24:71:e4:44 DHCP Server DHCP Response: IP address: 128.143.137.144 Default gateway: 128.143.137.1 Netmask: 255.255.0.0
  • 27. DHCP (cont.) server A client server B determine configuration determine configuration DHCP discoverDHCP discover DHCP offer DHCP offer select configuration DHCP requestDHCP request DHCP ack Initialization completes graceful shutdown DHCP release discard lease using the allocated configuration (selected)(not selected)
  • 28. DHCP Operation DHCP Client 00:a0:24:71:e4:44 DHCP Server DHCPDISCOVER Sent to 255.255.255.255 DHCP Server DCHP DISCOVER 28 DHCP Client 00:a0:24:71:e4:44 DHCP Server DHCP Server DHCPOFFER DHCPOFFER DCHP OFFER
  • 29. DHCP Operation 29 DHCP Client 00:a0:24:71:e4:44 DHCP Server DHCP Server DHCPREQUEST DHCPACK DCHP DISCOVER At this time, the DHCP client can start to use the IP address DHCP Client 00:a0:24:71:e4:44 DHCP Server DHCP Server DHCPREQUEST DHCPACK Renewing a Lease (sent when 50% of lease has expired) If DHCP server sends DHCPNACK, then address is released.
  • 30. DHCP Operation DHCP Client 00:a0:24:71:e4:44 DHCP Server DHCP Server DHCPRELEASE DCHP RELEASE At this time, the DHCP client has released the IP address
  • 31. DHCP Messages • DHCPDISCOVER – The client broadcasts message in search of available DHCP servers. • DHCPOFFER – The server response to the client DHCPDISCOVER with offer of configuration parameters . • DHCPREQUEST – The client broadcasts to the server, requesting offered parameters from one server specifically. – Confirms correctness of previously allocated address after, e.g., system reboot. – Extends the lease on a particular network address. • DHCPRELEASE – The client-to-server communication, relinquishing network address and canceling remaining lease. 31
  • 32. DHCP Messages (Cont.) •DHCPACK –The server-to-client communication with configuration parameters, including committed network address. •DHCPNAK –Server to client indicating client's notion of network address is incorrect (e.g., client has moved to new subnet) or client's lease as expired •DHCPDECLINE –The client-to-server communication, indicating that the network address is already in use. •DHCPINFORM –The client-to-server communication, asking for only local configuration parameters that the client already has externally configured as an address.
  • 33. DHCP message format •xid Transaction ID. •ciaddr Client IP address •yiaddr Your IP address. •siaddr Server IP address. •chaddr Client MAC address 33
  • 34. BOOTP/DHCP Message Format Number of Seconds OpCode Hardware Type Your IP address Unused (in BOOTP) Flags (in DHCP) Gateway IP address Client IP address Server IP address Hardware Address Length Hop Count Server host name (64 bytes) Client hardware address (16 bytes) Boot file name (128 bytes) Transaction ID Options (There are >100 different options)
  • 35. DHCP message format (cont.)  Transaction ID - a random number that is used by the client to match incoming DHCP messages with pending requests.  Client IP address - used when client knows its IP address.  Your IP address - the DHCP server will place the offered client IP address in this field, if the client IP address is 0.0.0.0.  Server IP address - the DHCP server address, if it is known. Otherwise, it is used in DHCPOFFER and DHCPACK.  Options - DHCP defines a 'client identifier' option that is used to pass an explicit client identifier to a server.
  • 36. DHCP Message Filtering • DHCPOFFER Only the client waiting for this message will accept it in UDP layer. But what if two clients are waiting for the offer simultaneously? • The filtering is possible only at the application layer. • The transaction ID field is responsible for this filtering. • DHCPREQUEST The message is broadcasted to all the servers. The server knows if its offer was accepted only upon reading the server identifier field in the DHCP message. 36
  • 37. DHCP as UDP application • DHCP server - port 67, client - port 68 • Reliability is not provided by UDP. • Client is responsible for reliability  The client implements timer to measure timeout for the messages that were not responded.  The client adopts a retransmission strategy that incorporates a randomized exponential backoff algorithm to determine the delay between retransmissions.  Every next message acts as an acknowledgment for the previous step. • For example, DHCPREQUEST is an ACK for DHCPOFFER.
  • 38. DHCP Pros • It relieves the network administrator of a great deal of manual configuration work. • The ability for a device to be moved from network to network and to automatically obtain valid configuration parameters for the current network can be of great benefit to mobile users. • Because IP addresses are only allocated when clients are actually active, it is possible, by the use of reasonably short lease times and the fact that mobile clients do not need to be allocated more than one address, to reduce the total number of addresses in use in an organization. 38
  • 39. DHCP Cons • Uses UDP, an unreliable and insecure protocol. • DNS cannot be used for DHCP configured hosts.