You are on page 1of 3

Difficulty: Medium

Learn how a DNS and DHCP server work


Creator: m101
Have you ever wondered how when you tye www!"oo"le!com
into your #rowser$ you end u connection to a #o% on the
other side of the world& 'ell every comuter on the internet
has its own uni(ue i address$ ackets from any i address
can reach any other i address throu"h #ein" routed throu"h
diferent aths$ #ut this still doesnt answer howcome
www!"oo"le!com "ets translated to somethin" like
10)!*+!,!-.! /his is the 0o# of the DNS! DNS stands for
Dynamic Name Server and its #asic function is to translate
names to i addresses!
1f a DNS does not have the i address of the server re(uested$
it sends the re(uest to the ne%t DNS! /his is a hierachy of
servers thats main #asis is to resolve addresses! Let us
e%amine how for e%amle this heirachy works when we
re(uest yahoo!co!uk from the internet:
2irstly the re(uest is sent to your 1SP$ is!co!uk! /he is
checks its list for the i address and if it doesnt find it$ it sends
the re(uest to its default route$ which is !co!uk! /his DNS
contains all of the names of every address endin" with !co!uk!
1f this DNS for some reason does not have the address$ then
the re(uest is forwarded to !uk which has every address
endin" with !uk! 1f the address still is not found then the
re(uest is forwarded to !root$ which is 1nterN1C! /his DNS
contains every sin"le name of every sin"le i address that has
#een re"istered! 1f !root fails to find a match in its data#ase$
then the re(uest fails! 3fter a DNS uses its default route to find
an address$ it roceeds to store it in its own DNS ta#le! 3 DNS
ta#le would look somethin" similar to the followin":
"oo"le!com *+!.+!--!1)
yahoo!com 10)!*+!,!1-
area4.!net )0+!*!.,!-
3s you can see there is no www! in any of the addresses$ this
is handled #y the #o% that #elon"s to the i address$ this #o%
can then forward addresses onto any su#domain it wishes!
/his is why for e%amle www!area4.!net and irc!area4.!net are
on diferent i addresses!
/he #asic theory #ehind soofin" a DNS server is to modify an
entry in the ta#le$ or "ive the ta#le a false entry that secifies
a false i address! 2or e%amle if we were to chan"e
*+!.+!--!1) which for e%amle is "oo"le!com$ to )0+!*!.,!-
which may #e area4.!net$ on an 1SP5s DNS server$ then every
re(uest for "oo"le!com would #e redirected to area4.!net!
6n a network of for e%amle -00 comuters$ could you
ima"ine manually settin" each and everyones i address& 1t
would take a"es$ and the chances of dou#lin" u would #e
hi"h! /his is where the Dynamic Host Confi"uration Protocol
7DHCP8 is used! 3 DHCP server is used to assi"n i addresses
to the comuters on a network! /he DHCP Server holds a list
of every i address currently in use and assi"ns an i address
to the connectin" comuter! 9very comuter on the network is
told the address of the DHCP Server! So when for e%amle a
comuter without an i address lo"s onto a network the
followin" may haen:
1! /he comuter firstly sends a re(uest to its DHCP Server$ if
none are secified this is usually 1:)!1.*!0!1! So our e%amle
comuter will send a DHCP re(uest to the server 1:)!1.*!0!1!
)! /he Server recieves this re(uest and looks throu"h its ta#le
at what is already in use! /he ta#le looks somethin" similar to
this:
1:)!1.*!0!- cell*00
1:)!1.*!0!* ;M
1:)!1.*!0!)* P6S
1:)!1.*!0!-* cell1+00
1:)!1.*!0!101 m101
1:)!1.*!0!1-) Mor#id
So our e%amle comuter 5/rinity5 is assi"ned the address of
1:)!1.*!0!) #ecause this address is the ne%t ossi#le address
in the ta#le that is not used! /he ta#le now looks like the
followin":
1:)!1.*!0!) /rinity
1:)!1.*!0!- cell*00
1:)!1.*!0!* ;M
1:)!1.*!0!)* P6S
1:)!1.*!0!-* cell1+00
1:)!1.*!0!101 m101
1:)!1.*!0!1-) Mor#id
+! /he assi"ned address is sent #ack to the comuter and it
sets its i address!
/he DHCP Server may handle namin" of comuters and M3C
addresses$ #ut this is unneccisary! /his is 0ust a #asic overview
of how a DNS and DHCP Server oerate$ #ut hoefully you
now have some understandin" of how addressin" works!

You might also like