CN Unit-3
CN Unit-3
Datagram Approach
A packet-switching technology in which a packet exists is called a datagram.
It is treated as a separate entity. Each packet includes data about the
destination, and the switch helps this data forward the packet to the right
destination. It is also known as connectionless switching.
Virtual Circuit
Virtual Circuit is also referred to as connection-oriented switching. A fixed,
consistent direction through the transmitter’s network is settled in the
virtual circuit method earlier any packets are transmitted. This direction
remains constant for the session period.
Differences
The major differences between the datagram approach and virtual circuit
are as follows −
The route is established for each table. The route is established for the
entire conversation.
The packets arrive at their intended The packets continually reach their
destination in a multiple order in which destined destination in the similar
they were transmitted. order in which they were
transmitted.
Ethernet Cabling:
Generally, some people use the term “Ethernet” or ether refers
to cable. Ethernet was the original product designed by Xerox PARC based
on Bob Metcalfe’s idea. It was later upgraded to 10 Mbps by Xerox, Intel
and DEC.
This formed the basis for the IEEE 802.3 standard, which then became an
ISO standard. Actually, the Ethernet was the implementation of standard
802.3.
Cabling for 802.3: The term Ethernet refers to a network of cables.
Various types of cables are being used in different 802.3 implementations.
The following four cable types are the most common among them:
Routers IP Addressing:
An IP address represents an Internet Protocol address. A unique address
that identifies the device over the network. An IP address is the identifier
that enables your device to send or receive data packets across the internet.
It holds information related to your location and therefore making devices
available for two-way communication. The internet requires a process to
distinguish between different networks, routers, and websites.
IP address structure: IP addresses are displayed as a set of four digits-
the default address may be 192.158.1.38. Each number on the set may
range from 0 to 255. Therefore, the total IP address range ranges from
0.0.0.0 to 255.255.255.255.
IP address is basically divided into two parts: X1. X2. X3. X4
1. [X1. X2. X3] is the Network ID
2. [X4] is the Host ID
How do IP addresses work?
An IP address is part of the TCP/IP suite of protocols. It works behind the
scenes, helping devices and websites connect with each other on the
internet.
Types of IP addresses
Here is a list of the five most common types of IP addresses:
1. Private IP addresses
Each device connected to a home network or a private network carries
a private IP address. Private IP addresses are non-internet facing and are
only used on an internal network. Devices with private IP addresses might
include computers, tablets, smartphones, Bluetooth devices, smart TVs and
printers. With the increasing popularity of internet of things products, the
use of private IP addressing is likely to keep growing.
2. Public IP addresses
An ISP assigns these addresses, which enable a router to communicate with
the internet or an outside network. Public IP addresses cover the entire
network, meaning multiple devices sharing the same internet connection will
also share the same public IP address.
3. Dynamic IP addresses
These IP addresses are constantly changing and a new dynamic IP
address is assigned to a device every time it connects to the internet. ISPs
buy large pools of IP addresses to assign to their customers automatically.
They revolve and reuse these addresses between different customers to
generate cost savings and to provide easier network management. A
dynamic IP address also offers security benefits, as it's harder for
cybercriminals to hack into a network interface if its IP is constantly
changing.
4. Static IP addresses
Unlike dynamic IP addresses, static IP addresses never change once they're
assigned by the network. While most internet users and businesses don't
require static IP addresses, they're a requirement for businesses that wish to
host their own web servers. A static IP address ensures that all websites and
email addresses associated with a certain web server will always have a
consistent IP address so it can be reached on the internet.
5. Website IP addresses
These are IP addresses for website owners who don't host their websites on
their own servers but rely on a hosting company to do so. Website IP
addresses are composed of the following two types:
S.No
. IEEE 802.3 IEEE 802.4 IEEE 802.5
It can handle
Minimum frame It supports both short
5. short minimum
required is 64 bytes. and large frames.
frames.
Efficiency decreases
when speed Throughput &
Throughput &
increases and efficiency at very
6. efficiency at very high
throughput is high loads are
loads are outstanding.
affected by the outstanding.
collision.
Protocol is
Protocol is very Protocol is moderately
8. extremely
simple. complex.
complex.
It is not applicable
It can be applied for
on Real time
Real time applications
applications,
It is applicable to and interactive
9. interactive
Real time traffic. applications because
Applications and
there is no limitation
Client-Server
on the size of data.
applications.
Distance-vector routing:
In distance-vector routing (DVR), each router is required to inform the
topology changes to its neighboring routers periodically. Historically it is
known as the old ARPNET routing algorithm or Bellman-Ford algorithm.
How the DVR Protocol Works
● In DVR, each router maintains a routing table. It contains only one
entry for each router. It contains two parts − a preferred outgoing line
to use for that destination and an estimate of time (delay). Tables are
updated by exchanging the information with the neighbor’s nodes.
●Each router knows the delay in reaching its neighbors (Ex − send echo
request).
● Routers periodically exchange routing tables with each of their
neighbors.
● It compares the delay in its local table with the delay in the neighbor’s
table and the cost of reaching that neighbor.
● If the path via the neighbor has a lower cost, then the router updates
its local table to forward packets to the neighbor.
Example − Distance Vector Router Protocol
In the network shown below, there are three routers, A, B, and C, with the
following weights − AB =2, BC =3 and CA =5.
Step 1 − In this DVR network, each router shares its routing table with
every neighbor. For example, A will share its routing table with neighbors B
and C and neighbors B and C will share their routing table with A.
Form A A B C
A 0 2 3
Form B A B C
A
B 2 0 1
Form C A B C
C 3 1 0
Step 2 − If the path via a neighbor has a lower cost, then the router
updates its local table to forward packets to the neighbor. In this table, the
router updates the lower cost for A and C by updating the new weight from
4 to 3 in router A and from 4 to 3 in router C.
Form A A B C
A 0 2 3
Form B A B C
B 2 0 1
C
Form C A B C
C 3 1 0
Step 3 − The final updated routing table with lower cost distance vector
routing protocol for all routers A, B, and C is given below −
Router A
Form A A B C
A 0 2 3
B 2 0 1
C 3 1 0
Router B
Form B A B C
A 0 2 3
B 2 0 1
C 3 1 0
Router C
Form C A B C
A 0 2 3
B 2 0 1
C 3 1 0
Reliable Flooding
Initial state: Each node knows the cost of its neighbors.
Final state: Each node knows the entire graph.
Route Calculation:
Each node uses Dijkstra's algorithm on the graph to calculate the optimal
routes to all nodes.
The Link state routing algorithm is also known as Dijkstra's algorithm which
is used to find the shortest path from one node to every other node in the
network.
The Dijkstra's algorithm is an iterative, and it has the property that after kth
iteration of the algorithm, the least cost paths are well known for k
destination nodes.
Notations used in link state algorithm:
c( i , j): Link cost from node i to node j. If i and j nodes are not directly linked, then c(i , j) = ∞.
D(v): It defines the cost of the path from source code to destination v that has the least cost currently.
P(v): It defines the previous node (neighbor of v) along with current least cost path from source to v.
Example:
Step 1:
The first step is an initialization step. The currently known least cost path
from A to its directly attached neighbors, B, C, D are 2,5,1 respectively.
The cost from A to B is set to 2, from A to D is set to 1 and from A to C
is set to 5. The cost from A to E and F are set to infinity as they are not
directly linked to A.
Step 2:
In the above table, we observe that vertex D contains the least cost path
in step 1. Therefore, it is added in N. Now, we need to determine a
least-cost path through D vertex.
a) Calculating shortest path from A to B
1. v = B, w = D
3. = min( 2, 1+2)>
4. = min( 2, 3)
is 2.
1. v = C, w = D
3. = min( 5, 1+3)
4. = min( 5, 4)
is 4.</p>
1. v = E, w = D
3. = min( ∞, 1+1)
4. = min(∞, 2)
5. The minimum value is 2. Therefore, the currently shortest path from A to E
is 2.
Note: The vertex D has no direct link to vertex E. Therefore, the value of D(F) is infinity.
Step 3:
In the above table, we observe that both E and B have the least cost
path in step 2. Let's consider the E vertex. Now, we determine the least
cost path of remaining vertices through E.
1. v = B, w = E
3. = min( 2 , 2+ ∞ )
4. = min( 2, ∞)
is 2.
3. = min( 4 , 2+1 )
4. = min( 4,3)
is 3.
1. v = F, w = E
3. = min( ∞ , 2+2 )
4. = min(∞ ,4)
is 4.
Step 4:
In the above table, we observe that B vertex has the least cost path in
step 3. Therefore, it is added in N. Now, we determine the least cost
path of remaining vertices through B.
1. v = C, w = B
3. = min( 3 , 2+3 )
4. = min( 3,5)
is 3.
1. v = F, w = B
3. = min( 4, ∞)
4. = min(4, ∞)
is 4.
Step 5:
In the above table, we observe that C vertex has the least cost path in
step 4. Therefore, it is added in N. Now, we determine the least cost
path of remaining vertices through C.
1. v = F, w = C
3. = min( 4, 3+5)
4. = min(4,8)
is 4.
5 ADEBC 4,E
Final table:
5 ADEBC 4,E
6 ADEBCF
Disadvantage: