What is networking?
A computer network comprises two or more computers that are
connected—either by cables (wired) or wifi (wireless)—with the
purpose of transmitting, exchanging, or sharing data and resources.
Computer network types:
LAN (local area network): A LAN connects computers over a relatively short distance,
allowing them to share data, files, and resources. For example, a LAN may connect all
the computers in an office building, school, or hospital. Typically, LANs are privately
owned and managed.
WLAN (wireless local area network): A WLAN is just like a LAN but connections
between devices on the network are made wirelessly.
WAN (wide area network): As the name implies, a WAN connects computers over a
wide area, such as from region to region or even continent to continent. The internet is
the largest WAN, connecting billions of computers worldwide. You will typically see
collective or distributed ownership models for WAN management.
VPN (virtual private network): A VPN is a secure, point-to-point connection between
two network end points (see ‘nodes’ below). A VPN establishes an encrypted channel
that keeps a user’s identity and access credentials, as well as any data transferred,
inaccessible to hackers.
Important terms and concepts:
IP address: An IP address is a unique number assigned to every device connected to a
network that uses the Internet Protocol for communication. Each IP address identifies
the device’s host network and the location of the device on the host network. When
one device sends data to another, the data includes a ‘header’ that includes the IP
address of the sending device and the IP address of the destination device.
Every digital device (computer, laptop, phone, tablet, etc.) is assigned an IP address
and this is what allows us to communicate and connect to it. Think of an IP address as
something similar to your home address. Without this address, no one would be able to
find you and send you postal mail.
The IP addressing system we currently use is known as IP version 4 or IPv4 (we'll
cover the upcoming IPv6 in a later tutorial). It consists of 32 bits of four octets, or four
groups of 8 bits (on/off switches).
For example, [Link]. Each of the numbers between the periods (.) is the
decimal equivalent of 8 bits. This means we take the base 2 number that computers
use which is represented by 8 bits and convert it to the decimal numbers that people
are more used to working with (see the diagram below). Each of the octets (8 bits) is
capable of representing numbers in the range from 0 to 255 (2 to the 8th power).
IP Address Classes:
Class A: [Link] – [Link]
Class B: [Link] – [Link]
Class C: [Link] – [Link]
Public vs. Private IP Addresses:
It is important to note that the IP addressing system has its limitations. The biggest
limitation is that there are not enough IP addresses to cover all the devices that need to
connect to the internet. The IPv4 system we are working with now has only 4,3 billion
IP addresses. With 7,3 billion people on the planet and many more devices, this is
definitely not enough.
As a result, a system was developed to reuse a pool of IP addresses that are used
within a local network and cannot be used on the internet. These addresses can
be used again and again within each local network, but not over the internet, thus
maintaining the number of IP addresses needed to keep the world turning.
[Link] – [Link]
[Link] – [Link]
[Link] – [Link]
Routers: A router is a physical or virtual device that sends information that
is contained in data packets between networks. Routers analyze data
within the packets to determine the best way for the information to reach
its ultimate destination. Routers forward data packets until they reach their
destination node.
Switches: A
switch is a device that connects other devices and manages
node-to-node communication within a network, ensuring that data
packets reach their ultimate destination. While a router sends information
between networks, a switch sends information between nodes in a single
network.
When discussing computer networks, ‘switching’ refers to how data
is transferred between devices in a network. The three main types of
switching are as follows.
OSI Layers “Top TO Down”
7. Application Layer:
The application layer is used by end-user software such as web
browsers and email clients. It provides protocols that allow software
to send and receive information and present meaningful data to
users. A few examples of application layer protocols are
the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP),
Post Office Protocol (POP), Simple Mail Transfer Protocol (SMTP),
and Domain Name System (DNS).
6. Presentation Layer:
The presentation layer prepares data for the application layer. It
defines how two devices should encode, encrypt, and compress data
so it is received correctly on the other end. The presentation layer
takes any data transmitted by the application layer and prepares it
for transmission over the session layer.
5. Session Layer:
The session layer creates communication channels, called sessions,
between devices. It is responsible for opening sessions, ensuring
they remain open and functional while data is being transferred, and
closing them when communication ends. The session layer can also
set checkpoints during a data transfer—if the session is interrupted,
devices can resume data transfer from the last checkpoint.
4. Transport Layer:
The transport layer takes data transferred in the session layer and
breaks it into “segments” on the transmitting end. It is responsible
for reassembling the segments on the receiving end, turning it back
into data that can be used by the session layer. The transport layer
carries out flow control, sending data at a rate that matches the
connection speed of the receiving device, and error control,
checking if data was received incorrectly and if not, requesting it
again.
3. Network Layer:
The network layer has two main functions. One is breaking up
segments into network packets, and reassembling the packets on
the receiving end. The other is routing packets by discovering the
best path across a physical network. The network layer uses
network addresses (typically Internet Protocol addresses) to route
packets to a destination node.
2. Data Link Layer:
The data link layer establishes and terminates a connection between
two physically-connected nodes on a network. It breaks up packets
into frames and sends them from source to destination. This layer is
composed of two parts—Logical Link Control (LLC), which identifies
network protocols, performs error checking and synchronizes
frames, and Media Access Control (MAC) which uses MAC addresses
to connect devices and define permissions to transmit and receive
data.
1. Physical Layer:
The physical layer is responsible for the physical cable or
wireless connection between network nodes. It defines the
connector, the electrical cable or wireless technology
connecting the devices, and is responsible for transmission
of the raw data, which is simply a series of 0s and 1s, while
taking care of bit rate control.
VPN Concept In Networking:
virtual private network, or VPN, is an encrypted connection over
the Internet from a device to a network. The encrypted connection
helps ensure that sensitive data is safely transmitted. It prevents
unauthorized people from eavesdropping on the traffic and
allows the user to conduct work remotely.
TCP & UDP Protocol:
TCP vs UDP: Differences between the protocols. The main difference
between TCP (transmission control protocol) and UDP (user
datagram protocol) is that TCP is a connection-based protocol and
UDP is connectionless. While TCP is more reliable, it transfers data
more slowly. UDP is less reliable but works more quickly.
TCP attack and UDP attack?
A UDP flood is more dangerous than a TCP flood because UDP is a
connectionless protocol. This means that there is no need to establish a
connection before sending data. UDP flood can easily overwhelm a
server with spoofed packets.
DHCP
Dynamic Host Configuration Protocol (DHCP) dynamically assigns IP
addresses. This means that you do not always have the same IP
address. Most of the time, these IP address assignments are made on
a local network. Remember that on local networks we use private IP
addresses.
When each device connects to the local network, it must request an IP
address. This device sends this request to the DHCP server, which then
assigns an IP address to that system for a fixed period of time, known
as a “lease”.