CN Unit-3
CN Unit-3
Functionalities
Routing:
When a packet reaches the router's input link, the router will move the packets to the router's output link. For
example, a packet from S1 to R1 must be forwarded to the next router on the path to S2
Logical Addressing:
The data link layer implements the physical addressing and network layer implements the logical addressing.
Logical addressing is also used to distinguish between source and destination system. The network layer adds a
header to the packet which includes the logical addresses of both the sender and the receiver.
Internetworking:
This is the main role of the network layer that it provides the logical connection between different types of
networks.
Fragmentation:
The fragmentation is a process of breaking the packets into the smallest individual data units that travel through
different networks.
NETWORK LAYER SERVICES
The network layer guarantees that the packet will reach its destination.
It is another service provided by the network layer and it guarantees that the packet will surely be delivered
within a specified host-to-host delay bound.
According to this service, it is ensured that packets arrive at the destination in the same order in which they are
sent by the sender.
Security:
Security is provided by the network layer by using a session key between the source host and the destination
host.
ADVANTAGES
By forwarding service of the network layer, the data packets are transferred from one place to another in the
network.
In order to reduce the traffic, the routers in the network layer create collisions and broadcast the domains.
DIS - ADVANTAGES
In the network layer, there is a lack of proper error control mechanisms; due to the presence of fragmented data
packets the implementation of error control mechanism becomes difficult.
Due to the presence of too many data-grams there happens occurrence of congestion.
N/w layer is majorly focused on getting packets from source to destination, routing error handling & congestion
ctrl
N/w layer is well known model is OSI/ ISO approach with 7 layers
Before learning about design issues in n/w layer we will learn its functions:
1. ADDRESSING
2. PACKETING
3. ROUTING
4. INTER - NETWORKING
1. ADDRESSING - Maintain address at frame header of both source & destination & performs
addressing detect various devices in network
2. PACKETING - This is performed by Internet protocol. The Network layer converts packets
from its upper layer
3. ROUTING - It is most important functionality. This layer chooses most & best path for data
transmission from source to destination
Host h2 is LAN with router F, owned & operated by customer. This router F is connected by leased line to
carrier’s equipment.
A host with a packet to send transmits its nearest router, either its own LAN or a point - to – point link to carrier.
The packet is stored there until it has fully arrived so the checksum can be verified. Then packets are forwarded
to next router along the path until it reaches the destination host. This is also called as STORE & FORWARD
PACKET SWITCHING
Network Layer provides services to transport layer at network layer / transport layer interface
Following requirements are:
Connection – less network services called “Datagram’s”. Packets are termed as “Datagram’s” & corresponding
subnet as “ Datagram subnets”. When the message size that has to be transmitted is 4 times that size of packet,
then network layer divides into 4 packets & transmits each packet to router via a few protocols. Each data
packet has destination address & is routed independently irrespective of the packets.
Connection oriented network called as “Virtual circuit “. To use a connection oriented service, first we
establishes a connection, use it & then release it. In connection – oriented service, the data packets are delivered
to receiver in same order in which they have been sent by sender. It can be done either 2 ways are:
➢ Virtual circuit switched connection - The data stream is transferred over a packet switched
network, in such a way that it seems to user that there is a dedicated path from sender to receiver. A
virtual path is established here. While, other connections may also be using the same path
ROUTING ALGORITHM
DEFINATION:An algorithm is a procedure that lays down the route or path to transfer data packets
from source to destination called Routing algorithm.
ROUTING ALGORITHM
ADAPTIVE ROUTING ALGORITHM NON – ADAPTIVE ROUTING
ALGOTITHM
➢ Centralized Algorithm - It also called as Global routing algorithm. It computes “least – cost
path“ between source & destination using complete & global knowledge about network. Link State
Algorithm is referred as Centralized Algorithm i.e., aware of cost of each link in network
Definition:
An algorithm that constructs static table to determine which node to send packet is called Non – adaptive
Routing Algorithm
Types: There are 2 types in Non – adaptive Routing algorithms are as follows:
➢ Flooding
➢ Random Walks
➢ Flooding
Every incoming packet is sent to all outgoing links except 1 from it has been reached.
➢ Random Walks
A packet sent by node to 1 of its neighbors’ randomly
By changing weighing function, algorithm then computes shortest path measured accordingly to any 1 of a no.
of criteria or combination of criteria.
Types:
There are 2 types in Shortest Path Routing are as follows:
1. DIJKSTRA’s Algorithm
2. BELLMAN – FORD Algorithm
1. DIJKSTRA’s Algorithm
Each node is labeled with its distance from source node along with best known path
Initially no paths are known, so all nodes are labeled with infinity
As algorithm proceeds, paths are found, labels are changed, reflecting better paths
STEP 2: Initial path cost to neighboring nodes i.e., adjacent nodes / link nodes is computed & these nodes are
re-labeled considering source node
STEP 3: Examine all adjacent nodes & find smallest label, make it permanent
STEP 4: Smallest label is now working node, then step 2 & step 3 are repeated till destination node reaches
2. BELLMAN FORD ALGORITHM
Bellman Ford algorithm is similar to DIJKSTRA’s algorithm but here shortest paths from a given source node is
computed subject to constraint that path contain at most 1 link i.e., from source node, at each step Least – cost
path with maximum no. of links are found. Finally Least – cost path to each node & cost of path is computed.
FLOODING
This technique requires no network information. A packet is sent by a source node to all its adjacent nodes.
At each node is retransmitted on every outgoing links, except link that it arrived from.
Flooding generates large no. of duplicate packets 1 way to prevent this for each node to renumber identify of
those packets it has already sent.
When a duplicate packet arrives they are deleted.
One such measure is to have a hop counter contained in header of each packet is each hop.
When count reaches zero, packet is deleted.
If counter is set to maximum i.e., diameter of subnet
Selective flooding: The routers don’t re-transmit every incoming packet on all links but only on
those links that are in right direction.
Advantage: It is highly robust. This property finds application in military network i.e., subjected to
extensive damage & distributed database applications where it is necessary to update DB concurrently
Disadvantage: Total traffic load. It generates directly proportional to connectivity of network. Also
Flooding requires much large bandwidth
BROADCAST ROUTING
Transmitting data to the multi – destinations simultaneously called Broadcasting
1. Flooding
2. Multi-destination Routing
3. Reverse path forwarding
1. Flooding
At each node is retransmitted on every outgoing links, except link that it arrived from.
Flooding generates large no. of duplicate packets 1 way to prevent this for each node to renumber identify of
those packets it has already sent.
One such measure is to have a hop counter contained in header of each packet is each hop.
When count reaches zero, packet is deleted. If counter is set to maximum i.e., diameter of subnet
Selective flooding:
The routers don’t re-transmit every incoming packet on all links but only on those links that are in right
direction.
2. Multi-destination Routing
Router generates new copy of packets for each links with selected destination addresses. After few hops each
packet will carry only one destination addresses & it is just as a normal packet
The broadcast packet is transmitted by a source information if arrives at a router, router checks a packet whether
it is from preferred path & router sends it on best route path.
A tree like structure is forwarded by reverse path forwarding. The main advantage is:
Each packet arrived on preferred path to A, so indicated by a circle around the letter
Second Hop:
On second hop, seven packets are generated, two from routers B, C, E & one from D
The packets arrived on preferred paths are then generates further packets
Third Hop:
In third hop, 13 packets are generated, packet W not preferred path, so it is rejected. This process continues &
after specific numbers of hops broadcasting terminates .
HIERARCHICAL ROUTING
At certain point network may grow to the point where it is no longer feasible for every router to have an entry
for other router, so the routing will have to be done hierarchically.
When this routing is used, the routers are divided into regions.
It contains all details about how to route packets to destination within its own region.
It is necessary to group regions into clusters, clusters into zones, zones into groups & so on.
Hierarchical table for 1A
1A - -
1B 1B 1
1C 1C 1
2 1B 2
3 1C 2
4 1C 3
5 1C 5
1A - -
1B 1B 1
1C 1C 1
2A 1B 2
2B 1B 3
2C 1B 3
2D 1B 4
3A 1C 3
3B 1C 2
4A 1C 3
4B 1C 4
4C 1C 4
5A 1C 5
5B 1C 6
5C 1B 5
5D 1C 7
5E 1C 6
There are entries for local routers but all other regions have been condensed into a single router.
MULTICAST ROUTING
To send messages to well defined groups that are numerically large is size but small compared to network as a
whole.
Sending message to such a group is called multicasting & its routing algorithm called multicast routing
To do multicasting routing, each router computes a spanning tree occurring all other routers.
The simplest one can be used, if link state routing is used & each router is aware of complete topology,
including which hosts belong which groups.
It is important that routers know which of their hosts belong to which groups. Either hosts must inform their
routers about changes in group membership or routers must query their host periodically.
Either way, routers learn about which of their hosts are in which groups. Routers tell their neighbors, so
information propagates through subnet
Fig – a, b, c & d: Multicast Routing
DISTANCE VECTOR ROUTING
Distance Vector Routing is a dynamic routing algorithm
Types:
There are three types in Distance vector Routing are as follows:
1. Iterative
2. Asynchronous
3. Distributed
1. Iterative: This process continues until no more information is available to be exchanged between
neighbors
2. Asynchronous: This does not require that all of its nodes operate in lock step with each other
3. Distributed: Each node receives information from one or more of its directly attached neighbors
performs calculation & then distributes result back to its neighbors
Working:
The distance vector routing algorithm working conditions are as follows:
b. Routing only to neighbors: Router sends its knowledge about network to only these routers
which have direct links.
The router sends whatever it has about the network through ports.
The information is received by router & uses information to update its own routing table
Algorithm:
Step 1:
Step 2:
Each router exchanges its distance vector with its neighboring routers
Each router prepares a new routing table using distance vectors it has obtained from its neighbors.
This step is repeater for (n-2) times, if there are n routers in network
ADVANTAGES:
DISADVANTAGES:
When too many packets arrive a part of packet switched network then performance degrades called congestion
For example,
Consider routers sending packets in same time i.e., A, B, C to router D & router D transmits packets to router E,
then router D occurs for buffering mode that is congestion state/ not ready state
When next packets from routers A, B, C send again in same time to router D & router D will not transmit
packets to router E also because router D occurs for buffering mode that is congestion state/ not ready state.
METHODS:
➢ Here a protocol to prevent or avoid congestion is called open loop congestion control. For example –
flow control, acknowledgement, routing, retransmission, caching, packet discarding
➢ Traffic stopping:
a. Leaky bucket algorithm
b. Token bucket algorithm
Protocols that allows system to enter congestion state i.e., detect it or remove it
Host computer will send packets from whatever space but it will be stored at interface ie., un-regulated flow
then interface will send packets at regulated flow at constant rate.
Algorithm:
Step 1: When host has sent packet, the packet is thrown into bucket
Step 4: In practice, the bucket is finite queue that outburst at a finite route
Drawbacks:
Algorithm:
Step 3: If there is a ready packet, a token is removed from bucket & packet is send
Implementation of token bucket algorithm is variable used just count the tokens
This counter is just incremented every T second & decremented is when packet is sent.
Quality of service (QoS) is the use of mechanisms or technologies that work on a network to control traffic and
ensure the performance of critical applications with limited network capacity.
It enables organizations to adjust their overall network traffic by prioritizing specific high-performance
applications.
QoS is typically applied to networks that carry traffic for resource-intensive systems.
Common services for which it is required include internet protocol television (IPTV), online gaming, streaming
media, videoconferencing, video on demand (VOD), and Voice over IP (VoIP).
Working:
QoS networking technology works by marking packets to identify service types, then configuring routers to
create separate virtual queues for each application, based on their priority.
QoS technologies provide capacity and handling allocation to specific flows in network traffic.
1. RELIABILITY
2. DELAY
3. JITTER
4. BANDWIDTH
1. RELIABILITY
Reliability is something that a flow needs. Lack of reliability means losing a packet an acknowledgement, which
extends re-transmission. However, the sensitivity of application program to reliability is not the same
For example, Video call & Email.
2. DELAY
Source & destination is another flow characteristics. Again application can tolerate delay in different degree
3. JITTER
Jitter is variation in delay for packets belonging to same flow. Jitter is defined as variation in packet delay
So, High Jitter means difference between delay is large as same as Low Jitter means variation is small
4. BANDWIDTH
The speed of a link. QoS can tell a router how to use bandwidth.
TECHNIQUES
There are several techniques that businesses can use to guarantee the high performance of their most critical
applications. These include:
2. Resource reservation
The Resource Reservation Protocol (RSVP) is a transport layer protocol that reserves resources across a network
and can be used to deliver specific levels of QoS for application data streams. Resource reservation enables
businesses to divide network resources by traffic of different types and origins, define limits, and guarantee
bandwidth.
3. Queuing:
Queuing is the process of creating policies that provide preferential treatment to certain data streams over
others. Queues are high-performance memory buffers in routers and switches, in which packets passing
through are held in dedicated memory areas. When a packet is assigned higher priority, it is moved to a
dedicated queue that pushes data at a faster rate, which reduces the chances of it being dropped. For
example, businesses can assign a policy to give voice traffic priority over the majority of network
bandwidth. The routing or switching device will then move this traffic’s packets and frames to the front of
the queue and immediately transmit them.
4. Traffic marking:
When applications that require priority over other bandwidth on a network have been identified, the traffic needs
to be marked. This is possible through processes like Class of Service (CoS), which marks a data stream in the
Layer 2 frame header, and Differentiated Services Code Point (DSCP), which marks a data stream in the Layer
3 packet header.
Advantages of QoS:
QoS guarantees that businesses’ most mission-critical applications will always have priority and the necessary
resources to achieve high performance
QoS enables administrators to better manage the organization’s internet resources. This also reduces costs
and the need for investments in link expansions
Managing a network is vital however traffic is delivered, be it end to end, node to node, or point to point. The
latter enables organizations to deliver customer packets in order from one point to the next over the internet
without suffering any packet loss.
Packet loss can occur when packets of data are dropped in transit between networks. This can often be caused
by a failure or inefficiency, network congestion, a faulty router, loose connection, or poor signal. QoS avoids
the potential of packet loss by prioritizing bandwidth of high-performance applications.
f. Latency reduction:
Latency is the time it takes for a network request to go from the sender to the receiver and for the receiver to
process it. This is typically affected by routers taking longer to analyze information and storage delays caused
by intermediate switches and bridges. QoS enables organizations to reduce latency, or speed up the process of
a network request, by prioritizing their critical application.
INTERNETWORKING
Internetworking is process or technique of connecting different networks by using intermediary devices such as
routers or gateways devices.
Internetworking ensures data communication among networks owned & operated by different entities using a
common data communication & internet routing protocol
Internetworking is a term used by CISCO. Any inter-connection among or between public, private or
commercial, industrial or government. Computer may also defined as Internetwork or Internetworking
Two architectural models are commonly used to describe protocols & methods used in Internetworking
Internetworking refers other industry, products and procedures that meet the challenge of creating and
administering internetworks.
Architecture:
(or)
History of Internetworking
The first networks were time-sharing networks that used mainframes and attached terminals. Such environments
were implemented by both IBM’s System Network Architecture (SNA) and Digital’s network architecture.
Local area networks (LANs) evolved around the PC revolution. LANs enabled multiple users in a relatively
small geographical area to exchange files and messages, as well as access shared resources such as file servers.
Wide area networks (WANs) interconnect LANs across normal telephone lines (and other media), thereby
interconnecting geographically dispersed users.
Today, high-speed LANs and switched internetworks are becoming widely used, largely because they operate at
very high speeds and support such high-bandwidth applications as voice and video conferencing.
Internetworking evolved as a solution to three key problems: isolated LANs, duplication of resources, and a lack
of network management. Isolated LANS made electronic communication between different offices or
departments impossible. Duplication of resources meant that the same hardware and software had to be supplied
to each office or department, as did a separate support staff. This lack of network management meant that no
centralized method of managing and troubleshooting networks existed.
Types
Internetworking is implemented in layer – 3 (network layer) of this model. The example of Internetworking
is internet.
1. Extranet
2. Intranet
3. Internet
Intranet & Extranet may or may not have connections to the internet
If internet is connected then Intranet & Extranet is normally protected from being accessed without
authorization
1. Extranet
An Extranet is a network of internetwork or internetworking that is limited in scope to a single organization or
entity but has limited connections to networks of one or more other. Usually, but not necessarily, trusted
organization or entities. Extranet may also be categorized as a MAN, Wan or other type network
2. Intranet
An intranet is a set of interconnected networks or internetworking using internet protocol & uses IP-based tools
such as web browser & FTP tools that is under control of single administrative entity.
A large Intranet will have its own web – server to provide users with information
3. Internet
A specific internetworking consists of a worldwide inter-connection of government, academic, public & private
networks based upon ARPANET (Advanced Research Projects Agency Network) developed by ARPA of
U.S. department of defense also home to WWW (World wide Web) & referred as ‘ Internet’.
Internetworking Challenges
Implementing a functional internetwork is no simple task. Many challenges must be faced, especially in the
areas of connectivity, reliability, network management, and flexibility. Each area is key in establishing an
efficient and effective internetwork.
The challenge when connecting various systems is to support communication between disparate technologies.
Different sites, for example, may use different types of media, or they might operate at varying speeds.
Another essential consideration, reliable service, must be maintained in any internetwork. Individual users and
entire organizations depend on consistent, reliable access to network resources.
Furthermore, network management must provide centralized support and troubleshooting capabilities in an
internetwork. Configuration, security, performance, and other issues must be adequately addressed for the
internetwork to function smoothly.
Flexibility, the final concern, is necessary for network expansion and new applications and services, among
other factors.
The Network Layer in the Internet
Internet
The Internet layer, also known as the network layer or IP layer, accepts and delivers packets for the network.
This layer includes the powerful Internet Protocol (IP), the Address Resolution Protocol (ARP), and the Internet
Control Message Protocol (ICMP).
Network layer
The network layer works for the transmission of data from one host to the other located in different networks. It
also takes care of packet routing i.e. selection of the shortest path to transmit the packet, from the number of
routes available.
IP Protocol
The IP protocol and its associated routing protocols are possibly the most significant of the entire TCP/IP suite.
1. IP addressing
The IP addressing conventions are part of the IP protocol. Designing an IPv4 Addressing Scheme introduces
IPv4 addressing and IPv6 Addressing Overview introduces IPv6 addressing.
2. Host-to-host communications –
IP determines the path a packet must take, based on the receiving system's IP address.
3. Packet formatting –
IP assembles packets into units that are known as datagram’s. Datagram’s are fully described in Internet Layer:
Where Packets Are Prepared for Delivery.
4. Fragmentation –
If a packet is too large for transmission over the network media, IP on the sending system breaks the packet into
smaller fragments. IP on the receiving system then reconstructs the fragments into the original packet. Oracle
Solaris supports both IPv4 and IPv6 addressing formats, which are described in this book. To avoid confusion
when addressing the Internet Protocol, one of the following conventions is used:
a. When the term “IP” is used in a description, the description applies to both IPv4 and IPv6.
b. When the term “IPv4” is used in a description, the description applies only to IPv4.
c. When the term “IPv6” is used in a description, the description applies only to IPv6.
ICMP Protocol
The Internet Control Message Protocol (ICMP) detects and reports network error conditions. ICMP reports on
the following:
IP Addresses
Traditionally, IP addresses were divided into the five categories: A, B, C, D, E. Network numbers are managed
by a nonprofit corporation called ICANN (Internet Corporation for Assigned Names and Numbers) to avoid
conflicts. Network address, which are 32-bit numbers, are usually written in dotted decimal notation.
1. IPV6
• The newest version of IP (version 6, or IPng) uses 128 bits, yielding
• 2^128 unique combinations
• IPv6 is slowly be integrated in the existing Internet.
• IPv4’s 32 bits continues to be the dominant form of IP addressing
• VERSION. 4 BITS – IPV6 VERSION NUMBER
• Flow Label. 20 bits. - Used for specifying special router handling from source to destination(s) for a
sequence of packets.
• Payload Length. 16 bits, unsigned. - Specifies the length of the data in the packet. When set to zero,
the option is a hop-by-hop Jumbo payload.
• Next Header. 8 bits. - Specifies the next encapsulated protocol. The values are compatible with those
specified for the IPv4 protocol field.
• Hop Limit. 8 bits, unsigned. -For each router that forwards the packet, the hop limit is decremented by
1. When the hop limit field reaches zero, the packet is discarded. This replaces the TTL field in the
IPv4 header that was originally intended to be used as a time based hop limit.
• Source address. 16 bytes. - The IPv6 address of the sending node.
• Destination address. 16 bytes. -The IPv6 address of the destination node.
2. IpV4
The newest version of IP (version 6, or IPng) uses 128 bits, yielding
2^128 unique combinations
IPv6 is slowly be integrated in the existing Internet.
IPv4’s 32 bits continues to be the dominant form of IP addressing
• Header length – The length of the datagram header in 32-bit words.
• Type of service – Contains five subfields that specify the precedence (priority 0-7), delay, throughput,
reliability, and cost desired for a packet.
• Total length – The length of the datagram in bytes including the header, options, and the appended
transport protocol segment or packet. The maximum length is bytes.
• Time to live – How many routers a datagram can pass through. Each router decrements this value by 1
until it reaches 0 when the datagram is discarded. This keeps misrouted datagram's from remaining on
the Internet forever.
• Header checksum – A number that is computed to ensure the integrity of the header values.
• Options – A list of optional specifications for security restrictions, route recording, and source routing.
Not every datagram specifies an options field.
• Padding – Null bytes which are added to make the header length an integral multiple of 32 bytes as
required by the header length field.