• CaptainBasculin@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 minutes ago

    Imagine how you look up a website as calling someone from a phone number, but everyone can only use addresses that go like 123.45.67.89. You can always call them through there, but that would be really hard to memorize. DNS gives dynamic names to these numbers, so when you ask for google.com; they take the request before and say “oh, google.com? That links to this number, so here you go”

    There is a company called WHOIS that is entirely dedicated to keep records of this name list, but not all DNS’s use it fully, as an example when adblocking DNS’s gets told to pull something from a site that has ads, the DNS doesnt give the number of ad services back to the browser, but gives the rest of them. As a result, you do not see the ads.

  • jobbies@lemmy.zip
    link
    fedilink
    English
    arrow-up
    9
    ·
    6 hours ago

    Kinda like the contacts app on your phone. You search for a person by name and it gives you their phone number.

    Web address are like a contact name. They partly exist to make it easier for humans to remember them. Computers don’t use the contact name to get a website, they need the phone number (known as an ‘IP address’).

    When you go to pornhub.com in your browser, the computer sends that address - or contact name - to a DNS server. The server looks through its records for that contact name (web address) and replies with the contact’s phone number (IP address). Your browser then uses that to fetch the website for you, and you get to spank it to clown porn.

  • dfyx@lemmy.helios42.de
    link
    fedilink
    English
    arrow-up
    41
    arrow-down
    1
    ·
    11 hours ago

    DNS is like a phone book for the internet.

    Computers on the internet have IP addresses which are numbers like 104.26.9.209. Nobody really wants to remember dozens or even hundreds of those so we also give them names like lemmy.world which are a lot easier to remember. DNS is a service that you can ask “Hey, what’s the IP address for lemmy.world?” and you get a reply like “You can reach lemmy.world under 104.26.9.209, 104.26.8.209 and 172.67.71.35. You may remember those for 256 seconds. After that, better ask me again in case they have moved.”

    In reality, it’s a tiny bit more complex. For example, you can ask for different kinds of information, not just IP addresses and DNS servers talk to each other to efficiently distribute changes across the internet.

      • slazer2au
        link
        fedilink
        English
        arrow-up
        9
        ·
        10 hours ago

        It’s the reason every outage is always DNS.

      • dfyx@lemmy.helios42.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 hours ago

        DNS itself isn’t that complex. We can ask for multiple things (A, AAAA, MX, NS, TXT, …) and servers form a hierarchy so not everyone has to directly talk to the server that has authority over a domain. Maybe add DNSSEC if you feel fancy. That’s about it.

        The complexity comes from actually running these things at an enterprise or even global scale. Giving out different replies depending on who asks so everyone can contact a server that’s geographically close to them. Load balancing between multiple nameservers. Aggressive caching. Failovers. Rights management. The reasons why DNS is the culprit for so many outages are a) the complexity we have layered on top of a relatively simple protocol and b) a lot of other stuff relies on DNS so problems spread super fast.

        • BestBouclettes@jlai.lu
          link
          fedilink
          English
          arrow-up
          1
          ·
          7 hours ago

          Oh yeah I’m well aware of DNS,. But I remember an article raising the alarm about the ever increasing complexity of the code behind it, and the progressive loss of knowledge due to it being a very old protocol.

          • dfyx@lemmy.helios42.de
            link
            fedilink
            English
            arrow-up
            1
            ·
            7 hours ago

            I’m with you on the increasing complexity of code. That goes along with what I said about enterprise and global scale.

            But loss of knowledge? Really? DNS is not some arcane knowledge limited to an inner circle who was there when it was invented. You can literally read RFC 1034 and RFC 1035 and know everything you need to build a basic working DNS server or client. The concepts are literally taught in every university course about networking because they are that important.

    • Serinus
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 hours ago

      It also allows the numbers to change at any time, since it updates a lot faster than a phone book.

      • dfyx@lemmy.helios42.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 hours ago

        Yes. That’s why DNS has a TTL (time to live) in seconds in every response which specifies how long you should remember it before you ask again. The 256 seconds in my example are the real TTL that I got when asking for lemmy.world.

    • Jerkface (any/all)@lemmy.ca
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 hours ago

      A five year old has never heard of a phone book, let alone seen one. You’ve just expanded the problem without solving it.

      • dfyx@lemmy.helios42.de
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        1
        ·
        7 hours ago

        That’s why I didn’t end it with the first sentence and instead dedicated a whole paragraph to what you do with it: you know a name and want to know the corresponding phone number / IP address.

    • AmyAye@nord.pub
      link
      fedilink
      English
      arrow-up
      3
      arrow-down
      1
      ·
      9 hours ago

      It may also be worth adding, this is done because computers work in numbers, and do not inderstand what a “lemmy.world” is at all, but they understand “104.26.9.209” just fine.

      • dfyx@lemmy.helios42.de
        link
        fedilink
        English
        arrow-up
        4
        ·
        8 hours ago

        That’s not true though. Your computer understands “lemmy.world” just as much or as little as “104.26.9.209”. If it couldn’t handle a string of letters, it couldn’t ask a nameserver for the corresponding IP address either.

        Explaining why we need IP addresses would include the ISO/OSI layer model, fixed size DEST fields in IP packet headers, subnets, routing techniques, BGP and a lot more.

        I could explain all that but it would take hours even when talking to someone who has a rough understanding of network technology and probably days when talking to a (virtual) 5-year-old. In the end it boils down to “Using numbers is more efficient” not to “Using names is impossible” and that must suffice for an ELI5.

        • AmyAye@nord.pub
          link
          fedilink
          English
          arrow-up
          1
          ·
          7 hours ago

          104.26.9.209 is a bunch of 8 bit numbers. Lemmy.world is a bunch of translation from ascii to numbers to something meaningful. It directly understand 01101000000110100000100111010001 as on off electrical signals.

          • dfyx@lemmy.helios42.de
            link
            fedilink
            English
            arrow-up
            2
            ·
            edit-2
            7 hours ago

            And your point is? Yes, everything on a PC is a list of numbers. That alone doesn’t make an IP address (four 8-bit numbers / one 32-bit number) inherently more meaningful than the ASCII representation of a domain name (eleven 8-bit numbers in the case of “lemmy.world”). The mapping between a letter and its ASCII code is literally one of the most basic things a computer does.

            The advantage comes from IP addresses having a fixed length, from IPv4 addresses being relatively short overall (IPv6 is 16 bytes which is about the same as many domains) and from prefixes being used for routing so you don’t need a directory of every single IP address at every router (roughly analogous to country and area codes in phone numbers). None of that is relevant for understanding DNS and none of it means that computers don’t “understand” text.

            Edit to fully illustrate my point: IP addresses could just as well be strings like “de/hetzner/falkenstein12/rack42/server23”. That would work. It would take up a lot of memory and be much slower than what we have but it would absolutely be possible to build a version of the internet that uses that instead of opaque numbers. And it would still need DNS on top because nobody wants to remember (or even know) where a website’s server is physically located.

  • Psaldorn
    link
    fedilink
    English
    arrow-up
    2
    ·
    7 hours ago

    You say “give me xyz.com” it looks up what the IP address is for that domain so your computer can request it.

      • dfyx@lemmy.helios42.de
        link
        fedilink
        English
        arrow-up
        1
        ·
        6 hours ago

        It’s like the contacts app in your smartphone where you keep the phone numbers of people so you don’t have to remember them. The main difference is that a phone book has lots and lots of people so you can look up numbers for people you have never met. We used to get updated versions as printed books every year or so. These days, they still exist as apps or websites.

      • Janx@piefed.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        8 hours ago

        My brother-in-law is 10 years older than me and he was trying to explain to his kids what dial-up internet was like and what it actually was. We covered the speed and the sound and he mentioned it was internet over a phone line. I had to remind him “they don’t know what a ‘phone line’ is!”

  • cobysev
    link
    fedilink
    English
    arrow-up
    5
    ·
    10 hours ago

    DNS = Domain Name System

    Computers talk in computer language. When they need to contact one another, they use an address to find each other, like we use addresses to find our homes or businesses on a map. Theirs is called an IP address, or Internet Protocol address. It’s a series of numbers (and sometimes letters) that computers recognize as an address on the Internet.

    But to humans, IP addresses are complex jumbles of numbers and letters. If you want to go to Google’s website, you might type in one of their many IP addresses (e.g. 216.58.198.46, or 2a00:1450:400e:808::200e), but how are you ever going to remember all that nonsense? And for every single individual website?!

    Instead, you can remember a simple little URL, or Uniform Resource Locator, that’s quick and easy to recall: google.com.

    DNS is a process that keeps track of all IP addresses and their associated hostnames (or URLs) and will translate between the two of them on the fly. For example, you tell your computer you want to go to amazon.com and DNS will tell the computer to track down 98.82.161.185.

    TL;DR - DNS translates between human web addresses and computer web addresses, so us humans can communicate with our computers and receive information from across the Internet.

    Bonus: Google secured a very simple IP address long ago, so even humans can remember how to find them: 8.8.8.8. I worked in an IT field for 20 years, managing a DNS server (along with dozens of other servers and thousands of personal computers). If the DNS server ever went down, we’d use that simple IP address to get to Google’s website so we could search for answers while troubleshooting. To this day, it’s the only public IP address I still remember.

    • lemonhead2
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 hours ago

      lol. back in the day I had to configure my dial up internet by hand Everytime. still remember the dns server

      202.54.1.18

  • plyth@feddit.org
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    11 hours ago

    It’s like the Squid Game challenge where the team has to cross a bridge and they don’t know which plate is safe and which will break. When a plate breaks, it turns out to be DNS.

  • neidu3@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 hours ago

    A DNS server translates between addresses and hostnames. It makes it possible to tell a program to connect to example.com, and DNS translates it into 104.20.23.154

  • GottaHaveFaith@fedia.io
    link
    fedilink
    arrow-up
    1
    ·
    9 hours ago

    you have an address: city, street number… you could give to people the gps coordinates for it, latitude and longitude, but it’s easier to use the address.

    In the same way, computers on the internet have an ip address, such as 192.168.1.1, but it’s easier to use a domain such as hello.com

    DNS is the service translating between domains and ip addresses. Since it can store some information, it’s also used to verify things for example for emails.

    • BorgDrone@feddit.nl
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 hours ago

      computers on the internet have an ip address, such as 192.168.1.1

      Except computer on the internet specifically do not have an IP address such as that one.

    • dfyx@lemmy.helios42.de
      link
      fedilink
      English
      arrow-up
      19
      ·
      11 hours ago

      I don’t think pointing to a Wikipedia article without further explanation is in the spirit of ELI5.

        • Th4tGuyII@fedia.io
          link
          fedilink
          arrow-up
          5
          ·
          9 hours ago

          Yes, but that’s not the point.

          ELI5 means Explain Like I’m 5 [ys/o]. It’s not meant to be an info-dump, it’s meant to be a basic explainer for someone who is interested to know about a specific thing, but has no knowledge of the surrounding subject matter.

          Would you point a 5 year old to a wikipedia article and tell them to read up about DNS’s. No, you’d explain it to them in terms they understand.

          • dfyx@lemmy.helios42.de
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            6 hours ago

            ELI5 means Explain Like I’m 5 [ys/o]

            Damn, now I’m seriously thinking about making an “Explain Like I’m 5 [Goblins in a Trench Coat]” community over on ttrpg.network.

            Edit: [email protected]