Introduction To Network 🌐
# Table of content
ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
What is Network?
A network consists of two or more computers that are linked in order to share resources (such as printers and CDs), exchange files, or allow electronic communications. The computers on a network may be linked through cables, telephone lines, radio waves, satellites, or infrared light beams.
What is Packet switching Network(PSN)
It is a method of grouping data into short messages or small segments in fixed format (packets) , that are transmitted over a digital network.
This is the first method that used to transmit data over network and they want a unified way to transfer data so they invented the TCP/IP Protocol.
Transmission Control Protocol (TCP)
Is a communications standard that enables application programs and computing devices to exchange messages over a network. It is designed to send packets across the internet and ensure the successful delivery of data and messages over networks.
The Internet Protocol (IP)
Is the method for sending data from one device to another across the internet. Every device has an IP address that uniquely identifies it and enables it to communicate with and exchange data with other devices connected to the internet.
Then another problem occurred, which was remembering the IPs of the sites, so DNS was created.
ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
What is Domain Name System (DNS)
Web browsers interact through Internet Protocol (IP) addresses. DNS translates domain names to IP addresses so browsers can load Internet resources.
So DNS lets users connect to websites using domain names instead of IP addresses for ease of remembering..
Ex: IP Address Domain Name
172.217.23.206
-> https://www.google.com/
DNS Servers Types:
Recursive resolver: is the first stop in a DNS query and it responsible for finding domain's IP Address for users. Most Internet users use a recursive resolver provided by their ISP.
Root nameserver: The 13 DNS root nameservers are known to every recursive resolver, and they are the first stop in a recursive resolver’s quest for DNS records. A root nameserver is the most important server in DNS services cause it has all the IPs of the TLDs (.com, .net, .org, etc.).
Top-Level Domain DNS (TLD) nameserver: A TLD nameserver maintains information for all the domain names that share a common domain extension, such as .com, .net
Authoritative nameserver: usually the resolver’s last step in the journey for an IP address.
What is DNS Records?
DNS records (aka zone files) are instructions that live in authoritative DNS servers and provide information about a domain including what IP address is associated with that domain and how to handle requests for that domain. These records consist of a series of text files written in what is known as DNS syntax.
And this is the most common types of DNS record:
A record - The record that holds the IPV4 address of a domain.
AAAA record - The record that contains the IPv6 address for a domain.
CNAME record - Forwards one domain or subdomain to another domain, does NOT provide an IP address.
MX record - Directs mail to an email server.
TXT record - Lets an admin store text notes in the record. These records are often used for email security.
SOA record - Stores admin information about a domain.
NS record - Stores the name server for a DNS entry.
We have some ways to get info about domain that we have:
nslookup
: Tool used to get info about domain like that└─$
nslookup
<domain_name>
, and we can specify the record type to get the domain info for this type like that└─$
nslookup
-type=<Record_type>
<domain_name>
Dig-Web-Interface
: Site can give us the same information that we can get fromnslookup
for the domain name.who.is:
Website used to get the more info like Register info, Important Dates, and Name Servers info for a domain.
ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
What is Static & Dynamic Websites ?
Static Website : is made up of web pages created using HTML, CSS and Javascript and dose not interacted with the user for searching, Logging, etc. It just show information and data for users.
Dynamic Website: Built using server-side language and technology, dynamic websites allow for the content of each page to be delivered and displayed dynamically, according to user behavior or from user-generated content.
What are HTTP and HTTPS protocols?أ
HTTP (Hyper Text Transfer Protocol)
It used for transferring data over a network. Most information that is sent over the Internet, including website content and API calls, uses the HTTP protocol.
There are two main kinds of HTTP messages: requests and responses.
HTTP protocol use Port 80 by default for connection.
HTTP protocol use plain text in requests and responses and this make it not secure enough for attacks like: Man-In-The-Middle(MITM) Attacks.
We usually use HTTP Protocol in browsers when we try to open the URL of a specific website
This is how user can get the response from specific web server using HTTP Protocol.
URL (Uniform Resource Locator)
The address of a unique resource on the internet
One of the key mechanisms used by browsers to retrieve published resources, such as HTML pages, CSS documents, images, and so on.
The URL consists of:
Scheme: The first part of the URL, which indicates the protocol that the browser must use to request the resource.
Authority: The next one after Scheme which is separated from the scheme by the character pattern
://
. If present the authority includes both the domain (e.g.www.example.com
) and the port (80
), separated by a colon:
Domain Name: Indicates which Web server is being requested
Port: Indicates the technical "gate" used to access the resources on the web server.
Path to Resource: is the path to the resource on the Web server.
Parameters: are extra parameters provided to the Web server. The Web server can use those parameters to do extra stuff before returning the resource.
Anchor: is an anchor to another part of the resource itself. An anchor represents a sort of "bookmark" inside the resource, giving the browser the directions to show the content located at that "bookmarked" spot.
HTTPS (Hyper Text Transfer Protocol Secure)
It's the same usage of HTTP protocol but with security connection
The S in HTTPS stands for "secure."
HTTPS uses TLS (or SSL) to encrypt HTTP requests and responses, instead of the plain text, an attacker would see a bunch of seemingly random characters.
What does a typical HTTP request look like?
An HTTP request is just a series of lines of text that follow the HTTP protocol, and it contain:
Start Line: The first line in the request that will be like this
GET / HTTP/1.1
and contains:The Request method (GET, POST, PUT, ..., etc).
The Request target, usually a URL, or the absolute path of the protocol, and port.
The HTTP version.
HTTP Headers: A case-insensitive string followed by a colon (
':'
) and a value whose structure depends upon the header. The whole header, including the value, consists of one single line, which can be quite long.
Empty Line: An empty line to separate between the HTTP Headers and the Body Parts.
Body: The last part of a request and contain data that site use it for more actions. Not all requests have one: requests with a
GET
HTTP method should only be used to request data and shouldn't contain a body.
A GET request using curl command might look like this:
When an origin server receives an HTTP request, it sends an HTTP response, which is similar:
TCP & UDP
OSI Model
Last updated
Was this helpful?