Sunteți pe pagina 1din 19

Basics of Networking & Linux

Table of Content

1. What is network ?
2. Networking Devices.
3. Types of networks.
4. Network topology.
5. Transmission Mode.
6. Casting.
7. IP Address .
8. OSI Model .
9. TCP/IP Model.
10. Deference b/w OSI & TCP/IP.
11. Deference b/w TCP & UDP Ports.
12. What is protocol.
13. What is port.
14. Some important protocol .
15. Some important network security devices.
What is a network?
A network is a collection of computers, servers, mainframes, network devices, peripherals,
or other devices connected to one another to allow the sharing of data.

Networking Devices ?
1 >> Hub
The data is transferred in terms of packets on a computer network.
The hub copies the data packet to all of its ports connected to.
Highly Insecure

2 >> Switch
Switch works on data link layer.
A switch does ‘filter and forwarding’ which is a more intelligent way of dealing with the
data packets.
A switch also maintains a CAM (Content Addressable Memory).

3 >> Modem
A modem stands for (Modulator+Demodulator). That means it modulates and demodulates
the signal between the digital data of a computer and the analog signal of a telephone line

4 >> Bridge
If a router connects two different types of networks, then a bridge connects two sub-
networks as a part of the same network.

5 >> Repeater
A repeater is an electronic device that amplifies the signal it receives. In other terms, you
can think of repeater as a device which receives a signal and retransmits it at a higher level
or higher power so that the signal can cover longer distances.

Types of Network ?
1 > LAN
2 > MAN
3 >WAN
Network Topology ?
1 > Bus
Bus topology is a network type in which every computer and network device is connected
to single cable.

Advantage: -
It transmits data only in one direction.
Every device is connected to a single cable
It is cost effective.
Cable required is least compared to other network topology.
Used in small networks.
It is easy to understand.
Easy to expand joining two cables together

Disadvantage: -
Cables fails then whole network fails.
If network traffic is heavy or nodes are more the performance of the network decreases.
Cable has a limited length.
It is slower than the ring topology.

2 >> Ring
It is called ring topology because it forms a ring as each computer is connected to another
computer, with the last one connected to the first

Advantage :-
Transmitting network is not affected by high traffic or by adding more nodes, as only the
nodes having tokens can transmit data.
Cheap to install and expand.

Disadvantage:-
Troubleshooting is difficult in ring topology.
Adding or deleting the computers disturbs the network activity.
Failure of one computer disturbs the whole network.
3 >> Star
In this type of topology all the computers are connected to a single hub through a cable.
This hub is the central node and all others nodes are connected to the central node.

Advantage:-
Fast performance with few nodes and low network traffic.
Hub can be upgraded easily
Easy to troubleshoot.
Easy to setup and modify
Only that node is affected which has failed, rest of the nodes can work smoothly.

Disadvantage:-
Cost of installation is high.
Expensive to use.
If the hub fails then the whole network is stopped because all the nodes depend on the
hub.
Performance is based on the hub that is it depends on its capacity

4 >> Mesh
It is a point-to-point connection to other nodes or devices. All the network nodes are
connected to each other. Mesh has n(n-1)/2 physical channels to link n devices.

Advantage:-
Each connection can carry its own data load.
Fault is diagnosed easily.
Provides security and privacy.

Disadvantage:-
Installation and configuration is difficult.
Cabling cost is more.
Bulk wiring is required.
5 >> Tree
It has a root node and all other nodes are connected to it forming a hierarchy. It is also
called hierarchical topology

Advantage :-
Extension of bus and star topologies.
Expansion of nodes is possible and easy.
Easily managed and maintained.
Error detection is easily done.

Disadvantage:-
Heavily cabled.
Costly.
If more nodes are added maintenance is difficult.
Central hub fails, network fails.

6 >> Hybrid
Using two or more than two topology.

Transmission Mode :-
Transmission mode means transferring of data between two devices. It is also known as
communication mode.

Types :-
1 >> Simplex Mode

In Simplex mode, the communication is unidirectional, as on a one-way street. Only one of


the two devices on a link can transmit, the other can only receive. The simplex mode can
use the entire capacity of the channel to send data in one direction.

2 >> Half-Duplex Mode


In half-duplex mode, each station can both transmit and receive, but not at the same time.
When one device is sending, the other can only receive, and vice versa. The half-duplex
mode is used in cases where there is no need for communication in both direction at the
same time.

3 >> Full-Duplex Mode


In full-duplex mode, both stations can transmit and receive simultaneously.

Casting :-
Unicast: from one source to one destination i.e. One-to-One
Broadcast: from one source to all possible destinations i.e. One-to-AllMulticast: from one
source to multiple destinations stating an interest in receiving the traffic i.e. One-to-Many

IP Address :-
An Internet Protocol address (IP address) is a logical numeric address that is assigned to
every single computer, printer, switch, router or any other device that is part of a TCP/IP-
based network. Size of IP is 32 bit. IP have 4 octet of 8 bit.

IP Address Class
ISO Model :-
1 > Physical Layer :-
It is responsible for transmission and reception of the unstructured raw data over network
It converts the digital/analog bits into electrical signal or optical signals.

2 > Data Link :- Transmitting and receiving data frames sequentially is managed by this layer
The main function of this layer is to make sure data transfer is error free from one node to
another, over the physical layer.

3 > Network Layer


Network Layer routes the signal through different channels from one node to other.
It divides the outgoing messages into packets and assembles the incoming packets into
messages for higher levels.

4 > Transport
Functions such as Multiplexing, Segmenting or Splitting on the data are done by this layer
Transport layer breaks the message (data) into small units so that they are handled more
efficiently by the network layer.
Error Recovery
Flow Control

5 > Session
Session Layer manages and synchronize the conversation between two different
applications.
Integrity
Reliability

6 > Presentation
Presentation Layer takes care that the data is sent in such a way that the receiver will
understand the information (data) and will be able to use the data
It performs Data compression, Data encryption, Data conversion etc.
7 > Application
Transferring of files disturbing the results to the user is also done in this layer. Mail services,
directory services, network resource etc are services provided by application layer.
This layer mainly holds application programs to act upon the received and to be sent data.

TCP/IP Protocol
TCP/IP, or the Transmission Control Protocol/Internet Protocol, is a suite of communication
protocols used to interconnect network devices on the internet. It is 4 layer protocol suites.

1 >>Application Layer
The application layer provides applications with standardized data exchange. Its protocols
include the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Post Office
Protocol 3 (POP3), Simple Mail Transfer Protocol (SMTP) and Simple Network Management
Protocol (SNMP).

2 >> Transport Layer


The transport layer is responsible for maintaining end-to-end communications across the
network. TCP handles communications between hosts and provides flow control,
multiplexing and reliability. The transport protocols include TCP and User Datagram
Protocol (UDP), which is sometimes used instead of TCP for special purposes.

3 >> Network Layer


The network layer, also called the internet layer, deals with packets and connects
independent networks to transport the packets across network boundaries. The network
layer protocols are the IP and the Internet Control Message Protocol (ICMP), which is used
for error reporting.

4 >> Physical Layer


The physical layer consists of protocols that operate only on a link -- the network
component that interconnects nodes or hosts in the network. The protocols in this layer
include Ethernet for local area networks (LANs) and the Address Resolution Protocol (ARP)
Difference Between OSI and TCP/IP
Difference between TCP & UDP

What is a Protocol
A protocol is a set of rules and guidelines for communicating data. Rules are defined for
each step and process during communication between two or more computers. Networks
have to follow these rules to successfully transmit data.

What is a Port
Ports are physical and logical connection between two or more system by which
information is transferred. There are two types of port TCP & UDP. Total number of ports
are 65535.
Some important protocol
1 >> ARP
The address resolution protocol (arp) is a protocol used by the Internet Protocol (IP),
specifically IPv4, to map IP network addresses to the hardware addresses used by a data
link protocol.
In short Address Resolution Protocol, a network layer protocol used to convert an IP
address into a physical address.

2 >> ICMP
ICMP (Internet Control Message Protocol) is an error-reporting protocol network devices
like routers use to generate error messages to the source IP address when network
problems prevent delivery of IP packets. ICMP creates and sends messages to the source IP
address indicating that a gateway to the Internet that a router, service or host cannot be
reached for packet delivery. Any IP network device has the capability to send, receive or
process ICMP messages.

3 >> DHCP
DHCP (Dynamic Host Configuration Protocol) is a network management protocol used to
dynamically assign an Internet Protocol (IP) address to any device, or node, on a network so
they can communicate using IP. DHCP automates and centrally manages these
configurations rather than requiring network administrators to manually assign IP
addresses to all network devices. DHCP can be implemented on small local networks as well
as large enterprise networks
It works on DORA Process that is Discovery, Offer, Request, and ACK

4 >> DNS
The domain name system (DNS) is the way that internet domain names are located and
translated into internet protocol (IP) addresses. The domain name system maps the name
people use to locate a website to the IP address that a computer uses to locate a website.
Some important network security devices

1 >> Firewalls :- A firewall is a network security system that monitors and controls over all
your incoming and outgoing network traffic based on advanced and a defined set of
security rules.

2 >> IDS
An intrusion detection system (IDS) is a system that monitors network traffic for suspicious
activity and issues alerts when such activity is discovered. While anomaly detection and
reporting is the primary function, some intrusion detection systems are capable of taking
actions when malicious activity or anomalous traffic is detected, including blocking traffic
sent from suspicious IP addresses. IDS have two types Network based IDS & Host based IDS.

3 >> IPS
An intrusion prevention system (IPS) is a system that monitors a network for malicious
activities such as security threats or policy violations. The main function of an IPS is to
identify suspicious activity, and then log information, attempt to block the activity, and
then finally to report it. IPS have two types Network based IPS & Host based IPS.
Basics of Linux Commands

1 > #useradd :- To add a user

2 > #cat /etc/passwd :- to check users and their info

3 > #userdel :- To delete a user


4> #passwd :- To give a user password

5 > # ls :- To list all files and folders

6 > # cd :- To travel in any directory

7 > # cd ../.. :- To travel back from directory


8 > # mkdir :- To create any directory

9 > # rmdir :- To delete any directory

10 > # touch :- To create any file

Note:- touch command will only create a file. You can’t edit a file with touch.

11 > # vim :- To create and edit any file

You can create and edit any file in Linux with the help of vim editor
To open or create any file with vim type
e.g.
#vim sanjay.txt
Vim have two type of modes
1 > Insert mode
2 >Command mode

To write in a file you need to be in insert mode. Press “i” for insert mode.
To save a file you need to be in command mode. Press “esc” for Command mode.
Press “:” wq and press enter

12 > # rm –rf :- To delete any file

13 > # cp :- To copy any file

14 > # mv :- To move any file


15 > Linux permission

Linux have three types of permission


1 > Read = r = 4
2 > Write = w = 2
3 > Execute = x =1

Read :- You can read a file but not edit


Write :- You can read and edit file
Execute :- You can execute any programs

To check permission for files


# ls –l
To modify any linux permission
# chmod 777 sanjay.txt

# chmod ugo=rwx sanjay.txt


--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------END-------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
Note :- Please do research for more information.

Thanks for Reading


Sanjay Lendhar

S-ar putea să vă placă și