🙂
Basics
What is internet ?
The internet is a worldwide collection of interconnected networks (internetwork
or internet for short), cooperating with each other to exchange information
using common standards.
Through telephone wires, fiber-optic cables, wireless transmissions, and
satellite links
Everything that you access online is located somewhere on the global internet.
Social media sites, multiplayer games, messaging centers that provide email,
online courses — all of these internet destinations are connected to local
networks that send and receive information through the internet.
NAT
Network access translator is responsible for sending requested data to
designated device.
Modem / Router (global IP address)
→ Device 1 (local IP address 1)
→ Device 2 (local IP address 2)
→ Device 3 (local IP address 3)
Device 1’s (Local IP address 1) requested https://www.google.com → Modem /
Router ( global IP address) → ISP → Server(Google)
Server(Google) → ISP → Modem / Router( global IP address ) → Device 1’s
(local IP address 1)
Port Number (16 bit number - 2^16 possible numbers )
Basics 1
Port Number (PN) determines which application is requesting data from server.
Suppose you are requesting https://www.google.com from Edge browser then
you will receive https://www.google.com on Edge browser with the help of Port
Number.
Important port numbers
80 - http
0 to 1023 - reserved port
1024 to 49152 - for applications
Remaining we can use
Cables
Physical - Optical fibre cables , Coaxial cables , Twisted pair cables etc.
Wireless- Wi-Fi , Bluetooth , Satellites , 2G , 3G , 4G, 5G , Radio
Types of network
LAN - across a office or home(ethernet , WIFI )
MAN - across cities
WAN - Across countries (optical fibre cables)
Modem / Router
It is used to convert digital signals to analog signals and vice versa.
Network topologies
Network topology specifies the layout of a computer network. It shows how
devices and cables are connected to each other.
BUS
All the devices are connected to a single cable known as a central cable
or bus.
As if the bus is damaged then the whole network fails.
Only one person can send data at a particular time.
RING or CIRCULAR
Basics 2
All the devices are exactly connected to two or more devices and thus,
forming a single continuous path for the transmission.
If the single node is damaged, then the whole network fails.
STAR
All the devices are connected to a single device known as a central
device.
If the central device is damaged, then the whole network fails.
TREE or Extended STAR topology
It's the combination of linear bus and star topologies. Groups of star-
configured workstations connected to a linear bus backbone.
MESH
All the devices are individually connected to other devices.
It is robust as a failure in one cable will only disconnect the specified
computer
connected to this cable.
It is standard of communication used by system that is open for communication
with other systems.
OSI model (Open systems interconnection)
It has seven layers.
1. Application layer
It enables the user to access the network.
It is the topmost layer.
The most used application protocol is HTTP.
Application layer protocols are FTP , SMTP,DNS,HTTPS etc.
2. Presentation layer
At the sender side, this layer translates the data format used by the
application layer to the common format and at the receiver side, this
layer translates the common format into a format used by the application
layer.
Functions of this layer are data conversion , data compression , data
encryption etc.
Basics 3
3. Session layer
The main responsibility of the session layer is beginning, maintaining
and ending the communication between the devices.
Session layer also reports the error coming from the upper layers.
4. Transport layer
It delivers the data through the network and provides error checking.
Data received from session layer will be divided into small data units
called segments.
Every segments will contain source , destination’s Port Number ,
sequence number.
It uses TCP and UDP protocols.
5. Network layer (Router lives here)
It performs logical addressing . It assigns sender’s and receiver’s IP
address to every segments (received from session layer) so that it can
reach the correct destination.
It performs packetizing. It converts the data received from session layer
into packets.
It performs routing. Moving data packets from source to the destination
through best paths.
It performs Fragmentation. It is a process of dividing the packets into
fragments.
6. Data link layer
It performs physical addressing . MAC addresses of sender and receiver
are assigned to data packets and convert it into frames.
It performs frame synchronization. Converting data packets into frames.
7. Physical layer
Lowest layer of the OSI reference model.
It is mainly used for the physical connection between the devices by
using twisted-pair cable, fibre-optic or wireless transmission media.
It transports data in physical form such as electrical/optical signals or
mechanical form.
Basics 4
TCP/IP model(Transmission Control Protocol/Internet Protocol)
It is used for communication between two devices.
It has five layers.
1. Application layer(application + presentation + session)
Application layer - Users interact with this layer.
WhatsApp , Edge etc.
2. Transport layer
Checksum
Timers
3. Network layer
4. Data link layer
5. Physical layer
Client server Architecture
Server - A sever helps to share data and hardware resources through network.
Client - A host/user that request services.
Datacenter - Collection of huge number of servers.
Master- Slave network
Client sends the request→ Server
Server → Responds to the client’s request
Peer to peer(P2P) Architecture
P2P architecture is a decentralized network.
Devices communicate directly with each other without a central server.
Networking devices
1. Repeater(physical layer)
It amplifies or boosts the signal so that it can cover large area.
It is 2 port device.
Basics 5
It copies the signals bit by bit and regenerate it at original strength when the
signal is weak.
2. Hub
A hub is multi port repeater.
It has no intelligence so it sends data to all devices connected to hub.
3. Bridge (data link layer)
It is a repeater with intelligence.
It can filter data packets by reading their MAC addresses.
It is a two port device.
4. Switch
It is a multiport bridge which can boost the performance and efficiency.
5. Router
A router moves data packets from source to the destination through best
paths.
It forwards data packet between computer networks on the basis of their
IP addresses.
6. Gateway
It connects two different networks with different protocols or technology.
7. Proxy server
It is an intermediatory server between client and server.
It adds security, privacy and performance to network communications.
8. Load balancer
It distributes traffic across severs for performance.
Protocols
1. HTTP (Hypertext Transfer Protocol)
a. It is an application layer client-server protocol.
b. http request(when client makes request to server)
c. http response(when server responds to client’s request)
d. It is built upon TCP and uses port 80.
Basics 6
e. It is a stateless protocol where each command is independent with
respect to the previous command.
2. HTTPS (Hypertext Transfer Protocol Secure) - A secure version of HTTP,
encrypts data for safe browsing.
3. FTP (File Transfer Protocol) - Facilitates file transfers over a network.
4. SMTP (Simple Mail Transfer Protocol) - Sends email messages between
servers
port 25
5. POP3 (Post Office Protocol version 3) - Retrieves email from a server.
pot 110
6. IMAP (Internet Message Access Protocol) - Manages email on a mail server.
7. TCP (Transmission Control Protocol)
It is transport layer protocol.
Connection oriented protocol.
Works slow but ensures reliable data delivery.
Data will be in order.
Data will not change.
It provide error checking using checksums and timers.
8. UDP (User Datagram Protocol)
It is transport layer protocol.
Provides faster but less reliable data transmission.
Data may or may not be delivered ,data may change and data may not be in
order.
Connection less protocols.
Used in video conferencing ,gaming ,DNS etc.
9. IP (Internet Protocol) -
Basics 7
It uniquely defines a server , a client , a router etc.
1. IPv4
It is 32 bit numbers with 4 words. 2^32 numbers are possible.
1.3.4.6 each has 8 bits
1.2.3 is subnet id and .6 is host/device id
2. IPv6
It is 128 bit number with 8 words
four times larger than IPv4
2^32*4 numbers are possible.
1.2.3.4.5.6.7.8 each is 16 bit number
10. ICMP (Internet Control Message Protocol) - Handles network error
messages.
11. DNS (Domain Name System) - Resolves domain names to IP addresses.
DNS maps the domain names to their associated IP addresses
If you enter https://www.google.com then DNS will convert domain name to
its IP address and request will reach to the server,
12. DHCP (Dynamic Host Configuration Protocol) - Assigns IP addresses in a
network.
13. SNMP (Simple Network Management Protocol) - Monitors and manages
network devices.
14. SSH (Secure Shell) - Provides secure remote access to systems.
15. Telnet - Allows remote access to systems (less secure than SSH).
16. SIP (Session Initiation Protocol) - Used for voice and video communication.
17. RTP (Real-time Transport Protocol) - Transmits real-time multimedia data.
18. BGP (Border Gateway Protocol) - Routes data between autonomous
systems.
19. ICMP (Internet Control Message Protocol) - Handles network error
messages.
Basics 8
20. LDAP (Lightweight Directory Access Protocol) - Accesses directory
services.
Status/Error codes
200 - request successful
404 - couldn’t find it
400 - bad request
500 - internal server errors
up to 100 - informational
200 ranges - success code
300 ranges - redirection purpose
400 ranges - client error
500 ranges - server error
Cookies
It is file stored in the browser when you visit a website for first time.
It will be used when you again make request to the server.
MAC address
It is 12 digit alpha-numeric number of the network interface card(NIC) of your
computer.
Bluetooth and WIFI will have different MAC addresses.
Differences between TCP and UDP
TCP is a connection-oriented protocol, whereas UDP is a connectionless
protocol. TCP is comparatively slower than UDP. Overall, UDP is a much faster,
simpler, and
efficient protocol, however, retransmission of lost data packets is only possible
with TCP.
Basics 9