0% found this document useful (0 votes)
7 views8 pages

CCN 3

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

CCN 3

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

CCN ASSIGNMENT 3

1. What are the functions of MAC?


 Channel Allocation
Dynamic Allocation: The MAC layer manages how different devices share the
communication medium dynamically, ensuring that multiple devices can use
the network efficiently.
Static Allocation: In some networks, channels can be allocated in a fixed manner
(e.g., time-division multiplexing).
 Frame Delimiting
Frame Construction: The MAC sublayer structures data into frames suitable for
transmission, including addressing and control information.
Frame Detection: It identifies the beginning and end of each frame to ensure
proper data integrity.
 Addressing
Source and Destination Addresses: The MAC layer uses unique hardware
addresses (MAC addresses) to identify the source and destination devices for
each frame.
Address Filtering: It filters incoming frames based on MAC addresses to ensure
that only relevant frames are processed.
 Error Detection
Frame Check Sequence (FCS): The MAC sublayer adds error detection codes to
frames, allowing the receiving device to detect and discard corrupted frames.
 Access Control
Collision Avoidance: In networks like Ethernet, the MAC sublayer implements
protocols to avoid or handle collisions (e.g., CSMA/CD).
Channel Sensing: It senses whether the medium is free before transmission to
avoid collisions.
 Protocol Implementation
Ethernet: Implements protocols like CSMA/CD (Carrier Sense Multiple Access
with Collision Detection) for wired networks.
Wireless Protocols: For wireless networks, it handles protocols like CSMA/CA
(Carrier Sense Multiple Access with Collision Avoidance) used in Wi-Fi.
Bluetooth: Implements specific protocols for short-range communication in
personal area networks.
 Quality of Service (QoS)
Prioritization: The MAC sublayer can prioritize certain types of traffic to ensure
timely delivery of high-priority data.
Traffic Shaping: It regulates the flow of data to ensure network stability and
performance.
 Security
Access Control: The MAC sublayer may include mechanisms to restrict network
access to authorized devices.
Encryption: Some MAC protocols include support for encryption to ensure data
confidentiality.
 Flow Control
Managing Data Rate: It manages the data rate to prevent overwhelming the
receiver with too much data at once.
Feedback Mechanisms: Uses feedback from the receiver to control the flow of
data.

2. What are the responsibilities of network layer?


 Store and Forward Packet Switching
Packet Handling: The network layer manages the storage and forwarding of
packets. When a host sends a packet, it is received by the nearest router,
stored until fully arrived, verified for integrity (checksum), and then forwarded
to the next router until it reaches its destination.
 Services Provided to the Transport Layer
Connectionless Service: Involves routing and inserting packets into the subnet
individually without requiring any setup. Each packet is treated independently,
typically used in datagram networks.
Connection-Oriented Service: Requires establishing a connection before data
transmission, ensuring all packets follow the same route and are delivered
reliably in sequence. Typically used in virtual circuit networks.
 Implementation of Connectionless Service
Datagram Transmission: Packets, or "datagrams," are transmitted
independently. Each packet contains the destination address and is routed
separately. The network layer handles the fragmentation of large messages into
smaller packets and ensures each packet reaches its destination through
potentially different paths.
 Implementation of Connection-Oriented Service
Connection Establishment and Termination: The network layer establishes a
connection before data transfer, maintains it during the transfer, and
terminates it afterward. This can be done using either circuit-switched
connections (dedicated path) or virtual circuit-switched connections (logical
path over a shared network).
Maintaining Order: Ensures that packets are delivered to the receiver in the
same order as they were sent by the sender.
 Routing
Routing Algorithms: Determines the optimal path for data packets to travel from
source to destination. It manages routing tables and updates them based on
network conditions.
Dynamic Routing: Adapts to changes in the network, such as traffic congestion
or router failures, to find the best route for packet delivery.

3. Define Datagram
A datagram is a self-contained, independent packet of data that carries enough
information to be routed from the source to the destination without relying on
earlier exchanges between the source and destination computers and the
transporting network. In the context of networking, datagrams are used in
connectionless communication where each packet is treated independently.

Key Characteristics of Datagrams:

 Independence: Each datagram is routed independently. There is no dedicated


path established before transmission, and each packet may take a different
route to reach the destination.
 Full Addressing Information: Each datagram contains complete source and
destination addresses, allowing it to be routed through multiple networks and
intermediate devices to reach its final destination.
 No Guaranteed Order: Datagrams may arrive out of order since each packet is
routed independently. It is the responsibility of the receiving end to reorder the
packets if necessary.
 Best-Effort Delivery: The network makes a best-effort attempt to deliver
datagrams, but there is no guarantee of delivery, order, or error correction. If
reliability is needed, it must be handled by higher layers (e.g., the transport
layer).

Datagram Network: Step-by-Step Example

To illustrate how a datagram network works, let's go through the example provided:

1. Message Preparation:
A process P1 on host H1 has a message to send to process P2 on host H2. P1
passes the message to the transport layer with instructions for delivery to P2.
2. Transport Layer Processing:
The transport layer on H1 adds a transport header to the message, resulting in
a transport layer segment. This segment is then handed to the network layer.
3. Fragmentation:
If the message is too large, it is divided into smaller packets (datagrams). For
instance, if the message is four times the maximum packet size, it is split into
four smaller packets.
4. Routing through Routers:
Each packet (datagram) is sent to the first router (Router A).
Router A's Processing:
 Router A has an internal routing table that specifies where to send packets
based on their destination addresses.
 It forwards packets to the appropriate next-hop routers (B or C).
5. Independent Routing:
Each datagram is routed independently. For example:
 Packet 1 might be routed through Router C to E, then F, and finally
delivered to H2.
 Packets 2 and 3 follow the same route.
 Packet 4, due to a traffic jam on the ACE path, is rerouted through Router B.
6. Dynamic Routing Decisions:
Routers make dynamic routing decisions based on current network conditions.
Routing algorithms update routing tables and decide the best path for each
datagram.

4. Difference between virtual circuit and Data grams?

5. How can the routing be classified?

Routing can be classified into several types based on different criteria and
algorithms used for determining the paths that data packets should take through a
network. Here are the primary classifications of routing:

 Static vs. Dynamic Routing:


Static Routing: Paths through the network are determined in advance by
network administrators and remain unchanged unless manually updated.
Dynamic Routing: Paths are determined in real-time by routing algorithms that
react to network topology changes, traffic conditions, and other factors.
 Distance Vector Routing vs. Link State Routing:
Distance Vector Routing: Also known as Bellman-Ford algorithm, routers
exchange information about reachable destinations and the number of hops
required to reach them.
Link State Routing: Uses algorithms like Dijkstra's algorithm where routers
exchange information about their directly connected links, allowing each router
to build a detailed map of the network.
 Hierarchical Routing:
Hierarchical Routing: Organizes routers into hierarchical levels or regions to
minimize the size of routing tables and improve scalability in large networks. It
reduces the complexity of routing by dividing the network into manageable
parts.
 Broadcast vs. Multicast vs. Anycast Routing:
Broadcast Routing: Sends data packets to all devices on the network segment.
Multicast Routing: Sends data packets to multiple specifically identified
recipients, optimized for group communication.
Anycast Routing: Sends data packets to the nearest member of a group of
potential receivers, typically used for services where any one member can
handle the request.

 Routing for Mobile Hosts:


Addresses the unique challenges of routing data packets to hosts that
frequently change their point of attachment to the network, such as laptops and
mobile devices.
Involves techniques like Mobile IP, where a home agent assists in forwarding
packets to a mobile host's current location.
 Flooding:
A simple routing technique where each incoming packet is sent out on every
outgoing link except the one it arrived on, useful in broadcasting information
across a network without prior knowledge of network topology.

6. Write the keys for understanding the distance vector routing

A distance vector routing algorithm is a fundamental method used in computer


networking to determine the optimal path for routing data packets across
interconnected routers in a network. Also known as the distributed Bellman-Ford
algorithm, it operates on the principle of routers exchanging information with their
neighboring routers to build and maintain routing tables. These tables store
information about the best known distance (in terms of a chosen metric, such as
hop count or propagation delay) and the corresponding next-hop router to reach
each destination in the network.

Operation of Distance Vector Routing


1. Routing Table Structure: Each router maintains a routing table that indexes
every router in the network. For each destination router, the table contains:
The preferred outgoing interface (next hop).
An estimate of the distance (e.g., propagation delay) to reach that
destination.
2. Exchange of Routing Information: Routers periodically exchange information
with their directly connected neighbors. This exchange typically occurs at
regular intervals or in response to changes in network topology.
3. Updating Routing Tables: When a router receives updated distance
information from a neighbor:
It calculates the total distance (or delay) to each destination router via each
neighbor.
This calculation considers the distance to the neighbor itself and the
neighbor's estimate for reaching the destination.
The router selects the shortest path (minimal delay) to each destination
based on the received information.
It updates its routing table accordingly, replacing old entries with the newly
calculated shortest paths.
4. Choosing the Best Path: The algorithm ensures that each router dynamically
adjusts its routing decisions based on the latest information received from
neighboring routers. By iteratively exchanging and updating routing tables,
routers converge towards an optimal set of paths throughout the network.
5. Metric Considerations: The metric used (e.g., hop count, propagation delay)
influences how routers evaluate and select paths. Propagation delay, for
instance, may be measured using specialized packets like ECHO packets,
which help accurately assess communication delays.

7. How the packets cost referred in distance vector and link state routing?

In distance vector routing algorithms (such as the Bellman-Ford algorithm), each


router maintains a routing table where it records the cost (often measured in hops
or some other metric) to reach each destination. This cost reflects the "distance" or
effort required to transmit packets along a specific path. The router uses these
costs to determine the best path to each destination. Here’s how the packet cost is
handled:

 Metric Selection: The packet cost can be defined based on various metrics, such
as hop count (number of routers between the source and destination), delay
(time taken for packets to traverse the path), bandwidth (capacity of the link),
or a combination thereof.
 Path Selection: Routers select paths with lower packet costs. For example, if the
metric is hop count, routers prefer paths with fewer hops. If the metric is delay,
routers prefer paths with lower transmission delays.
 Exchange and Calculation: Routers exchange their routing tables with
neighboring routers to update their knowledge of the network topology and
calculate the total cost to each destination based on the received information.

Link State Routing:

 In contrast to distance vector routing, link state routing algorithms (such as


OSPF - Open Shortest Path First) operate by routers exchanging information
about the state (cost, bandwidth, delay) of each link in the network. Here’s how
the concept of packet cost applies in link state routing:
 Link State Advertisements (LSAs): Routers in link state routing algorithms
periodically broadcast LSAs to describe the state of their directly connected
links. This includes metrics like link cost, bandwidth, and delay.
 Dijkstra's Shortest Path Algorithm: Upon receiving LSAs, routers run Dijkstra’s
algorithm to compute the shortest path to all other routers in the network based
on accumulated link costs. The shortest path is determined by adding up the
costs of each link in the path.
 Metric Flexibility: Link state routing allows for more flexible metrics compared to
distance vector routing. Besides hop count, it can consider other factors such as
delay or bandwidth, providing more granular control over path selection.

8. Define internet works?

Internet works refer to the underlying mechanisms, protocols, and infrastructure


that enable the functioning of the global network of networks known as the Internet.
This includes:

1. Packet Switching: Internet traffic is divided into small packets that are routed
independently across multiple networks based on destination addresses. This
efficient method allows for optimal use of network resources.
2. Protocols: Various protocols such as TCP/IP (Transmission Control
Protocol/Internet Protocol) govern how data is transmitted, routed, and
received across the Internet. These protocols ensure reliable communication
and data integrity.
3. Routing: Routers play a crucial role in directing packets between networks.
They use algorithms to determine the best path for each packet based on
network conditions, such as traffic load and link availability.
4. DNS (Domain Name System): DNS translates domain names (like
example.com) into IP addresses (like 192.0.2.1) that computers use to
identify each other on the Internet. This translation is essential for locating
resources and services.
5. Peering and Transit: Internet service providers (ISPs) and networks connect
with each other through peering (direct interconnection) or transit (paid
access). These agreements ensure global connectivity and data exchange.
6. Security and Encryption: Measures such as firewalls, encryption protocols
(e.g., SSL/TLS), and authentication mechanisms protect data privacy and
integrity during transmission over the Internet.
7. Content Delivery: Content delivery networks (CDNs) and caching systems
optimize the delivery of web content by storing copies closer to users,
reducing latency and improving performance.
8. Internet Governance: Various organizations and standards bodies (e.g.,
ICANN, IETF) oversee the coordination, management, and development of
Internet protocols and resources globally.

You might also like