How to teach DNS and DHCP

I'm going to do a small talk/workshop/class to teach DNS and DHCP basics to the new members of our small sysadmin-like lab at my university. The main objective is to give the basics concepts, how to setup, and how to properly maintain an existing domain. So I was wondering what was the best way (or well, your way) to approach this and any tips/recommendations you had.

Did you find this post useful? Show some love!

I'd say I'm intermediate when it comes to this kind of thing (pretty close to a beginner though), but here's how I think I would have understood it:


DHCP stands for Dynamic Host Configuration Protocol.

Your DHCP is your router, usually, the box your internet provider gave you.

A DHCP server gives your device an IP, and a default configuration with it.

Here's a simple scheme:

        Router (Global IP:, Local IP:
         /                      |                   \
        /                       |                    \
Laptop (  Home computer ( Your phone (

The devices under your router, unlike your router, don't have a global IP (an IP that can be accessed from anywhere on the internet). They are "hidden" behind it.

A proof? Lookup "what is my IP" on Google on different devices connected to your router.

It'll be the exact same.

It's very easy to communicate with devices on your local network. You just need their IP. For example, from your Home Computer, if you open the command prompt and run ping, it'll ping your laptop.

If, on your Home Computer, you run a server like this for example:

python -m http.server 8080

This runs the default Python's server on port 8080.

Now, on your phone, open up your browser and type in the URL

You'll the index page of your Python's server.


Every domain name is associated with the IP of a server, server which is going to give you the web page you're looking for. Well, a DNS is a server that gives you the IP address from the domain name.

So here's what happens when you contact to your router and go on

  1. Your router (DHCP), gives you an IP (let's say, and some configuration, including the IP to a DNS server.
  2. You switch to your browser and open enter
  3. Your computer asks the DNS server which IP corresponds to, which gives it
  4. Finally, your computer asks for the web page.

If every DNS servers (because, obviously, there are more than one) doesn't work properly, that means internet won't work (and this is why there regularly is some attack on the most common DNS servers).

A real example (which actually happen to me a few weeks back): my internet provider is TPG, and I live in Australia. From time to time, just wouldn't work (that's when you realize that you use GitHub for literally everything). It could last for a whole day! After searching it up on the internet, I found out I wasn't the only one to have this problem with TPG.

And guess what was the problem: TPG's DNS server that I was using (the one that my router gave by default) wasn't working properly. The solution was to override the DHCP's configuration, in other words, change in my computer's setting the DNS server I wanted to use. and are Google's open DNS server, which are the ones I know use.

So one is a security guard with an address book that takes the name, checks for the number, if the number exists then it let's you go there?

The other gives you an address so you know what your house number is on your block?

So one is a security guard with an address book that takes the name, checks for the number, if the number exists then it let's you go there?

Not really, it just tells you where to find what you're looking for. You have to actually go get it (or your slave, aka browser).

The other gives you an address so you know what your house number is on your block?

You don't really care about where you live, although if you ask nicely, you can still chose which house you want, but some bad things will happen if some's already there! You just want him to remember where you live so that he'll be able to deliver the pizza you're going to order at the right place.

Classic DEV Post from May 6

How do you take notes?

How do you take notes?

Follow @newtorob to see more of their posts in your feed.
Amin Arria
Member since Aug 19, 2017
Trending on
Software People β€” How Do You Deal With Stress/Bullies/Frustration?
#life #software #stress #discuss
Saving time with a preset Tmux setup
#tmux #productivity #commandline #linux
When signing up or logging into an app, do you prefer OAuth (authentication w/social media account) or email sign up/sign in?
The Blessing of Rejection (or Growing Past theΒ "No")
#interviewing #career #beginners
Using Print Statements Are A Handy Way to Debug and Explore Code
#beginners #learning #productivity #webdev
What makes a successful standup?
#agile #discuss
Golang, it was love at first sight.
#webdev #go #productivity #learning
How did you decide on what you wanted to do?
#career #advice #discuss