0% found this document useful (0 votes)
31 views22 pages

Cse 325

Uploaded by

223009012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views22 pages

Cse 325

Uploaded by

223009012
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

COMPUTER NETWORK

CHAPTER:1

1. Definition:

● Network-A collection of interconnected devices that share data and


resources.

● Protocols-Rules and standards that enable communication between


networked devices.

● Access Networks-The part of a network that connects end-users to


the network core, typically including devices like routers, modems, and
Wi-Fi access points.

● Network Core- The network core is the central part of a network,


composed of interconnected routers that link multiple networks
together, forming a network of networks.

● WLAN-A network that allows devices to connect wirelessly within a


limited area, like a home, school, or office, typically using Wi-Fi
technology.

● Wireless Access Networks:Wireless Access Networks are networks


that use wireless connections to link end systems (such as laptops,
smartphones, or IoT devices) to a router via a base station, often
called an access point.
● Guided Media: Physical media that guide data signals from one place to
another, such as twisted-pair cables, coaxial cables, and optical fiber.

● Unguided Media:Wireless media that transmit data without a physical


path, including radio, microwave, and satellite transmission.

● Wireless Radio: It is a type of unguided media where data is


transmitted over various frequency bands. It is broadcast
communication and operates in half-duplex (one-way at a time).
effected by Reflection, obstruction by objects and interface/noise
from other signals.

● Packet switching-a method where hosts break application-layer


messages into smaller packets. The network then forwards these
packets from one router to the next across various links, guiding each
packet along a path from the source to the destination.

● Circuit Switching:A method of data transmission where a dedicated


communication path is established between the sender and receiver
for the duration of the communication session. This provides
guaranteed, circuit-like performance with no sharing, so resources
remain idle if unused. Commonly used in traditional telephone networks.

● FDM-A technique that divides the available frequency range into


separate channels, allowing multiple signals to be sent simultaneously
over the same media.

● TDM- A technique that divides time into slots and assigns each channel
a unique time slot, allowing multiple signals to share the same media
sequentially.
● Loss- refers to the dropping of packets that are queued in a router’s
buffer while awaiting transmission. Packet loss occurs when the queue
length increases because the arrival rate of packets exceeds the
oservice rate.

● Delay: is the total time taken for a packet to travel from the source to
the destination.

● Throughput:is the rate at which data (in bits per time unit) is
successfully sent from the sender to the receiver over a network.

● Packet Sniffing- a process where a device on a network captures and


reads data packets that are being sent between other devices.

● IP spoofing: when someone sends data over the internet using a fake
IP address to hide their identity or pretend to be someone else.

● DoS:Denial of Service (DoS) is a cyber attack that makes a computer


or network unavailable to users by overwhelming it with too many
requests, preventing it from functioning properly.

● Encapsulation- refers to the process of wrapping data with the


necessary protocol information before it is transmitted over a
network.
2. Most of the network protocols are designed using human protocol.
Give an example using TCP protocol.

An example of a human protocol similar to TCP could be a phone


conversation:

1. Connection setup: One person calls, and the other picks up and says
"Hello" — similar to the TCP handshake.
2. Data exchange: They start talking back and forth, taking turns — like
exchanging packets in TCP.
3. Connection termination: When finished, they say "Goodbye" and hang
up — like the TCP connection teardown.

3.Give examples of two Physical media in detail.

Coaxial Cable:

Coaxial cable consists of two concentric copper conductors, with one acting
as the core and the other as a surrounding shield. This design allows for
bidirectional communication and supports broadband transmission, where
multiple frequency channels can be transmitted over the same cable. Coaxial
cables are capable of delivering hundreds of Mbps per channel, making them
suitable for cable television and internet connections.

Fiber Optic Cable:

Fiber optic cables use glass fibers to carry data as light pulses, where each
pulse represents a bit. They support high-speed, point-to-point
transmission at speeds of tens to hundreds of Gbps. Fiber optic cables also
have a low error rate, as they can be spaced far apart with minimal need for
repeaters, and they are immune to electromagnetic interference, making
them ideal for long-distance and high-speed data transmission.
4. What is store and forwarding in packet switch?

Store and Forwarding in packet switching means a router must receive and
store the entire packet before forwarding it to the next link.

5. Packet switching vs Circuit switching.

6. How networks of networks work. Show the diagram using ISP,


Content provider, IXP,
Regional ISP, Access net.
The Internet is a "network of networks" where individual users connect
through local ISPs (access networks) to larger regional ISPs, which then
connect to Tier 1 ISPs that form the Internet backbone. Data travels across
these layers, often passing through IXPs (Internet Exchange Points) where
networks exchange traffic directly. Major content providers like Google
connect directly to ISPs and IXPs, allowing faster data delivery. This
layered structure enables efficient, scalable, and resilient data routing
across the globe.

7.Calculating total delay for one single packet. (Math)


dnodal = dproc + dqueue + dtrans + dprop

8.What are the lines of defense for Security?

1. Authentication: Verifying identity, such as through passwords,


biometrics, or hardware like SIM cards in cellular networks, which
provides hardware-based identity. Traditional internet lacks this
hardware assist.
2. Confidentiality: Ensuring data privacy through encryption, so only
authorized parties can access information.
3. Integrity Checks: Using digital signatures to detect or prevent data
tampering, ensuring that information remains unchanged.
4. Access Restrictions: Controlling network access with tools like
password-protected VPNs, which limit access to only authorized users.
5. Firewalls: Specialized devices that filter incoming traffic, blocking
unauthorized senders, receivers, and applications. Firewalls can also
detect and respond to denial-of-service (DOS) attacks.
9.
10.What are the five layers in the Internet protocol stack? What are
the principal responsibilities of each of these layers?

● Application Layer:
The Application Layer provides network services to user
applications, managing protocols like HTTP and FTP. It
handles data formatting, encryption, and session
management to ensure user-friendly communication.
● Transport Layer:
The Transport Layer ensures reliable end-to-end
communication by segmenting data into packets and
providing error detection and correction. It uses
protocols such as TCP for reliability and UDP for
faster, connectionless communication.
● Network Layer:
The Network Layer determines the best path for data transmission,
managing IP addressing and routing between networks. It is
responsible for packet forwarding and fragmentation to efficiently
reach the destination.
● Data Link Layer:
The Data Link Layer facilitates node-to-node data transfer, ensuring
error detection and correction over a link. It frames data into packets
called frames and manages access to the physical medium, using MAC
addressing for correct delivery.
● Physical Layer:
The Physical Layer transmits raw bitstreams over physical media,
defining the electrical, optical, or radio signals used. It specifies
hardware standards, including voltage levels and connectors, to enable
data transmission between devices.
11.What is an application-layer message? A transport-layer segment? A
network-layer datagram? A link-layer frame?

Application-Layer Message (M):


This is the data created by an application (like an email or a web request)
that users interact with.

Transport-Layer Segment ([Ht | M]):

The transport layer takes the application message M and adds a transport
header Ht​to it, forming a segment [Ht∣M]

Network-Layer Datagram ([Hn | [Ht | M]]):


The network layer encapsulates the transport segment [Ht∣M] M] with a
network header Hn​, creating a datagram [Hn∣[Ht∣M]. This header contains
routing information like IP addresses for sending the data across networks.

Link-Layer Frame ([Hl | [Hn | [Ht | M]]]):


The link layer takes the network datagram [Hn∣[Ht∣M] and adds a link
header Hl to it, resulting in a frame [Hl∣[Hn∣[Ht∣M].This header is used for
data transfer over the physical link, including MAC addresses.
CHAPTER 2:

1. Details

Peer-to-Peer (P2P) Architecture

● Definition: In P2P architecture, there is no centralized server.


Instead, all participants, or "peers," are both clients and servers to
each other.
● Characteristics:
○ No Always-On Server: Peers connect and disconnect as needed.
○ Direct Communication: Peers directly communicate with each
other.
○ Self-Scalability: New peers increase both service capacity and
demand.
○ Dynamic Nature: Peers may have changing IP addresses and
intermittent connectivity, requiring complex management.
● Example: BitTorrent is a popular P2P protocol for file distribution.
Peers (connected users) share parts of files, downloading and
uploading simultaneously to balance load.

Client-Server Architecture

Definition: The client-server model involves dedicated servers that provide


services to clients.Architecture

Characteristics:

● The server acts as a central, always-on host with a permanent IP


address, often located in data centers to support scalability and high
demand. The server handles requests and provides resources or data
to clients, which connect as needed.
● Clients may be intermittently connected, and they often have dynamic
IP addresses, which change over time. They rely on the server for
communication and do not communicate directly with each other.
● This architecture is commonly used for applications like HTTP (web
browsing), IMAP (email), and FTP (file transfer)

HTTP (Hypertext Transfer Protocol)

HTTP is the fundamental protocol of the web, operating on a client-server


model where browsers request and display web content from servers. HTTP
uses TCP for reliable data transfer, and connections can be persistent or
non-persistent. A non-persistent connection opens and closes for each
object request, while a persistent connection allows multiple objects to be
sent over a single connection. HTTP is stateless, meaning it doesn’t retain
session information between transactions.

Cookies

Cookies are small data files stored on a client’s device by a web server to
maintain state across HTTP sessions. They enable functionalities like
authentication, shopping carts, and personalized experiences by retaining
information about user interactions. However, cookies also raise privacy
concerns, especially with third-party tracking cookies, which can collect data
across multiple sites.
Web Caches

Web caches, or proxy servers, store frequently requested content to reduce


server load and improve response time for clients. When a user requests
content, the browser first checks the cache, retrieving it directly if it’s
available. This reduces bandwidth usage, speeds up load times, and minimizes
the need to re-fetch the same data from origin servers, benefiting both
users and content providers.

Non-Persistent HTTP:

● Each request/response pair requires a new TCP connection.


● Increases latency when multiple objects need to be fetched.
● Each connection setup and teardown adds round-trip time and
overhead, reducing efficiency.

Persistent HTTP:

● A single TCP connection is reused for multiple requests.


● Reduces round-trip time and overhead, improving performance.
● Especially beneficial when retrieving multiple objects from the same
page.

Mail Servers

● Mail servers handle the storage and forwarding of email messages.


Each mail server includes:
○ User Mailbox: Where incoming messages for each user are
stored, waiting to be accessed by the user.
○ Message Queue: An outgoing queue containing messages to be
sent to other mail servers.
● When sending emails, a mail server acts as the client, whereas the
receiving mail server operates as the "server" in the SMTP interaction.

Simple Mail Transfer Protocol (SMTP) Overview

The Simple Mail Transfer Protocol (SMTP), as defined by RFC 5321, is a


protocol used to transfer email messages reliably between mail servers over
TCP, typically through port 25. SMTP functions as a direct transfer
protocol, where the sending mail server initiates a connection (acting as the
client) to the receiving mail server.

SMTP operates in three main phases:

1. SMTP Handshaking (Greeting)


○ Establishes the connection between the sending and receiving
servers, ensuring both are ready for message transfer.
2. SMTP Message Transfer
○ During this phase, the email message is transferred from the
sender to the receiver.
3. SMTP Closure
○ The connection is closed once the message has been successfully
delivered.

SMTP uses ASCII commands and server responses include status codes,
ensuring clear and reliable email transmission.

DNS (Domain Name System)

DNS translates human-readable domain names into IP addresses, enabling


the routing of requests across the internet. It functions as a distributed
system with hierarchical servers, making it highly scalable. DNS caching is
used to reduce latency, and it supports both local and global networked
environments.

BitTorrent

BitTorrent is a popular P2P protocol for sharing large files by dividing them
into smaller pieces, or "chunks," that peers can download from each other
simultaneously. Peers obtain a list of available chunks from a central tracker,
and as they download chunks, they also share them with others. This
collaborative distribution reduces strain on individual servers and speeds up
file-sharing processes.

Content Delivery Network (CDN)

CDNs are networks of distributed servers that store and deliver web
content to users from locations closer to them geographically. This
minimizes latency and increases the speed of content delivery, making CDNs
ideal for video streaming and web traffic management for services like
Netflix and YouTube, especially at scale.

Video Streaming

Video streaming involves delivering continuous video content in real-time,


where data is buffered as it arrives to ensure smooth playback. Solutions
like Dynamic Adaptive Streaming over HTTP (DASH) adjust video quality to
match available bandwidth, minimizing buffering and improving user
experience. Video streaming is highly bandwidth-intensive, making it a major
component of today’s internet traffic.
2. How does Netflix work?

Netflix works by storing copies of content (like "Mad Men") on its global
OpenConnect Content Delivery Network (CDN) nodes. When a subscriber
requests a show or movie, Netflix provides a manifest file that lists available
sources for the requested content. The client device uses this manifest to
retrieve content at the highest quality that the network can support. If the
network path is congested, the client may select a different bitrate or even
a different copy of the content from another server, ensuring smooth
playback.

3.What is CDN? What are the challenges of CDN? How to resolve


them?

A Content Delivery Network (CDN) is a network of geographically


distributed servers that delivers web content quickly to users by storing
copies of data closer to their location.

CDN Challenges

1. Scalability: Serving millions of users from a single server causes


congestion and increases latency.
2. Reliability: Centralized servers are prone to failures and high network
traffic.

Solutions

1. Enter Deep: Deploy servers within local access networks, close to


users (e.g., Akamai's 240,000+ servers worldwide), reducing latency
and congestion.
2. Bring Home: Use fewer, larger clusters near major networks (e.g.,
Limelight), providing regional coverage and reliability.
4.What are the challenges of streaming stored video? How dash solve
those issues?

Streaming stored video faces several challenges, especially given that video
streaming accounts for around 80% of Internet traffic. The main issues are:

1. Scalability: Reaching potentially billions of users simultaneously


requires vast, distributed infrastructure to handle the demand.
2. Heterogeneity: Users have varied devices and network conditions (e.g.,
mobile vs. wired, high vs. low bandwidth).
3. Bandwidth Variability: Network congestion can cause fluctuations in
bandwidth, leading to interruptions or poor video quality.
4. Continuous Playout: Ensuring smooth playback is difficult due to
variable network delays (jitter) and potential packet loss.
5. Interactivity: Users expect functions like pause, rewind, and
fast-forward without delay.

How DASH Solves These Issues

Dynamic Adaptive Streaming over HTTP (DASH) addresses these challenges


by encoding videos at multiple quality levels, each with different bit rates.
The video is divided into short segments, and the client requests segments
dynamically based on current network conditions. If bandwidth is high, the
client chooses a higher-quality segment; if bandwidth drops, it switches to a
lower-quality version. This adaptive method allows DASH to provide
consistent video playback despite network variability and ensures smooth
streaming across diverse devices and conditions.
5.What is bit torrent? How file distribution is done in bit torrent?

BitTorrent is a peer-to-peer (P2P) file distribution protocol that allows


users to share files directly with each other, enhancing download speeds and
reducing server load.

File distribution in BitTorrent occurs through a decentralized peer-to-peer


(P2P) system where a file is divided into smaller chunks, and a torrent file is
created that contains metadata about these chunks and a tracker server.
When a user wants to download the file, they use a BitTorrent client to open
the torrent file, which connects to the tracker to obtain a list of active
peers sharing the same file. The peer then downloads chunks simultaneously
from multiple peers while uploading the chunks it has already received to
others. The client typically prioritizes downloading rare chunks first to
maximize efficiency. Once the peer has downloaded all chunks and completed
the file, it can choose to leave the torrent or continue sharing it. This
dynamic participation enables efficient file sharing, leveraging the collective
bandwidth of multiple users while reducing reliance on a central server.

6.Consider what happens when a browser (that is, an HTTP client),


running on some user’s host, requests the URL www.someschool.edu/
index.html?

When a browser requests www.someschool.edu/index.html, it first


extracts the hostname (www.someschool.edu) from the URL and sends it
to the client side of the DNS application. The DNS client then queries a
DNS server to resolve this hostname to an IP address. Once the browser
receives the IP address in the DNS reply, it initiates a TCP connection to
the HTTP server at that IP address on port 80, preparing to request the
desired webpage.
7. Explain the hierarchical database in DNS.

he DNS hierarchy is a distributed system that resolves domain names to IP


addresses. At the top are Root DNS Servers, which direct queries to
Top-Level Domain (TLD) servers like .com or .edu. TLD servers then refer
queries to Authoritative DNS Servers that hold specific IP addresses for
domains within that TLD. For example, to find the IP address for
www.amazon.com, a client first queries a root server, which directs it to a
.com server; the .com server then points to Amazon's authoritative server,
which provides the final IP address.

8.Differences and similarities between HTTP and SMTP?


9.Alice sends e-mail to Bob. Please write down the scenario of SMTP
protocol with diagram.

When Alice sends an email to Bob, she uses her User Agent (UA) to compose
the message and sends it to her mail server via SMTP, placing it in the
message queue. Alice's mail server then establishes a TCP connection to
Bob's mail server, transmitting the message using SMTP. Bob's mail server
receives the email and stores it in Bob's mailbox. Later, Bob uses his own UA
to retrieve and read the email. This process demonstrates the SMTP
protocol's role in transferring emails between servers.

10.Components of Email

1. User Agents: Applications (e.g., Outlook, iPhone mail) that allow users
to compose, edit, and read emails. They manage the user's mailbox for
incoming and outgoing messages.
2. Mail Servers: Servers that store incoming messages in user mailboxes
and manage outgoing messages in a queue. They facilitate email
transmission.
3. Simple Mail Transfer Protocol (SMTP): A protocol used by mail
servers to send emails, enabling communication between the sending
and receiving servers.
11.
12. Write down how web caches work. Why we need web caching?

How Web Caches Work

1. Client Request: The client sends an HTTP request to the web cache
instead of the origin server.
2. Cache Check:
○ If the resource is cached, the cache serves the stored content
directly to the client.
○ If not, the cache forwards the request to the origin server.
3. Origin Server Response: The origin server sends the response back to
the cache, which stores it for future requests and relays it to the
client.
4. Subsequent Requests: Future requests for the same resource are
served directly from the cache.

Why We Need Web Caching

1. Reduce Response Time: Caches provide quicker access to frequently


requested content by being closer to clients.
2. Decrease Traffic: Caching reduces the number of requests to the
origin server, conserving bandwidth.
3. Improve Content Delivery: Helps less capable content providers
deliver content more effectively.
4. Support Scalability: Enables better handling of high traffic loads,
improving overall performance.

13.. What cookies can be used for? Why people don’t want to accept
cookies from unknown websites.

Cookies are small pieces of data stored on a user's device by a web browser,
and they serve several purposes, including authorization, managing shopping
carts, providing personalized recommendations, and maintaining user session
states (such as for web email). However, many people are hesitant to accept
cookies from unknown websites due to privacy concerns. Cookies can enable
websites to gather extensive information about users’ browsing habits, and
third-party persistent cookies (tracking cookies) can track user identities
across multiple sites, raising issues related to data privacy and security.

You might also like