Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views2 pages

Computer Networks

The document discusses routing algorithms, specifically comparing distance vector routing and link state routing, highlighting their mechanisms and scalability. It also covers the Real-Time Streaming Protocol (RTSP) and its role in multimedia networking, enabling session control and flexible commands for media playback. Additionally, it addresses the functionality of sockets and the OpenFlow protocol in Software-Defined Networking (SDN), emphasizing centralized control and dynamic configuration of network devices.

Uploaded by

akku9012735311
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)
11 views2 pages

Computer Networks

The document discusses routing algorithms, specifically comparing distance vector routing and link state routing, highlighting their mechanisms and scalability. It also covers the Real-Time Streaming Protocol (RTSP) and its role in multimedia networking, enabling session control and flexible commands for media playback. Additionally, it addresses the functionality of sockets and the OpenFlow protocol in Software-Defined Networking (SDN), emphasizing centralized control and dynamic configuration of network devices.

Uploaded by

akku9012735311
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/ 2

Routing Algorithms and distance vector routing v/s link state routing RTSP and its Role in Multimedia

Multimedia Networking and Enables Control


Routing algorithms are used to determine the best path for data packets to Over Streaming Media
travel from a source node to a destination node in a network. There are Real-Time Streaming Protocol (RTSP) is a client-server
two main types of routing algorithms: distance vector routing and link state application-layer protocol designed for controlling streaming
routing. media sessions. It provides a way to establish, control, and
Distance Vector Routing v/s Link State Routing terminate streaming media sessions.
Routers exchange routing tables with their neighbors.// Routers flood their Role in Multimedia Networking:- 1.Session Control: RTSP
complete link-state database to all other routers in the network./// Routers enables clients to control the playback of streaming media.
update their routing tables based on the information received from their Clients can start, pause, stop, and seek within a streaming
neighbors.//Routers build a complete picture of the network topology and media session. 2.Flexible Control: RTSP supports various
calculate the shortest paths to all destinations./// Each router only needs to commands like PLAY, PAUSE, TEARDOWN, and RECORD, allowing
store information about its neighbors and the distances to other networks for dynamic control over the streaming session. 3.Multicasting
through those neighbors.//Each router needs to store the complete link- Support: RTSP can be used with multicast protocols to
state database, which can be larger, efficiently deliver streaming media to multiple clients
especially in large networks.///Less scalable in large networks due to the simultaneously. 4.Scalability: RTSP can handle large-scale
potential for routing loops and slower convergence times.// More scalable streaming scenarios by allowing for multiple clients to access
in large networks due to faster convergence and less reliance on neighbor the same stream.
relationships.///Distributed algorithm where each router independently
calculates its routing table.// Centralized algorithm where a single router
(the Designated Router) calculates the shortest paths for the entire RTSP Enables Control Over Streaming Media:- 1.Client-Server
network./// Example Protocols:- RIP (Routing Information Protocol) // OSPF Model: RTSP operates on a client-server model. A client initiates
(Open Shortest Path First) a session with a server and sends commands to control the
playback of the media stream.
RIP Message 2.Session Description Protocol (SDP): RTSP uses SDP to
RIP (Routing Information Protocol) is a distance vector routing protocol used describe the media streams and their characteristics, such as
to exchange routing information between routers . It uses a hop count codec, bitrate, and resolution. 3.Command-Based Control:
metric to determine the shortest path to a destination network. Clients send commands to the server to control the
Types of Messages in RIP:- 1.Request: This message is sent by a router to streaming session. These commands include:
request routing information from its neighbors. It contains the IP addresses i)PLAY: Starts playback of a media stream. ii)PAUSE: Pauses
of the networks for which the requesting router wants to know the best playback of a media stream. iii)TEARDOWN: Terminates a
route. 2.Response: This message is sent by a router in streaming session.
response to a request message. It contains the IP addresses of the iv)RECORD: Records a streaming session. v)SET_PARAMETER: Sets
destination networks, the hop count to each network, and the netmask parameters for a media stream.
of each network. RIP Message Format:- It has the following format:
a)Header: 1.Version:1 2.Command:1 (Request), 2 (Response)
3.Address Family: 2 (IPv4) 4.Authentication Type: 0 (None)
5.Authentication Code: 0 Streaming Stored Audio and Video in Multimedia Networking
b)Entries:-
Streaming Stored 1.Address:
Audio and IP address
Video involves of the destination
delivering audio and network. 2.Metric: Hop count to the destination network. 3.Mask: Netm
Multicasting Routing video content to clients over a network without requiring the
It is a networking technique that enables a single data packet to be sent to entire file to be downloaded first. This allows for immediate
multiple destinations simultaneously. This is achie ved by creating a playback of the content, even before the entire file has been
multicast group, which is a logical grouping of network devices that share a transferred.
common interest in receiving the same data. When a data packet is sent to Key Challenges:- 1.Latency: Ensuring low latency is crucial for a
a multicast group, it is replicated and forwarded only to the members of smooth viewing experience. Network congestion, server load, and
that group, reducing network traffic and bandwidth consumption. client processing power can contribute to latency. 2.Buffering:
Broadcast v/s Multicast Routing: Clients need to buffer the incoming data to smooth out any
All devices on the network//Only devices that have joined a specific variations in network bandwidth. Insufficient buffering can lead
multicast group///A single copy of the data packet is sent to each device on to interruptions in playback. 3.Quality of Service (QoS):
the network.//A single copy of the data packet is replicated and sent only to Maintaining consistent quality of service, including bitrate and
the members of the multicast group.///High network traffic as the same frame rate, is essential for a good viewing experience. Network
data is sent to all devices.//Lower network traffic as data is sent only to congestion and varying bandwidth conditions can impact QoS.
interested devices.///Inefficient use of bandwidth as data is sent to all 4.Scalability: Streaming platforms need to handle a large number
devices.//Efficient use of bandwidth as data is sent only to interested of concurrent users and adapt to varying traffic loads.
devices. 5.Security: Protecting the content from unauthorized access and
piracy is a significant concern. 6.Cost: Streaming requires
significant infrastructure and bandwidth, which can be
Services and issues of the link layer expensive.
The link layer, also known as the data link layer, is the second layer of the
OSI model. It provides services for reliable data transmission between
devices on the same network segment. Here are some of the key services (RTP) and (RTCP) and enhance the performance
provided by the link layer: RTP (Real-Time Protocol) is a protocol used for transporting real-
1. Framing: The link layer divides data into frames for transmission. Each time data like audio and video over packet-switched networks. It
frame contains a header, data, and a trailer. The header and trailer ensures synchronization and quality of service for these data
contain control information such as source and destination addresses, streams.
error-checking codes, and flow control information. RTCP (Real-Time Control Protocol) is a companion protocol to RTP
2. Physical Addressing: The link layer assigns physical addresses to network that provides feedback and control information for RTP sessions. It
devices. These addresses are used to identify devices on the same allows participants to monitor the quality of the media stream,
network segment. 3.Error Detection and Correction: The link layer uses report packet loss, and adjust their transmission rates.
various techniques such as parity checking, checksums, and cyclic RTP and RTCP enhance the performance :- 1.Synchronization:
redundancy checks (CRC) to detect and correct errors in data transmission. RTP uses time stamps and sequence numbers to synchronize the
4.Flow Control: The link layer regulates the flow of data between devices delivery of
to prevent congestion and data loss. 5.Media Access Control (MAC): The media packets, ensuring smooth playback. 2.Quality of Service
MAC layer controls access to the shared network medium. It uses (QoS): RTP can prioritize packets to ensure that critical data, like
protocols like Carrier Sense Multiple Access with Collision Detection video frames, are delivered first, even in congested network
(CSMA/CD) to ensure that only one device transmits at a time. Issues of conditions. 3.Error Detection and Correction: RTP can detect and
the link layer:- 1.Collisions: Multiple devices may attempt to transmit correct packet loss through retransmission or error correction
data at the same time, resulting in collisions. This can lead to data loss mechanisms. 4.Feedback and Control: RTCP allows participants
and reduced network performance. 2.Error Detection and Correction: to monitor the quality of the media stream and adjust their
Errors can occur during data transmission due to noise or other factors. transmission rates to optimize performance. 5.Multicasting
The link layer needs to be able to detect and correct these errors to ensure Support: Both RTP and RTCP support multicasting, enabling
reliable data transmission . 3.Flow Control: If data is transmitted too efficient delivery of media streams to multiple recipients.
quickly, the receiving device may not be able to process it, leading to buffer
overflow and data loss. The link layer needs to regulate the flow of data Generalized Forwarding in (SDN) and differ from traditional
to prevent this from happening. forwarding
Generalized forwarding in SDN is a more flexible approach that
Working of CSMA/CD allows the network controller to program the forwarding behavi
Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is or of network devices. The controller can dynamically update
a media access control (MAC) method used in Ethernet netw orks to the forwarding tables of devices to adapt to changing network
ensure efficient and fair sharing of the network medium. Here's how conditions or implement new network policies.
it works: In traditional networks, forwarding decisions are made by
a) Carrier Sense:- 1.Before transmitting data, a device listens to the individual network devices based on static routing tables. This
network medium to check if it's idle. 2.If the medium is idle, the device approach is inflexible and difficult to manage. Key
proceeds to the next step. 3.If the medium is busy, the device waits differences between generalized forwarding and traditional
until it becomes idle. network forwarding:-
b) Multiple Access:- 1.If the medium is idle, multiple devices can attempt to 1. Control Plane vs. Data Plane Separation:- i)Traditional: The
transmit data simultaneously. control plane (routing decisions) and data plane (packet
c) Collision Detection:- 1.While transmitting, each device continues to forwarding) are tightly coupled within network devices.
listen to the medium. 2.If a collision is detected (i.e., another device is ii)Generalized Forwarding: The control plane is separated from
also transmitting), both devices immediately stop transmitting and send a the data plane. A centralized controller makes global routing
jam signal. 3.After a random backoff period, both devices attempt to decisions and programs the data plane devices to implement
retransmit. those decisions. 2. Forwarding Flexibility: i)Traditional:
Working diagram:- Forwarding decisions are primarily based on destination IP
addresses, limiting the flexibility to control traffic flow.
ii)Generalized Forwarding: SDN allows for more flexible
forwarding decisions by matching on various packet header fields
and applying different actions. This enables fine-grained control
Working of parity, checksum, and CRC error over traffic flow and implementation of advanced network
Parity Checking:- Parity checking is a simple error detection technique that services. 3. Centralized Control:- i)Traditional: Network
adds an extra bit to a data byte. This bit is set to 1 or 0 to make the total devices make independent forwarding decisions based on their
number of 1s in the byte even or odd. The receiver can check the parity of local routing tables. ii)Generalized Forwarding: A centralized
the received byte to detect if an error has occurred. controller oversees the entire network and makes global
Checksum:- A checksum is a simple error detection technique that adds up routing decisions. This allows for better network-wide visibility
all the bytes in a message and stores the result in a checksum and control.
field. The receiver can calculate the checksum of the received message and 4. Programmability: i)Traditional: Network devices are typically
compare it to the checksum field. If the two checksums match, the configured using vendor-specific command-line interfaces, which
message is assumed to be error-free. Cyclic Redundancy Check (CRC):- can be complex and time-consuming. ii)Generalized Forwarding:
CRC is a more powerful error detection technique that uses a SDN uses open, programmable interfaces (like OpenFlow) to allow
mathematical algorithm to generate a checksum. The CRC checksum is network administrators to define and implement custom network
appended to the end of the message. The receiver can calculate the policies and behaviors. 5. Scalability:- i)Traditional: As networks
CRC of the received message and compare it to the CRC checksum. If grow larger,
the two checksums match, the message is assumed to be error-free. managing and configuring network devices becomes increasingly
Example:- Let's say we want to send the byte 1011001 using parity complex. ii)Generalized Forwarding: The centralized control
checking. We can add a parity bit to make the total number of 1s even. So, plane in SDN simplifies network management and allows for
the transmitted byte would be 10110010. If the receiver receives the byte easier scaling of the network.
10110110, the parity check will fail, indicating that an error has
occurred.
Key Responsibilities and Functions of an SDN Controller
1.Centralized Control: The SDN controller acts as a central point of
control for the network. It collects information about the network Sockets and Address Structures
topology and traffic flows. 2.Policy Enforcement: The controller can Sockets are endpoints for communication
enforce network policies, such as traffic shaping, access control, and between processes running on different
quality of service. 3.Dynamic Configuration: The controller can machines over a network. They act as a
dynamically update the configuration of network devices to adapt to software interface that allows applications
changing network conditions. 4.Fault Detection and Recovery: The to send and receive data.
controller can monitor the network for failures and take corrective Address Structures are used to identify the
actions to restore network connectivity. 5.Security: The controller can specific network address of a process. They
implement contain information like IP address and port
security policies, such as firewall rules and intrusion detection systems. number.
Interaction with Network Devices:- The SDN controller interacts with Sockets and Address Structures Facilitate
network devices using standardized protocols like OpenFlow. The Network Communication:- 1.Socket
controller sends flow rules to the devices, which specify how to forward Creation: A process creates a socket using a
packets based on packet headers. The devices then apply these rules system call like socket(). This socket is
to forward packets accordingly. assigned a unique identifier. 2.Binding:
The socket is assigned a specific address and
OpenFlow Protocol port number using the bind() function. This
OpenFlow is a protocol that enables communication between an SDN allows the process to listen for incoming
controller and network devices. It defines a standard interface for connections or to connect to a remote
programming network devices. address. 3.Connection Establishment:
OpenFlow Message Structure:- An OpenFlow message consists of a i)For client-server communication, the
header and a payload. The header contains information about the client socket connects to the server socket
message type, length, and transaction ID. The payload contains the using the connect() function. This establishes
specific data for the message type. a connection between the two processes.
OpenFlow Message Types:- 1.Feature Request: The controller requests ii)For server-side communication, the listen()
information about the capabilities of the device. function is used to indicate that the server
2.Feature Reply: The device responds with its features and capabilities. socket is ready to accept incoming
3.Packet-In: The device sends a packet to the controller for further connections. The accept() function is then
processing or forwarding. 4.Flow Mod: The controller sends a flow rule used to accept a connection from a client.
to the device to instruct it how to forward packets. 5.Port Status: The 4.Data Transmission: Once a connection is
device sends notifications about port status changes. 6.Error: The established, data can be sent and
device sends error messages to the controller. received using functions like send() and
OpenFlow enables the controller to have fine-grained control over the recv(). Data is sent in packets, and the
forwarding behavior of network devices, making it a powerful tool for socket handles the underlying network
implementing complex network functions and policies. protocols (like TCP/IP) to ensure reliable
delivery. 5.Connection Closure: When
TCP Sockets communication is complete, the
Key Characteristics and Use Cases:- 1.Reliable: TCP ensures reliable connection is closed using the close()
data delivery through mechanisms like acknowledgments, function.
retransmissions, and flow control. This makes it suitable for applications Example
that require error-free data transfer, such as file transfer and email. :- Consider a web browser (client)
2.Connection-Oriented: TCP establishes a connection before data communicating with a web server.
transmission, allowing for a reliable and ordered flow of data. 3.Flow 1.The browser creates a socket. 2.The browser
Control: TCP employs mechanisms like sliding window protocol to binds the socket to a random port number.
regulate the flow of data, preventing congestion and ensuring efficient 3.The browser connects to the server's IP
data transfer. 4.Congestion Control: TCP adjusts its transmission rate address and port number (e.g., 80 for HTTP).
based on network 4.The browser sends an HTTP request to the
congestion, helping to avoid overwhelming the network. server through the socket.
Creation of TCP Sockets:- 1.Socket Creation: A socket is created using 5.The server receives the request, processes it,
the socket() function, specifying the address family (e.g., AF_INET for and sends an HTTP response back to the browser
IPv4) and socket type (SOCK_STREAM for TCP). 2.Binding: The socket through the same socket.
is bound to a specific local address and port number using the bind() 6.The browser receives the response and displays
function. This allows the system to identify the socket. 3.Listening: For the webpage. 7.Both the client and server close
server sockets, the listen() their sockets to terminate the connection.
function is used to indicate that the socket is ready to accept incoming
connections. 4.Accepting Connections: The accept() function is used SNMP Organization Model
by the server to accept incoming connections from clients. The Simple Network Management
5.Connecting: For client sockets, the connect() Protocol (SNMP) is a protocol used to
function is used to establish a connection to a server socket. manage network devices. It employs a
Role in Network Communication:- TCP sockets play a crucial role in client-server model, where network
network communication by providing a reliable and ordered mechanism management stations (NMS) poll network
for data exchange. They are used in various applications, including:- devices (agents) to collect information
1.File Transfer: Protocols like FTP and TFTP use TCP to ensure reliable and configure them. SNMP
file transfer. 2.Email: Protocols like SMTP and POP3 use TCP for secure Organization Model
and reliable email communication. The SNMP organization model consists of
3.Web Browsing: HTTP uses TCP to establish a connection between a three main components:- a)Management
web browser and a web server. 4.Remote Login: Protocols like SSH Station (NMS):- 1.The NMS is a software
and Telnet use TCP for secure remote access. application that monitors and controls network
devices. 2.It can also send configuration
UDP Sockets commands to devices to modify their
Key Characteristics:- 1.Unreliable: UDP does not guarantee reliable delivery settings. b)Managed Devices (Agents):
of data. Packets can be lost or arrive out of order. 1.Agents are software applications running on
2.Connectionless: UDP does not establish a connection before data network devices like routers, switches, and
transmission. Each packet is independent. servers. 2.Agents can also execute
3.Lightweight: UDP has lower overhead compared to TCP, making it suitable commands sent by the NMS to modify their
for real-time applications where low latency is crucial. Differences from settings. c)Management Information Base
TCP Sockets:- 1.Reliability: TCP ensures reliable delivery, while UDP does (MIB):- 1.The MIB is a database that stores
not. 2.Connection-Oriented vs. information about the managed device. 2.It
Connectionless: TCP is connection-oriented, while UDP is connectionless. defines the structure and content of the
3.Overhead: TCP has higher overhead due to its information that can be retrieved from the
reliability mechanisms, while UDP has lower overhead. device. SNMP Works:- 1.Polling: The NMS sends a reques
Limitations of UDP Sockets:- 1.No Flow Control: UDP does not have
built-in flow control, which can lead to network congestion if the
sender transmits data faster than the receiver can process it. 2.No SNMP Works:- 1.Polling: The NMS sends a
Retransmissions: UDP does not retransmit lost packets, which can request message to an agent, specifying the
result in data loss. information it wants to retrieve.2.Response:
Use Cases:- 1.Real-time Audio and Video Streaming: Applications like The agent processes the request, retrieves the
VoIP and video conferencing use UDP to minimize latency and ensure requested information from its MIB, and
smooth playback. 2.Online Gaming: UDP is used for online gaming to sends a response message to the NMS.
reduce latency and provide a responsive gaming experience. 3.DNS: 3.Configuration: The NMS can also send
The Domain Name System uses UDP for fast and efficient name configuration commands to the agent to
resolution. modify its settings. 4.Traps: Agents can send
unsolicited notifications (traps) to the NMS to
alert it of specific events, such as errors or
alarms.

SNMP Works:- 1.Polling: The NMS sends a reque


SNMP Works:- 1.Polling: The NMS sends a reque
SNMP Works:- 1.Polling: The NMS sends a reque

You might also like