DNS: Domain Name System

unordered_map<string,string>mp;
mp["www.shubhamiitbhu.in"]="76.76.21.22"
unordered_map<string,string>mp;
mp["76.76.21.22"]="www.shubhamiitbhu.in"
graph LR;
A[Local Machine<br>IP: 12.123.43.255]-->B((ISP))--IPv4<br>internet-->D((ISP))--IPv4<br>internet-->C((ISP))-->E[Destination Machine<br>76.76.21.22:443]
graph TB;
A[HTML Payload:Get www.shubhamiitbhu.in/profile ]
subgraph IPs
B[Source Ip:12.123.43.255]
C[Destination Ip:76.76.21.22]
end
D[Data Link Layer Hdr]
A-->B
A-->C
B-->D
C-->D
graph LR;
A[Local Machine]
B[ISP]
C[Internet]
E[Google Server]
F[Facebook Server]
G[Amazon Server]
A-->B
B-->C
C-->E
C-->F
C-->G

DNS System Architecture & Geographical Distribution

DNS : A Hierarchical and Decentralised System

Alt text

Literals in C

int a=10;
int ->keyword
a ->identifier
10 ->literal
= ->punctuator
graph TD;
A[Literals]-->B[Number Constants]
A-->C[Character Constants]
B-->D[Integer]
B-->E[Floating Point]
D-->F[Decimal]
D-->G[Octal]
D-->H[Hexadecimal]
D-->I[Binary]
F-->J[Unsigned]
F-->K[Signed]
J-->L[Integer<br>4 Bytes<br>32 bits]
J-->M[Long Integer <br>8/4 Bytes]
J-->N[Long Long Integer<br> 8 Bytes]
K-->O[Integer]
K-->P[Long Integer]
K-->Q[Long Long Integer]
E-->R[Float<br> 4 Bytes]
E-->S[Double <br>8 Bytes]
E-->T[Long Double <br>16 Bytes]
C-->U[Single Character<br>1 Byte]
C-->V[Multiple Characters<br>String]

Website Domain Name

go.learn.shubhamiitbhu.in
consists of 4 literals
[go,learn,shubhamiitbhu,in]
this is opposite of DNS hierarchy
in->Top Level Domain TLDs
shubhamiitbhu->Shubham's DNS Server
learn->Shubham's sub DNS Server
go->Shubham's Server that is hosting the website(Not a DNS Server)
FQDN: Fully Qualified Domain Name

1704532894565 Alt text

First Hope DNS Server

DNS Resolver

DNS Query Types

graph TB;
A[Query Type]
B[Recursive Query]
C[Iterative Query]
D[Reverse Query]
A-->B
A-->C
A-->D

Recursive DNS Query

1704534231478

Iterative DNS Query

1704534375623

1704534404336

Reverse DNS Query

1704534498354

1704534550294

1704534619718