Author Archives: Dimitris

UDP explained

Networks mean communication, a non-stop exchange of different data types. Following this idea, networks strongly need solutions for transferring data from one place (source) to another (destination).

Those solutions exist, and they are called communication protocols. UDP is one of them! 

What is UDP?

The user datagram protocol or UDP is a communication protocol created in 1980 for the exchange of data between networks and machines. It’s a high-speed solution, and this feature boosted its popularity. It became ideal for DNS lookups, real-time systems, or video transmissions. This David P. Reed’s contribution really improved networking, and its utility keeps being important nowadays. 

Detailed information about UDP

How does it work?

Like other communication protocols, UDP divides a message (its data) into different packets or datagrams, transported all across the network and the machines that integrated it until it arrives at its destination. What makes a big difference is, user datagram protocol is connection-less. This means it doesn’t rely on having a formal and active connection to start the data transmission. This totally accelerates the process. 

After chopping messages, UDP doesn’t number the datagrams for reassembling them. When you use it, what happens is each datagram has a header that contains port numbers (from the source and the destination) useful for recognizing the different users’ requests. The user datagram protocol includes a checksum function to verify that the data got fully transferred, and it doesn’t confirm if the messages sent are properly received.

UDP’s simplicity means high speed, but working that fast opens the chance for datagrams to get lost during its transference, and there’s a risk for criminals to use this advantage as a vulnerability to enable a DDoS attack. Basically, the risk is that there’s no handshake to secure the transmission of data that exists in other protocols. The lack of such or another security mechanism makes UDP fast because it includes fewer steps, but it becomes less safe.

UDP pros – Why should you use UDP?

  • Its speed and simplicity make it an ideal solution for the following scenarios.
  • UDP is totally a choice for communication applications, like voice-over IP or real-time, and online gaming. Actually, all applications and processes that can afford datagram loss could use UDP. The decision depends on what exactly is your priority, fast speed over the accuracy of the opposite. For some, it’s easier to afford that loss than waiting for delayed datagrams.
  • It’s ideal for the streaming of audio and/or video. Remember that UDP doesn’t need an active connection between sender and receiver for the data transmission.
  • It suits the domain name system (DNS) very well because DNS requests and answers can travel on one IP datagram, and the second because DNS really needs to make the response of requests an agile process.
  • If your need is to broadcast information, UDP supports multicast. 
  • If you look for self-starting processes, popularly known as bootstrapping, you can definitely use it.

UDP cons – Why shouldn’t you use UDP?

  • If your application or processes can’t afford datagram loss, if accurate delivery is vital for you, instead of fast transmission, UDP is not your choice.
  • UDP skips the handshake as a security mechanism. It’s a reliable alternative in terms of speed, but not in security ones. 
  • Its functionality doesn’t include checking or correcting errors that can occur during the data transmission.
  • It doesn’t supply acknowledgment of the correct delivery.

Conclusion

Now you know, if it’s about high-speed data transmission, UDP is the right solution to be in charge. When it’s more or less suitable will be defined by your priorities and network’s needs.

DNS zone transfer – an overview

The DNS is a complicated system that serves as a global database of domain names and IP addresses. The Internet strongly relies on DNS for its existence so much that it could be impossible to imagine its functionality without it. All the DNS data is written on DNS records, but how to copy them from server to server? With DNS zone tranfer. 

​DNS zones.

DNS is divided into small administrative parts called DNS zones. The DNS zones contain all the DNS records for the particular zone. They exist, so the whole system can get decentralized and be managed more practically. Each of the DNS zones is managed by a different DNS administrator. For example, when you get a domain name, you can get the right to manage its zones. You need to get delegated this right, and then you can delegate yourself for all the subzones.

​DNS zone transfer.

DNS zone transfer is when you copy the data from one zone (the DNS records) and duplicate the data into another name server. Why would you like to do that? Having several copies of your DNS records on multiple name servers will guarantee better availability in case of a name server failure and faster DNS resolution in case of a global domain with visitors from all around the globe and multiple points of presence.

​Types of DNS zone transfer.

There are two types of DNS zone transfer that you can perform between name servers:

  • Full zone transfer (AXFR zone transfer). This one is used to copy all the DNS records from the Primary name server to another name server (Secondary). You can use it if you haven’t updated the Secondary for a while and you want to make sure it is up to date. Another reason to use the full zone transfer is to copy the data to a newly deployed name server that has no previous information.
  • Incremental zone transfer (IXFR zone transfer). This one is used to update only the newly modified DNS records (deleted, modified, or created) from the Primary name server to the Secondary name servers. You can use it to use less bandwidth and update only the changes. Not the full zone file. It is more practical to use once you already have set up all the Secondary name servers.

​How does the DNS zone transfer happen?

You can perform DNS zone transfer in two ways:

  • Propagate the changes. You can edit the Primary zone file inside the authoritative name server for the zone and propagate the change to the Secondary name server that you have. That way, you know exactly when the Secondary name servers were last updated and what information they have.
  • Set the Secondary name server to auto-update. You can use the SOA records to set up a refresh interval that indicates when Secondary should check for changes with the Primary name server. They can use the IXFR DNS zone transfer and get the update when the time indicates it. For that purpose, you will need to use a security method like Whitelisting that allows only particular IP addresses (those of the Secondary name server) to be able to get DNS updates from the Primary name server. If you don’t do it, anybody could perform a DNS zone transfer and get your DNS records. That could be a bit security risk for your company.

​Conclusion.

DNS zone transfer is the process that DNS uses to copy zone files or particular DNS records from a Primary name server to a Secondary name server or Secondary name servers.

History of the Domain Name System.

It’s impressive how the Internet managed to be ingrained in humans’ lives in a very short time. The 1980s look far away from here, but honestly, considering all the previous development needed for the network of networks to exist, it’s not that much. Many people can still remember their life before and after the Internet.

To understand how the Internet works, there’s no way to skip one of the most important chapters in its history: the creation of the Domain Name System (DNS).

How was networking born?

Officially, the Internet started working on January 1, 1983. But as a concept, it appeared in the late 1950s. 

On the one hand, government researchers faced a strong need for a solution for sharing their information easily. Computers were really big and heavy. Every time researchers needed the specific data, they had to travel to the computer’s location or to use magnetic tapes for saving the data and sending them via postal service.

On the other hand, the Cold War was on. When the Soviet Union launched the Sputnik satellite (1957), the USA felt pushed to respond to the achievement. The American Defense Department looked for alternatives to keep information safe and easily share it in the case of a nuclear attack. 

Therefore, the Advanced Research Projects Agency Network (ARPA, 1958) was founded, and the ARPANET (1969) was created. This is the predecessor of the modern Internet. After years of collaboration with different organizations, the network concept got successfully proved, but it was limited for researchers and organizations linked to the Defense Department. 

During the 1970s, more enthusiasts got attracted, and networks started popping up here and there, bringing on a new challenge. All the existing networks operated independently, but there was no way to communicate between them. 

TCP/IP solved this and became the standard “language” for networks to communicate (1983). This totally expanded the possibilities for the exchange of information! 

History of the Domain Name System.

To connect with other computers and services, people had to type their IP addresses. These long sequences of numbers were perfect for machines to communicate between them. But with every day more available websites, it got hard for humans to memorize several IP addresses like 234.167.1.15 (IPv4).

With networks already interconnected, complexity became another challenge. For instance, mapping of websites was made through a centralized HOSTS.TXT text. With the increase of sites, the file got big too, and the need for a decentralized model emerged.

In 1983, Paul Mockapetris and his team simplified this and created an easier way to use the network – the DNS. Thanks to it, humans could use easy and memorable names for reaching websites (sitexample.com) instead of numbers (234.167.1.15).  

It became an Internet standard in 1986. Numbers were kept used by machines, and humans could use domain names. This shaped a sort of directory (database), through which domain names could be associated with its IP address and vice-versa.

The DNS evolved through the years. Some of its key improvements were:

  • The NOTIFY. First, secondary servers needed to check frequently for updates. With the NOTIFY mechanism, the master server could save them all these checks and directly inform them when it has a new update to share. 
  • The incremental zone transfer. Thanks to this, secondary servers could update only the changes instead of updating the complete zone file.
  • DNSSEC security extension for protecting users against DNS poison attacks.

Conclusion.

The DNS gave structure to the Internet. Almost four decades of existence, and it’s still responsible for the cool experience users have while surfing online.

Recursive DNS server – definition

The DNS infrastructure is really helping the experience of Internet surfing pleasant and easy. One of the main responsible participants is the recursive DNS server. So let’s explain a little more about it and its role in the complex DNS process.

DNS – What is it for?

The Domain Name System, or DNS for short, is a well-established method of translating domain names into IP addresses. When a user wants to visit a website, it will usually search in its browser for it. To accomplish this task, the user is going to write the domain name of the website. Unfortunately, the machines don’t understand words and names, and they work only with numbers to communicate. So in the middle is the Domain Name System, and it is solving this issue by pointing the particular domain name to its corresponding IP address.

Recursive DNS server explained.

Recursion in computing is often associated with a method of solving a particular issue. Thus, it involves a program or solution that will keep repeating itself till it reaches its goal. 

Recursive DNS servers operate between the user and the authoritative DNS servers. They perform the required searches for specific information to find an answer to the queries of the users. 

As we mentioned, the users make a request for a particular domain through a browser. Yet, the process of searching for the correct IP address is performed by a recursive DNS server. Therefore, it is important to note that they are not the holders of the database with information. They are the searchers. After the recursive DNS server finds the required IP address, it gets back to the device and provides it to the browser that requested it. Finally, the device is able to connect to the IP address, and the user reaches the website.

Globally the number of recursive DNS is significant. The most popular of them are the ones of your Internet service provider (ISP).  

The two types of lookup

The recursive DNS server performs its lookup in one of two ways. They are the following:

The first type one is considered a lot easier and quicker. This is because it contains the IP address from its cache memory. For a particular time, these servers can store the information in their cache. For what amount of time they should hold it is a decision made by the administrators. They can determine more or less time by the time-to-live (TTL) value. It is all based on the strategy of the administrators actually.

Receiving the query, the recursive DNS server is going to first search for the IP address in its cache memory. If that information is still available there and the TTL has not expired yet, the assignment is completed. It is very beneficial because the response is fast, and the recursive DNS server doesn’t need to search further in other servers.

The second type of search requires a little bit more time to be completed. It occurs in the cases when the TTL in the cache is expired. For that reason, the IP address is no longer available there. However, the recursive DNS server goes a long way to obtain the desired information. It passes through the root server, TLD (Top-Level-Domain) server, and finally to the authoritative server, which is the one able to provide the answer to the query. 

Therefore, the original goal of the recursive DNS server is only to search for information.

5 most commonly used DNS records

DNS records are an essential part of managing a DNS. Every one of them has a specific and very important functionality. To achieve a perfectly working DNS, it is crucial to know what is their main purpose. Here we have 5 most commonly used DNS records that are good to know for a start. Let’s see which are they and what they do! 

SOA record

SOA for short means Start Of Authority, and it is important to know this record first. It indicates the beginning of the authority DNS zone. Inside it, you can discover information, which is crucial for the DNS zone. For the normal functionality of your DNS network, this record is a must-have. The SOA record indicates the primary DNS server. It includes data about the domain administrator and their email for contact. Also, parameters including the domain serial number and how often it should refresh. There should be only one SOA record for one DNS zone.

A record

The A record is probably the first one that comes to your mind when we are talking about DNS. Its purpose is very simple but yet essential. The A record connects the domain name (hostname) to its corresponding IP address. Every time a user wants to visit your website, will write the domain name, but what it actually needs to find is its IP address. The user’s browser will perform a search for the A record to resolve the query. Once it finds it, the browser will know exactly where the site is, and it will be able to load it to the user.

NS record

The NS (Name server) record is indicating precisely which are the authoritative name servers for a specific DNS zone. The NS record links your domain name to the hostname of the name servers. 

For example, yourdomain.net to ns1.yourdomain.net.

You need to specify which are the authoritative name servers and use the NS record. If you don’t do that, simply your DNS zone won’t work. That is the reason why we couldn’t skip this record in our list. It is crucial!

PTR record

This DNS record is also one of the must-haves in case you want to be able to send emails without problems. The PTR record has the exact opposite functionality of the A record. Also, this record is at the foundation of Reverse DNS. The PTR record points an IP address (IPv4 or IPv6) to a domain name. The need for this record appears when you send an email. The recipient requires to verify if this email was sent on behalf of the actual domain. You have to be careful when you configure your A record and PTR record because otherwise, your emails will end in the spam folder of your recipients. Nobody wants this to happen, right?

MX record

The MX record or Mail Exchanger record indicates the email server responsible for receiving emails for the exact domain. In addition, it points the domain name to the hostname of the incoming mail server. It is important to note that it is a hostname and not an IP address. You can add several MX records to create a backup if there is any difficulty. 

The reason to consider MX records is simple. Without it, you will not receive emails. For businesses, that is a pretty solid reason to care.