Computer Networks 6
Computer Networks 6
o OSI stands for Open System Interconnection is a reference model that describes how
information from a software application in one computer moves through a physical
medium to the software application in another computer.
o OSI consists of seven layers, and each layer performs a particular network function.
There are the seven OSI layers. Each layer has different functions. A list of seven layers are
given below:
1. Physical Layer
2. Data-Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
TCP/IP stands for Transmission Control Protocol/Internet Protocol. This model consists of four layers
1. Application Layer: This layer is responsible for providing network services directly to
end-users or applications. It includes protocols like HTTP (Hypertext Transfer
Protocol), SMTP (Simple Mail Transfer Protocol), and FTP (File Transfer Protocol),
DNS(Domain Name System), TELNET(TELecommunications NETwork).
2. Transport Layer: It provides reliable delivery of messages from process to process.
It ensures that messages are transmitted in the order in which they are send and
1
there is no duplication of data.
Protocols used are TCP(Transmission Control protocol) and UDP (User Datagram
Protocol).
1. Transmission Delay
2. Propagation Delay
3. Queuing Delay
4. Processing Delay
1. Transmission Delay : Time taken to put a packet onto link. In other words, it is simply time
required to put data bits on the wire/communication medium. It depends on length of
packet and bandwidth of network.
2
2. Propagation delay : Time taken by the first bit to travel from sender to receiver end of the
link. In other words, it is simply the time required for bits to reach the destination from the
start point. Factors on which Propagation delay depends are Distance and propagation
speed.
3. Queuing Delay : Queuing delay is the time a job waits in a queue until it can be executed. It
depends on congestion. It is the time difference between when the packet arrived
Destination and when the packet data was processed or executed.
4. Processing Delay : Processing delay is the time it takes routers to process the packet header.
Processing of packets helps in detecting bit-level errors that occur during transmission of a
packet to the destination. In simple words, it is just the time taken to process packets.
6- Explain Firewalls
A firewall is a network security device, either hardware or software-based, which monitors all
incoming and outgoing traffic and based on a defined set of security rules it accepts, rejects or drops
that specific traffic.
A firewall establishes a barrier between secured internal networks and outside untrusted network,
such as the Internet.
1. Packet Filtering Firewall: This is the most basic type of firewall that filters incoming
and outgoing packets based on predefined rules. It examines packets' source and
destination addresses, ports, and protocols to determine whether to allow or block
them.
2. Stateful Firewall (Stateful Inspection): Stateful firewalls maintain a table of active
connections and their state. They can make more intelligent decisions about which
packets to allow based on the context of the connection. They are aware of the state
of established connections and can track whether a packet is part of an existing
connection or a new one.
3. Proxy Firewall/ Application firewall: Proxy firewalls act as intermediate between a
user's device and the target server. They make requests on behalf of the user, hiding
the user's IP address. ()
3
7- Differentiate between IPv4 and IPv6
Ipv4 Ipv6
Classes IPv4 has 5 different classes of IP address IPv6 does not contain classes of IP
that includes Class A, Class B, Class C, Class addresses.
D, and Class E.
Number of IP IPv4 has a limited number of IP addresses. IPv6 has a large number of IP
address addresses.
Security features In IPv4, security depends on the In IPv6, IPSEC is developed for
application. This IP address is not security purposes.
developed in keeping the security feature
in mind.
Encryption and It does not provide encryption and It provides encryption and
Authentication authentication. authentication.
Public IP address of a system is the IP address which is used to communicate outside the network.
Public IP address is basically assigned by the ISP (Internet Service Provider).
4
PRIVATE IP ADDRESS PUBLIC IP ADDRESS
Home Networks: In a typical home network, E-commerce Platforms: Online stores use
devices such as computers, smartphones, smart public IP addresses to serve their websites
TVs, and IoT devices are assigned private IP and process transactions securely over the
addresses. These devices communicate with internet.
each other over the local network
5
9-Explain in detail 3 way Handshaking
Handshake refers to the process to establish connection between the client and server. Handshake is
simply defined as the process to establish a communication link. To transmit a packet, TCP needs a
three way handshake before it starts sending data.
Step 1: SYN
SYN is a segment sent by the client to the server. It acts as a connection request between the
client and server. It informs the server that the client wants to establish a connection.
Step 2: SYN-ACK
It is an SYN + ACK segment sent by the server. The ACK segment informs the client that the
server has received the connection request and it is ready to build the connection. The SYN
segment informs the sequence number with which the server is ready to start with the
segments.
Step 3: ACK
The ACK segment is sent by the client as the response of the received ACK and SYN from the server. It
results in the establishment of a reliable data connection.
6
10-What is Cryptography and what are the
Encryption Methods?
Cryptography is an important aspect when we deal with network security. 'Crypto' means secret or
hidden. Cryptography is the science of secret writing with the intention of keeping the data secret.
1. Symmetric key cryptography - It involves usage of one secret key along with
encryption and decryption algorithms which help in securing the contents of the
message. The strength of symmetric key cryptography depends upon the number of
key bits. It is relatively faster than asymmetric key cryptography. There arises a key
distribution problem as the key has to be transferred from the sender to the receiver
through a secure channel.
7
symmetric key cryptography.
3. Hashing - It involves taking the plain-text and converting it to a hash value of fixed size
by a hash function. This process ensures the integrity of the message as the hash value
on both, sender\'s and receiver\'s side should match if the message is unaltered.
Requirement
Every host is identified by the IP address but remembering numbers is very difficult for the
people and also the IP addresses are not static therefore a mapping is required to change the
domain name to IP address. So, DNS is used to convert the domain name of the websites to
their numerical IP address.
8
Domain :
There are various kinds of DOMAIN :
SFTP stands for Secure File Transfer Protocol. It is a protocol which provides the secure
channel, to transfer the file from one host to another host or systems. SFTP establishes the
control connection under SSH protocol and It is used in port no-22.
There are some difference between them which are given below:
9
S.NO FTP SFTP
FTP (File transfer protocol) usually runs SFTP (Secure File Transfer Protocol)
4.
on port no-21. runs on port no-22.
FTP do not encrypt the data before SFTP, data is encrypted before
6.
sending. sending.
10
o It can send a single message to one or more recipients.
o Sending message can include text, voice, video or graphics.
o It can also send the messages on networks outside the internet.
o The main purpose of SMTP is used to set up communication rules between servers.
The servers have a way of identifying themselves and announcing what kind of
communication they are trying to perform. They also have a way of handling the errors
such as incorrect email address. For example, if the recipient address is wrong, then
receiving server reply with an error message of some kind.
Also, another syntactic difference between http and https is that http uses default port 80
while https uses default port 443. But it should be noted that this security in https is achieved at the
cost of processing time because Web Server and Web Browser needs to exchange encryption keys
using Certificates before actual data can be transferred.
• In HTTP, URL begins with “http://” whereas URL starts with “https://”
• HTTP uses port number 80 for communication and HTTPS uses 443
• HTTP is considered to be unsecure and HTTPS is secure
11
• HTTP Works at Application Layer and HTTPS works at Transport Layer
• In HTTP, Encryption is absent and Encryption is present in HTTPS
• HTTP does not require any certificates and HTTPS needs SSL Certificates
• We can connect external devices to the computer with the help of ports and cables.
• These are basically slots on mother board where we connect external devices or we
can plugged in external devices through cables.
• Mouse, keyboards, printers, speakers are some of the example of external devices
that connected to the computer through ports.
1. FTP: Port number for FTP is 20 for data and 21 for control.
2. SMTP: Port number is 25.
3. DNS: Port number of is 53.
Preventing DDoS attack is harder than DoS attacks because the traffic comes from multiple
sources and it becomes difficult to actually separate malicious hosts from the non-malicious
hosts. Some of the mitigation techniques that can be used are:
12
3. Blacklisting / whitelisting - Blacklisting is the mechanism of blocking the IP addresses,
URLs, domains names etc. mentioned in the list and allowing traffic from all other
sources. On the other hand, whitelisting refers to a mechanism of allowing all the IP
addresses, URLs, domain names etc. mentioned in the list and denying all other
sources the access to the resources of the network.
Full form It stands for Transmission Control It stands for User Datagram
Protocol. Protocol.
Speed TCP is slower than UDP as it performs UDP is faster than TCP as it does not
error checking, flow control, and provides guarantee the delivery of data
assurance for the delivery of packets.
Acknowledgment TCP uses the three-way-handshake UDP does not wait for any
concept. In this concept, if the sender acknowledgment; it just sends the
receives the ACK, then the sender will data.
send the data. TCP also has the ability to
resend the lost data.
Flow control It follows the flow control mechanism in This protocol follows no such
mechanism which too many packets cannot be sent mechanism.
to the receiver at the same time.
Error checking TCP performs error checking by using a It does not perform any error
checksum. When the data is corrected, checking, and also does not resend
then the data is retransmitted to the the lost data packets.
receiver.
Applications This protocol is mainly used where a This protocol is used where fast
secure and reliable communication communication is required and does
process is required, like military services, not care about the reliability like VoIP,
web browsing, and e-mail. game streaming, video and music str
13