Intro To Networking
Intro To Networking
1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
Mnemonics:
i. Anxious Pale Shakespeare Treated Nervous Drinks Patiently
ii. Please Do Not Tell(the) Secret(to) Anyone
Let us take a brief tour to understand what happens in each of these layers:
1. Physical Layer:
a. Cabling = How to cable wires, etc.
b. Signal Type, Transmission methods, etc.
c. Conversion of binary data to signals.
d. Transmission of data across network.
3. Network Layer:
a. Transmission of info using routers.
b. Data referred to as packets.
c. Each data packet includes a data frame and IP
address. [IPsec]
d. Responsible for locating the destination of your
request.
e. Data being transmitted in a packet is often called
payload.
f. IP addresses are attached with MAC address via
Address Resolution Protocol, which resolves MAC
address to the IP.
6. Presentation Layer:
a. Involves data formatting, character encoding, data encryption
b. Three data formatting methods:
i. ASCII = American Standard Code for Information Interchange, 7-bit encoding technique.
ii. EBCDIC = Extended Binary-Coded Decimal Interchange Code
iii. Unicode = Provided unique code for every character.
c. Data Encryption SSL/TLS
7. Application Layer:
a. Responsible for providing support to end-to-end applications. Applications Installed on OS i.e. Internet
browsers(Edge) or Software (Microsoft Word).
b. Controls end users interaction, example: Security Checks MFA.
c. Protocols that operate on this level are:
i. File Transfer Protocol (FTP)
ii. Simple Mail Transfer Protocol (SMTP)
iii. Secure Shell (SSH)
iv. Internet Message Access Protocol (IMAP)
v. Domain Name System (DNS)
vi. Hyper Text Transfer Protocol (HTTP)
How does URL get converted into an IP address?
To convert URL to an IP address for the computer to understand, a series of processes are performed wherein,
TCP/IP protocol called DNS plays a major role. Let us view a step-by-step as to how things work:
1. User Request:
When you enter a URL (e.g., www.example.com) into your browser and press enter, your computer starts the
process to resolve this URL into an IP address.
2. Browser Cache:
The browser first checks its own cache to see if it has recently resolved this URL. If it finds the IP address in the
cache, it uses it immediately.
4. Hosts File:
Before querying DNS servers, the operating system checks the hosts file, a simple text file that maps hostnames
to IP addresses.
The recursive resolver queries one of the root DNS servers. The root server responds with the address
of a Top-Level Domain (TLD) DNS server, such as one responsible for .com domains.
7. Response to Computer:
The recursive resolver sends the IP address back to the operating system of your computer.
8. Response to Browser:
The operating system sends the IP address to the browser.
9. Connection Establishment:
The browser uses the IP address to establish a connection to the web server using the HTTP or HTTPS protocol.
This hierarchical and distributed system allows efficient and scalable resolution of URLs to IP addresses, ensuring
that your request to access a website is quickly routed to the correct server.
Terminologies:
a. TCP: Connection-oriented No data loss, Slow in speed. Eg: Email, Skype.
b. UPD: Connectionless data loss, Very fast in comparison. Eg: Game.
c. SSL/TLS:
i. Secure Socket Layer or SSL is the predecessor of TLS or Transport Layer Security.
ii. Initiates handshake with the devices to authenticate their identity.
iii. Digitally signs data in order to ensure data integrity when transferring data.
iv. It is done so as to avoid data tamper.
d. Ping: Allows you to check whether the destination IP exists or not. Ping <gateway>
e. Traceroute: Traces the route when called upon the said ‘gateway’, maps the route it takes.
For Example: Traceroute google.com
f. Dig: Sends a query to the DNS server – which further performs recursion to send back
information. Useful tool for network troubleshooting. Dig also provides us – TTL.
dig <domain> @<dns-server-ip>
g. TTL: ‘Time To Live’ Tells the computer when to stop considering a record as valid i.e. When to
request the data again and stop the search in its cache.
h. Recursive DNS Server: One DNS server communicates with several other DNS servers to hunt
down an IP address and return it to the client.