Saturday, April 3, 2021

DNS , Domain Name System - How Domain Name System Works

 



Domain Registrar knows which same Set of "Name Servers" your domain points to
Remove current NS and Update NS. It takes max 24 hours before these changes are effective

Recursive Resolver is Provided by ISP - Internet Service Provider (Tata Sky Broadband, Airtel, Jio)







How does TLD Name Server Knows - Which Authoritative Name Server has actual - Ip Adress Mapping 
Because Website Owner(Hosting Provider) configures list of "Authoritative Name Servers" with Domain Registrar
Domain Registrar updates this info with TLD Server- Top Level Domain Name Server
This process usually takes 24 Hours



Who operates them? ROOT NAME Servers

The root servers are operated by 12 different organizations:

  • A VeriSign Global Registry Services
  • B University of Southern California, Information Sciences Institute
  • C Cogent Communications
  • D University of Maryland
  • E NASA Ames Research Center
  • F Internet Systems Consortium, Inc.
  • G US DoD Network Information Center
  • H US Army Research Lab
  • I Netnod
  • J VeriSign Global Registry Services
  • K RIPE NCC
  • L ICANN
  • M WIDE Project

Many of these organizations have been operating root servers since the creation of the DNS. The list shows the Internet’s early roots as a US-based research and military network.


Security Group, AWS

Security Group - is attached to EC2 instances /VPC

It Defines :-    Protocol, Rule, Incoming DataFlow Direction, Source CIDR,

Windows EC2 Instances ,Microsoft , Remote Desktop Connection to Microsoft Instances

 PEM = Private Key

Generate password from "Connect to EC2" Dashboard - By Uploading PEM File (Private Key)

Username is "Administrator"

Connect using MSTSC command from any Windows PC

Friday, April 2, 2021

HOW SSD Solid State Drive

https://www.youtube.com/watch?v=5Mh3o886qpg


"Charge Trap Flash Memory Cell"

They trap electrons level within them

IP Address vs Physical Address IPv6 IPV4 Router Classes of IP Address, Subnetting, NAT, Router, Switch, DHCP, CIDR

 




Physical Address (MAC Address) - Local Scope - 
Its like saying I live at home

Logical Address (IP Address) - IPv4   and IPv6
Its like saying I live at 155, Colonel Colony

IPv4 is 32 bit (4 Octet) Logical Address
0 to 255 , 4 Octets

IPv4 has 5 Classes Adresses

Class A - N H H H (1st Octet - reserved for Network ID)
Class B - N N H H (First Two Octets - reserved for Network ID)
Class C - N N N H (First Three Octets - reserved for Network ID)
Class D - Networking
Class E - Research


Network ID  

Loopback Address

Network Id - 
Multicast Address

ClassAddress range
Class A1.0.0.1 to 126.255.255.254
Class B128.1.0.1 to 191.255.255.254
Class C192.0.1.1 to 223.255.254.254
Class D224.0.0.0 to 239.255.255.255

176.10.0.0 - Purchased This Network ID 
This is class B
Network ID    - 176.10.0.0
Host Part - Give it 255 - It becomes Broadcast ID
Broadcast ID  - 176.10.255.255

No.of Usable IP Addresses
256*256 = 65536 - 2 = Usable ID  65534
2 IP Address deducted for - Network Id and Broadcast ID



Efficiently using IP Address - Use Subnetting
or Use IPv6

Subnetting - Logical Division of Network

Router Has Multiple Interfaces
Router is not a "Networking device" - its a "Inter-Networking" Device
Class A - Wastes Host Part  256*256*256 =  16777216 -2 = 16777214 
How do we solve it  ?
Use Subnets ?


https://www.youtube.com/watch?v=_ISu9f8ofZk


CIDR Notation means Network Ratio











Class A   1 to 126  - N H H H
Class B   128 to 191 - N N H H
Class C    192 to 223 - N N N H

Class A /8
Class B/16
Class C/24

Private Addresses

A - 10.0.0.0        -  10.255.255.255   - 10.x.x.x  - 1 Network 
B - 172.16.0.0       -  172.31. 255.255   - 172.16.x.x -> 172.31.x.x -16 Networks
C - 192.168.0.0     - 192.168.255.255  - 192.168.x.x 255 Networks

2 Different IP Addresses : Public and Private
~4 Billion Public IP Addresses 

Router can act as switch - No Internet Connection necessary

IANA  -  Private IP Address 
Not Routable
Not Connected to Internet



NAT  - Network Address Translation

IPv4 + NAT 
NAT Converts Private to Public & Public to Private

Ipv6 does not need Private Address and NAT
IPv6 - Every Single Device will have its own 
340  Undecillion  Ip Address
340 -- 36 Digits after it


CIDR - Classless Inter-Domain Routing - Number of Network Bits






























192.168.10.0/28 =  16 Subnets having 14 Host each

Subnet Mask  = 255.255.255.240
Default Subnet Mask = 255.255.255.0
255.255.255.   128 64 32 16 8 4 2 1
128+64+32+16 = 240

No Of N/w = 2 ^ Bits borrowed from host (28-24 =4)
2^4 = 16 networks

No of Hosts = 2^4 = 16 -2 = 14 ( 2 Reserved for Network Address/Broadcast Address)

16 * 16 = 16 different Subnets(Networks) of 14 Host each




Thursday, April 1, 2021

AWS Route 53 - DNS, Elastic Load Balancer, Name Server, Domain Registrar, Hosted Zone, A Record, C Record

Why is Route 53 So called ?
TCP/UDP protocol have a default port 53 for DNS Queries
-------------------------------------------------------
Domain Registrar
DNS 
Health Monitoring
-------------------------------------------------------
 Networking & Content Delivery -> Route 53
-------------------------------------------------------
Register a Domain Name ?

Root Level Domain -> .com, .org, .edu. .net
Geographic Level Domain -> .co.in, .co.in

Domain Registrar -> Domain Name Purchased from 
GoDaddy is an example.

"Route 53" is also a Domain Registrar

https://www.iana.org/ - For IP Addresses

Top Level Domain - Root Name Server

"Route 53" is Name Server

Domain Registrar knows which same Set of "Name Servers" your domain points to
Remove current NS and Update NS. It takes max 24 hours before these changes are effective











Who operates them? ROOT NAME Servers

The root servers are operated by 12 different organizations:

  • A VeriSign Global Registry Services
  • B University of Southern California, Information Sciences Institute
  • C Cogent Communications
  • D University of Maryland
  • E NASA Ames Research Center
  • F Internet Systems Consortium, Inc.
  • G US DoD Network Information Center
  • H US Army Research Lab
  • I Netnod
  • J VeriSign Global Registry Services
  • K RIPE NCC
  • L ICANN
  • M WIDE Project

Many of these organizations have been operating root servers since the creation of the DNS. The list shows the Internet’s early roots as a US-based research and military network.



----------------------------------------------------------------------------------------------

Route 53 Has Hosted Zone
If You have external Domain Registrar(Go Daddy) - You need a create a Hosted Zone 
You need to configure - AWS Provided Name Server in External Registrar Website.

If you have Route 53 as Domain Registrar, Hosted Zone is created by default

AWS Route 53 can have  500 Hosted Zones by default and 10,000 Record Resource Sets 

Connect Domain Name with Route 53 Hosted Zone - This is called Delegation


If You migrate Domain across Registrar, it usually takes around 48 Hours because DNS Systems cache it for 48 Hours

AWS Supports 2 Types of Domains - Generic TLD(.com, .net/Geographic TLD
If AWS does not contains that domain, You cannot transfer then it to AWS

You need Authorization Code from Existing Domain Registrar


Start of Authority, Hosted Zone

Route 53 - "Hosted Zone" - is a collection of records for Specific domain

Hosted Zone is a container which holds information about how you want to route traffic for domain and its sub domains.

www.techguftgu.com - Subdomains of techguftgu.com
info.techguftgu.com - techguftgu.com
support.techguftgu.com - techguftgu.com

Public Hosted Zone
Private Hosted Zone - Only works within VPC

When You create new Hosted Zone, It creates "Name Server" Record
and "Start of Authority" Record
SOA - Start of Authority
4 NameServers - Unique in 1 Hosted Zone

Do Not Change Name Servers Record

.com - Generic TLD
.net -  Generic TLD
.org -  Generic TLD
.in/.uk - Geographical

Unique Set of  4 TLD Name servers collectively known as - "Delegation Set"

"Route 53" - Acts as "Authoritative Servers"

ns-1234.awsdns-39.com - Example of 
ns-3678.awsdns-12.org
ns-2947.awsdns-39.net

Its possible to have Hosted Zone having same Names
But they will have different Records/Different Name Servers
When You register, name Servers will be updated with "External Domain Registrar"

-------------------------------------------------------------------------------------------------
nslookup 

Put above command name in cmd prompt

Enter IP , Get FQDN
Enter FQDN, Get IP address

mail.google.com
docs.aws.amazon.com
-------------------------------------------------------------------------------------------------
Some Registrar allow you to specify IP Adress
Some Registrar allow you to specify FQDN - Fully Qualified Domain Name

-------------------------------------------------------------------------------------------------
You can Transfer Domain from 1 AWS Account to Another 
For this drop a  mail to Support Team @ AWS

You cannot Transfer "Hosted Zone" from 1 AWS Account to another

You can have Domain in 1 AWS Account and Hosted Zone in another Aws Account

--------------------------------------------------------------------------------------------------

Types of Records in "Hosted Zone"

  • A Record -> Domain Name to IPv4 Address -> 32 Bits
  • AAAA Record -> DNS Name to IPv6 Address -> 128 Bits -> Quad Ipv4
  • C Record -> Canonical Name - Alias of Domain
  • NS Record ->  NameServer Record -> 4 Nameserver for 4 TLD Domains - ORG, NET, COM, Geographical (.in, .uk) (Authoritative Name Server)
  • SOA Record -> Start of Authority - Meta Info about DNS Hosted Zone 
  • MX Record -> Mail Server Record

NS Record - > 4 Nameservers which we need to update in - Domain Registrar
4 Name Server for each of Top level domains 

CName - Cannot be made for "Root Domain" - Zone Apex
techguftgu.com ---- CNAME X
techguftgu.com ---- subdomain.techguftgu.com ---> CNAME - Yes


SOA Record -> "Hosted Zone" can have only 1 SOA Record
Email from domain of Owner 
Authoritative Server 
Name of Owner
Serial Number  - No of Times You have incremented 





















Create EC2 Instance Steps - High Level Overview

 1. Choose AMI
2. Choose Instance Type
3. Configure Instance
4. Add Storage
5. Add Tags
6. Configure Security Group
7. Review
PEM = Private Key
Generate Password and Administrator - RDP Protocol (mstsc)

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass