Category Archives: Uncategorized

Authoritative vs Non-authoritative domains / DNS servers

An authoritative answer comes from a name server that is considered authoritative for the domain which it’s returning a record for (one of the name servers in the list for the domain you did a lookup on).

An authoritative name server is a name server that has the original source files of a domain zone files. The is where the domain administrator has configured the DNS records for a domain. Authoritative DNS server can be master DNS server or its slaves.

Example, Authoritative DNS server,

domain tecadmin.net’s authoritative are alec.ns.cloudflare.com and athena.ns.cloudflare.com. If you directly query to these DNS servers, they will return authoritative answer because they have the original files of domain zone.

$ nslookup tecadmin.net alec.ns.cloudflare.com

Server:         alec.ns.cloudflare.com
Address:        173.245.59.59#53

Name:   tecadmin.net
Address: 104.27.188.217
Name:   tecadmin.net
Address: 104.27.189.217

A non-authoritative answer comes from anywhere else (a name server not in the list for the domain you did a lookup on).

Example, Non-authoritative DNS server, 8.8.8.8 of Google DNS

Non-authoritative name servers do not contain original source files of domain’s zone. They have a cache file for the domains that is constructed from all the DNS lookups done previously. If a DNS server responded for a DNS query which doesn’t have original file is known as a Non-authoritative answer.

$ nslookup tecadmin.net

Server:         8.8.8.8
Address:        8.8.8.8#53

Non-authoritative answer:
Name:   tecadmin.net
Address: 104.27.189.217
Name:   tecadmin.net
Address: 104.27.188.217

What is recursive DNS?

A recursive DNS lookup is where one DNS server communicates with several other DNS servers to hunt down an IP address and return it to the client. This is in contrast to an iterative DNS query, where the client communicates directly with each DNS server involved in the lookup. While this is a very technical definition, a closer look at the DNS system and the difference between recursion and iteration should help clear things up.

The OSI Model & How Information Travels Through The Internet

A user tells their browser to fetch a page from techiess.com The browser makes an HTTPS request to techiess.com. To fetch the required web page it passes the request to its HTTP protocol handler, that is Layer 7 of the OSI model, the Application layer.

When the HTTP protocol handler at Layer 7 recognizes that the request is for a secure document, it passes the request to the TLS library at Layer 5 and 6 of the OSI model. These layers are called the Session and Presentation layers.

In order to open a secure channel, the TLS library needs to establish a connection to the destination. It passes a connection request to TCP which lives at Layer 4 of the OSI model, the Transport layer. The TCP handler receives the connection request. Then, it creates a packet with the “SYN” flag set — the first part of the three-way handshake with the remote server to establish a connection.

After the TCP handler has created a packet to initiate a connection, it passes the packet down to IP which lives at OSI Layer 3, also called the Network Layer. The network layer receives the packet and adds the correct IP information to its header. That informs the internet routers how to route the packet to its destination IP address.

Now that the network layer has a routable packet, it passes it down to Layer 2, the Data-Link layer. The data-link layer adds the router’s MAC address as the local destination address, allowing the router to send the packet out to the Internet.

In order for the packet to get onto the basic networking transmission technologies of the network, it is then passed to OSI Layer 1 or the Physical Layer to complete the task. The physical layer takes the binary packet and physically encodes it onto network cabling — or places it onto the airwaves in the case of a WiFi network — and the packet begins its journey across the local network and out to the wider Internet.

Once the packet reaches the destination server, the whole process reverses and the packet travels back up the layers of the OSI model.

This process happens constantly as your computer communicates with other remote servers on the Internet.

This article is from https://www.wordfence.com/learn/understanding-the-osi-model-video/

==========

OSI Model is 7 layers, Application, Presentation, Session, Transport, Network, Data-Link, Physical. Application layer is for application such as DNS, SMTP, FTP, Telnet, … Presentation layer is for format data, encryption/decryption, Session layer is start/stop session, Transport layer is TCP/UDP, Port Number, Network layer is IP address, Routers, Data-Link layer is MAC Address, switches, Physical layer is cable, Network Interface Cards(NIC), hub.

# How to internet works

For example via HTTPS, we open a page from browser and then browser makes an HTTPS request via HTTP protocol handler. This is application layer, layer 7 of OSI model.

HTTP protocol handler recognizes this request is a secure document. It passes to TLS library at Presentation layer, layer 6 of OSI model and start session at Session layer, layer 5 of OSI model.

TLS libray needs to establish a connection to the destination and it passes a connection request to TCP, Transport layer, layer 4 of OSI model. TCP handler receives and creates packet with “SYN” flag set – it is first part of three-way handshaking.

TCP handler created a packet to initiate a connection, it passes the packet down to IP address, Network Layer. This Network layer routes the packet to destination IP address.

Data-Link Layer, 2nd layer of OSI model, add router’s MAC address as local address, allowing the router to send the packet out to the internet.

And then Physical Layer to complete the task. It takes binary packet and physically encodes it onto network cable or wifi network.

Once the packet reaches the destination server, the whole process reverses and the packet travels back up the layers of the OSI Model.