Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

CSE 3

10 Marks

i)Define Network. ii)What are the components of a network? iii)Mention the criteria of
a network.

I) A network is a group of connected devices, such as computers and phones, that share
information and resources with each other.

II) Components of a Network


● Nodes: Devices like computers, printers, and servers connected to a network.
● Network Interface Cards (NICs): Hardware enabling devices to connect to the
network.
● Switches: Devices linking multiple devices within a network for communication.
● Routers: Devices connecting different networks.
● Cables and Connectors: Physical media for wired connections (e.g., Ethernet
cables).
● Modems: Devices for modulating/demodulating signals over phone lines or cable.
● Firewalls: Security devices/software controlling network traffic.

iii) Criteria of a Network


1. Performance: Measured in terms of throughput, latency, and jitter. It indicates how
well the network performs in terms of data transfer speed and reliability.
2. Scalability: The ability of the network to grow and handle an increasing number of
devices and traffic without significant performance degradation.
3. Reliability: The network’s ability to maintain consistent performance and availability,
including fault tolerance and redundancy mechanisms.
4. Security: Measures in place to protect data and resources from unauthorized access
and breaches.

iv)Discuss about different topologies available with a network.

Network Topologies
1. Bus Topology: All devices are connected to a single central cable, known as the bus.

2. Star Topology: All devices are connected to a central hub or switch.


3. Ring Topology: Devices are connected in a circular fashion, with each device having
exactly two neighbours.

4. Mesh Topology:Every device is connected to every other device.

5. Hybrid Topology: A combination of two or more different topologies.

2) ( i) Describe the functions of the layers in OSI model. ii) With suitable diagram,
explain the working principles of signal propagation through fiber optic cable.

Functions of the Layers in the OSI Model


1. Application Layer: The application layer is responsible for providing services to the
user.
2. Presentation Layer: The presentation layer is responsible for translation,
compression, and encryption.
3. Session Layer: The session layer is responsible for dialog control and
synchronization.
4. Transport Layer: The transport layer is responsible for the delivery of a message
from one process to another.
5. Network Layer: The network layer is responsible for the delivery of individual
packets from the source host to the destination host
6. Data Link Layer: The data link layer is responsible for moving frames from one hop
(node) to the next.
7. Physical Layer: The physical layer is responsible for movements of individual bits
from one hop (node) to the next.

II) Working Principles of Signal Propagation through Fiber Optic Cable

Fiber Optic Cable Structure:

Core: Thin glass or plastic center where light travels.

Cladding: Outer optical material surrounding the core that reflects light back into the core.

Buffer Coating: Protective coating that cushions the fiber and prevents it from damage and moisture.

Signal Propagation in Fiber Optic Cable:

1. Light Source: A laser or LED generates light pulses representing data.


2. Transmission: The light pulses travel through the core of the fiber optic cable.
3. Total Internal Reflection: The light pulses are kept within the core by the cladding
through total internal reflection. This principle ensures that the light continues to
propagate along the length of the cable with minimal loss.
4. Receiver: At the other end of the cable, a photodetector receives the light pulses and
converts them back into electrical signals for further processing.

3. i) Write about different transmission modes of communicating devices with suitable


diagrams and examples. ii) Draw a sine wave and write the equation of the wave.
Define each of the parameters in the equation.

Transmission Modes of Communicating Devices


Transmission modes refer to the ways in which data is transmitted between devices in a
network. There are three primary transmission modes: simplex, half-duplex, and full-duplex.

1. Simplex Mode:
○ Description: Data flows in one direction only. One device is the transmitter
and the other is the receiver.
○ Examples: Keyboard to computer, television broadcast.
○ Diagram:
2. Half-Duplex Mode:
○ Description: Data can flow in both directions, but not simultaneously.
Devices take turns transmitting and receiving.
○ Examples: Walkie-talkies, CB radios.
○ Diagram:
3. Full-Duplex Mode:
○ Description: Data can flow in both directions simultaneously. Both devices
can transmit and receive data at the same time.
○ Examples: Telephone conversations, modern Ethernet networks.

4. How many bits are there in physical address? In terms of addressing, what are the
types of addressing? Mention their purpose of uses.
A physical address, also known as a MAC (Media Access Control) address, is
typically 48 bits long.
ii) Physical Address Bits and Addressing Types

Physical Address: Identifies devices at the hardware level, typically using MAC addresses.

Logical Address: Identifies devices at the network layer, usually with IP addresses, for
routing data packets.

Port Address: Specifies a specific endpoint or service on a device,

HTTP traffic typically uses port 80 and HTTPS traffic uses port 443

II) Its most basic form as a function of time (t) is y(t) = Asin(2πft + φ) = Asin(ωt + φ)

Where:

● A, amplitude, the peak deviation of the function from zero.


● f, ordinary frequency, the number of oscillations (cycles) that occur each second of
time.
● ω = 2πf, angular frequency, the rate of change of the function argument in units of
radians per second
● φ, phase, specifies (in radians) where in its cycle the oscillation is at t = 0.

6. State the ALOHA protocol with a suitable flow diagram.

The ALOHA protocol is a simple communication scheme used in networks for data packet
transmission. It allows multiple users to access a shared communication channel. There are
two types of ALOHA protocols: Pure ALOHA and Slotted ALOHA.

Pure ALOHA Protocol-Pure ALOHA allows users to transmit data at any time, but if a
collision occurs (two or more users transmit at the same time), the data must be
retransmitted after a random time delay. Flow Diagram of Pure ALOHA

1. Start: The user has data to send.


2. Transmit Data: Send data packet.
3. Wait for Acknowledgment: Wait for an acknowledgment (ACK) from the receiver.
4. ACK Received?
○ Yes: Transmission successful, end process.
○ No: Collision detected, go to step 5.
5. Wait Random Time: Wait for a random backoff time.
6. Retransmit Data: Go to step 2.

Slotted ALOHA Protocol


Slotted ALOHA improves upon Pure ALOHA by dividing the time into slots and requiring that
data transmission start at the beginning of a slot, reducing the chance of collisions.

Flow Diagram of Slotted ALOHA

1. Start: The user has data to send.


2. Wait for Time Slot: Wait for the beginning of the next time slot.
3. Transmit Data: Send data packet at the beginning of the time slot.
4. Wait for Acknowledgment: Wait for an acknowledgment (ACK) from the receiver.
5. ACK Received?
○ Yes: Transmission successful, end process.
○ No: Collision detected, go to step 6.
6. Wait Random Time Slots: Wait for a random number of time slots.
7. Retransmit Data: Go to step 2.

7. Suppose an IP datagram arrives at a router with a TTL field value of zero. What
will the router do?

TTL Field Value of Zero

● Router's Response: When an IP packet arrives at a router with TTL set to zero:
○ Action: The router discards the packet.
○ Reason: Prevents the packet from looping indefinitely.
○ Feedback: Sends an ICMP Time Exceeded message to the sender.
This ensures network stability and prevents packets from causing unnecessary congestion.

8. ii) How many bits are there with IPv4 addressing? How to represent an IPv4 address
in dotted decimal format? Mention the highest valued and lowest valued IPv4 address
in dotted decimal format. iii) Explain, what type of addresses are used in a LAN
without having a internet connection? iv)How a router works in a network?

ii) IPv4 Addressing


1. Number of Bits: 32 bits.
2. Representation in Dotted Decimal Format:
○ Example: 192.168.1.1
3. Highest and Lowest Valued IPv4 Address:
○ Highest Valued Address: 255.255.255.255
○ Lowest Valued Address: 0.0.0.0

iii) Addresses Used in a LAN Without Internet Connection


In a LAN without an internet connection, private IP addresses are typically used.

Common Private IP Ranges:

● Class A: 10.0.0.0 to 10.255.255.255


● Class B: 172.16.0.0 to 172.31.255.255
● Class C: 192.168.0.0 to 192.168.255.255

iv) How a Router Works in a Network


A router is a device that forwards data packets between computer networks. It performs
several key functions:

● Packet Forwarding: Routes data packets based on destination IP addresses.


● Routing Tables: Stores and updates information on the best paths for packet
delivery.
● Network Segmentation: Divides networks into smaller subnets for security and
efficiency.
● Address Translation: Converts private IP addresses to public IPs and vice versa
using NAT.
● Traffic Management: Manages traffic.

IPv4 IPv6

IPv4 has a 32-bit address length IPv6 has a 128-bit address length

In IPv4 end to end, connection In IPv6 end-to-end, connection integrity is


integrity is Unachievable Achievable

It can generate 4.29×109 address The address space of IPv6 is quite large it can
space produce 3.4×1038 address space

Address representation of IPv4 is Address Representation of IPv6 is in


in decimal hexadecimal

In IPv4 checksum field is In IPv6 checksum field is not available


available

IPv4 has a header of 20-60 bytes. IPv6 has a header of 40 bytes fixed

IPv4 can be converted to IPv6 Not all IPv6 can be converted to IPv4

IPv4 consists of 4 fields which IPv6 consists of 8 fields, which are separated by
are separated by addresses dot a colon (:)
(.)

Example of IPv4: 66.94.29.13 Example of IPv6:


2001:0000:3238:DFE1:0063:0000:0000:FEFB

Aspect Dynamic Routing Static Routing

Routing Automatically updates Requires manual configuration and


Updates routing tables updates

Adaptability Adjusts to changes in Routes remain unchanged until


network topology manually updated

Scalability Scales well in large, dynamic More suitable for smaller, stable
networks networks

9. Describe the IPv4 header format with a suitable diagram


VERSION: Version of the IP protocol

HLEN: IP header length .

Type of service: Low Delay, High Throughput, Reliability

Total Length: Length of header + Data

Identification: Unique Packet Id for identification

Flags: 3 flags of 1 bit each : reserved bit (must be zero), do not fragment flag, more
fragments flag (same order)

Fragment Offset: Specifies the position of the fragment in the original packet.

Time to live: Limits a packet's lifetime to prevent indefinite looping.

Protocol: Name of the protocol to which the data is to be passed

Header Checksum: header checksum for checking errors in the datagram header

Source IP address: 32 bits IP address of the sender

Destination IP address: 32 bits IP address of the receiver

Option: Optional information such as source route, record route.

Aspect Symmetric Cryptography Asymmetric Cryptography

Key Usage Uses one shared secret Uses a pair of keys: a public key for
key encrypting and a private key for
decrypting.

Key Both parties need the One key (the public key) is freely
Distribution same key, securely distributed, while the other (the private
shared. key) is kept secret.

Efficiency Fast and efficient for Slower, especially with large data.
large data.

Security Prone to key sharing Enhanced security as private keys


risks. remain secret.

Scalability More scalable for large May have scalability issues with large
volumes of data. datasets.

Resource Requires fewer Requires more computational


Efficiency computational resources.
resources.

Secure Key Not applicable; key Enables secure key exchange without
Exchange exchange is a challenge. prior interaction.

Non- Not applicable; does not Provides non-repudiation capabilities


Repudiation provide non-repudiation. for message authenticity.

Proxy server firewell

A firewall proxy provides security by controlling the information going in and out of the
network. Firewall proxy servers filter, cache, log, and control requests coming from a client to
keep the network secure and free of intruders and viruses. Proxy firewall has its own IP
(internet protocol) address so that internal network never makes a direct connection with
outside internet. Since it monitors information at the application level, it is also known as
application firewall.

How proxy firewall handles requests from the internal network :

1. The proxy firewall acts as intermediary between trusted internal network and outside
internet.
2. If computers in internal network wish to make a connection with outside internet, they
first communicate with the proxy.
3. Proxy then forwards data from internal network to the internet and sends data
received from internet to internal network.
4. In this way the proxy firewall shields internal network from intruders in the outside
internet and prevents direct connections between internal network and internet.

10. Mention and describe in brief about the system calls using UDP for client and
server processes in client-server paradigm.
System Calls using UDP for Client and Server Processes:

Server Process
1. socket():
○ Description: Creates a new socket.
○ Purpose: Establishes a socket for communication
2. bind():
○ Description: Binds the socket to a specific port number and IP address.
○ Purpose: Associates the socket with the server's address and port number
3. recvfrom():
○ Description: Receives a datagram from a client.
○ Purpose: Waits for a datagram from a client and captures the client's address
for sending responses.
4. sendto():
○ Description: Sends a datagram to a client.
○ Purpose: Sends a response datagram back to the client using the client's
address obtained from recvfrom().
5. close():
○ Description: Closes the socket.
○ Purpose: Releases the socket and frees up resources.

Client Process
1. socket():
○ Description: Creates a new socket.
○ Purpose: Establishes a socket for communication
2. sendto():
○ Description: Sends a datagram to the server.
○ Purpose: Sends a datagram containing data to the server's address and port.
3. recvfrom():
○ Description: Receives a datagram from the server.
○ Purpose: Waits for a response datagram from the server.
4. close():
○ Description: Closes the socket.
○ Purpose: Releases the socket descriptor and frees up resources.

11. Describe the leaky bucket mechanism toward traffic shaping with a suitable
diagram.
The leaky bucket mechanism is a traffic shaping algorithm used in computer networks to
control the rate at which packets are transmitted. It helps to prevent network congestion.

Description
The leaky bucket algorithm can be visualized using a simple analogy of a bucket with a
small hole at the bottom:

1. Bucket: Represents the buffer or queue where incoming packets are stored.
2. Water (Packets): Represents the data packets arriving at the bucket.
3. Hole: Represents the fixed rate at which packets are transmitted from the
bucket.
● How It Works:
1. Arrival: Packets arrive and are added to the bucket (queue) at varying rates.
2. Leak: Packets are transmitted (leak out) from the bucket at a constant rate.
3. Overflow: If the bucket is full and more packets arrive, the excess packets are
discarded (representing packet loss).

12. Describe the token bucket mechanism toward traffic shaping with a suitable
diagram.

Token Bucket Mechanism for Traffic Shaping:

● Description:

○ The token bucket is another method for controlling data transmission rates in
a network. It uses tokens to regulate when and how much data can be sent.
● The token bucket mechanism can be visualized using the analogy of a bucket that
holds tokens:

○ Bucket: Represents a container that holds tokens.


○ Tokens: Represent the permission to send a certain amount of data
○ Packet: Represents the data that needs to be transmitted.
● Operation:

○ Token Generation: Tokens are generated at a constant rate and stored in the
token bucket.
○ Data Transmission: Data packets can only be sent if there are enough tokens
available in the bucket.
○ Token Consumption: Tokens are consumed as data packets are transmitted.
If no tokens are available, transmission is delayed until tokens accumulate.

Write down the structure of a web page.

<!DOCTYPE html>
<!-- Specifies the document type and version of HTML (HTML5) →
<html>
<!-- Root element of the HTML document -->
<head>
<!-- Container for metadata and links to external resources →
<meta charset="UTF-8">
<!-- Defines the character encoding for the document as UTF-8 -->
<title>Document</title>
<!-- Sets the title of the document, shown in the browser's title bar or tab -->
</head>
<body>
<!-- Main content of the HTML document -->
</body>
</html>
<!-- Closes the root element of the HTML document -->

Some common HTML tags include:

● <html>: Defines the root of an HTML document.


● <head>: Contains meta-information about the document.
● <title>: Sets the title of the document (shown in the browser tab).
● <body>: Contains the content of the document visible to users.
● <h1>, <h2>, ..., <h6>: Define headings of different levels.
● <p>: Defines a paragraph.
● <a>: Defines a hyperlink.
● <img>: Embeds an image.
● <li>: list element

Short HTML Program:


<!DOCTYPE html>
<html>
<head>
<title>Sample HTML Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is a sample HTML page.</p>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul> </body> </html>

HTTP (Hypertext Transfer Protocol):

● Definition:
● HTTP stands for HyperText Transfer Protocol.
● It is a protocol used to access the data on the World Wide Web (www).
● The HTTP protocol can be used to transfer the data in the form of plain text,
hypertext, audio, video, and so on.
● Uses:
○ Web Communication: it helps web browsers and servers talk to each
other.
○ Retrieving Content: Helps users get web pages, images, videos, etc.,
from servers.
○ Independent Requests: Each user request is separate,
○ Foundation of Web Services: Forms the basis for many web
applications and APIs.

WWW (World Wide Web):


● Definition: World Wide Web, which is also known as a Web, is a collection of
websites or web pages stored in web servers and connected to local
computers through the internet.
● Uses:
○ Information Access: Provides access to vast amounts of information
stored on web servers.
○ Hyperlink Navigation: Allows users to move between web pages by
clicking links.
○ Multimedia Content: Hosts text, images, videos, and interactive
applications.
○ Global Connectivity: Connects users worldwide, facilitating
communication and sharing of information.

5. If data string is: 1001101 then derive redundant bits are to be added to the data
string and place them to their right places to generate the code to be transmitted.

You might also like