Sunday, March 28, 2021

Computer Networks

Two or more Computer(nodes) connected with each other to form a network to share information with each other is called computer network.


LAYER1 DEVICES-
layer 1 devices are hub and modem.

HUB:- Hub is basically used to connect different nodes in a same network. 

2. Hub is not appropriate for security purposes, it sends the copy of information to all the connected nodes even if only one node is asking for the information. 

MODEM:-  Modem stands for MOdulator/DEModulator. It converts the computer generated digital signals to analog signals to transmit over the cable and also converts coming analog signals to digital. 

LAYER2 DEVICES-  
layer 2 device is switch. 

SWITCH:-  Switch is used to connect different nodes of same network. 

2. Switch maintains a MAC(Mobile Access Control) address table which provides security over the networks. Unlike Hub, the information will send to only those who are asking for it.  
 
LAYER3 DEVICES- 
 layer 3 device is Router

ROUTER:- Router is used to connect different nodes of different networks.  

SECURITY IN NETWORK:

1. FIREWALL:-  Firewall is security purpose software or a device to prevent our system from malicious programs. 

Types of Firewalls- 

1. Packet-filtering firewall-  

i. This is also called as Stateless inspection firewall . 

ii. This is the oldest form of firewalls . 

iii. It simply checks the IP address and the routing details ,not the packet contents. 

iv. Which makes it less secured

2. Statefull Firewall- It is the combination of stateless Firewall and TCP handshake(which checks the content to don't let the malicious program attacks the system). 

3. Proxy Firewall- It is mostly used in Cloud.  
 
2. INTRUSION-DETECTION SYSTEM:-  

It tracks the unwanted activities that can cause harm to our system.


How can IDS detect the unwanted program?

It identifies based on 3Criterias- 
1.Signature based. 
2.Anamoly based. 
3.Policy based.  

3. INTRUSION PREVENTION SYSTEM :- 
 
It prevents the network from any breach and attack by implying some set of rules.  

It prevents the system by several ways like through sms and emails it informs the user about the unwanted activities.  
 
Action taken by IPS- 
1. Blocking the offensing IP address. 
2. Close the vulnerable interfaces. 
3. Terminate the network session. 
4. Redirect the link. 
5. Plus more.
 
4.VPN(VIRTUAL PRIVATE NETWORK ):- 

VPN is a private-network which connects a private network to the public network(like internet) 
Through secured tunnel.  

VPN protocols- 

1.IPSec( Internet Protocol Security) 
2.GRE(Generic Routing Encapsulation) 
3.TLS(Transport Layer Control) 
4.SSL(Secured socket layer)

OSI/ISO STACK:- 

OSI stands for Open System Interconnection.
OSI model is a model which defines the communication between two or more nodes  in a network.It elaborates how the transmission of data between two computers can be done. OSI model was developed by ISO( International organisation of standardisation)  

OSI MODEL has 7 layers- 
1. Physical Layer(P)
2. Data Link Layer(D) 
3. Network Layer(N) 
4. Transport Layer(T) 
5. Session Layer(S) 
6. Presentation Layer(P) 
7. Application Layer(A) 
 
[Note:- Here is a trick to remember the sequence of layers- Take the first letter of each layer PDNTSPA and recall it as Please Do Not Throw Sauce Pizza Away]
 
1.Physical Layer :- 
 
Physical Layer is the first layer of OSI Model.
It is directly connected with the transmission medium.here, bit transmission is done.  

Functions of physical layer-  

1. Line Configuration-  medium(e.g-ethernet)

2. Transmission mode- Modes can be Simplex(at a time data can be sent or received from one end only), Half duplex (data can be sent or received from both ends but not at the same time ) 
, Duplex (data can be sent or received from both ends at the same time) 
 
3. Signals- signals are transmitted to the network. 

2.Data-Link Layer:- 
 
Data Link is responsible for error-control and flow-control for the data frames to be transferred . the MAC address (source to destination) is stored in the header of data link layer. It is also used to convert the packets into frames.  
  
Data Link Layer is sub divided into two groups- 
 
1. Logical Link Control Layer- This layer is 
used to transfer the data into network layer.
2. Mobile Access Control- This layer lies between Logical Link Control layer and data link layer  

Functions of Data link layer- 

1. Framing.  
2. Addressing. 
3. Error-control- An error detecting code CRC(cyclic redundancy check).it is present in the trailer of Data link layer.
4. Flow-control.
5. Access-control.  

Network Layer- 

Network layer is responsible for tracking the location of data packets 

Functions- 

1.Internetworking 

2.IP addressing 

3.Packetising.

Transport Layer- 

Transport Layer is responsible for the transmission of data in a proper sequence in which order they have sent in the same order they need to be received. there should be no duplication of data.

Protocols- 

1.Transport Control Protocol-TCP protocol divides the packets into small segments and then at the receiver end the segments are sequenced in a proper manner.

2.UDP[User Datagram Protocol]-Not reliable[connectionless service]

Functions- 

1. Segmentation and assembly.

2. Port addressing.

3. Connection Control. 

Session Layer- 

It is responsible for the transfer of data reliably. it decides when to end the session it basically manages the session 
                                           It adds the checkpoints in the data so when the data will be lost then we don't need to re send the data from the beginning. 

Function-

Synchronization.

Presentation Layer- 

Presentation Layer works on syntax and semantics and  is responsible for Translation, Encryption and Compression between two systems.
 
It is also called Syntax Layer.
 

Application Layer- 

Application Layer provides a window for users to communicate between the devices.

It provides network services to end user.