Unit - 5
Unit - 5
Networking Devices
Connecting
Devices
Networking Internetworking
Devices Device
Bridges –operate in both the physical and data link layers of the OSI
Model.
It can divides a larger network into smaller segments.
Relay frames between two originally separate LANs.
It contains logic to keep the traffic for each segment.
Filter traffic (controlling congestion)
Provide security through this partitioning of traffic
A bridges in the OSI Model
Bridges
Bridges
With the first packet transmitted by each station, the bridge learns
the segment associated with the station.
Eventually, it has a complete table of station addresses and their
respective segments stored it its memory.
Even after the table is complete, it is self-updating (in case the
stations are moved from the segments)
routers
Routers
Routing
In other routing protocols, the router may choose a new route for
each packet (even packets belong to the same transmission) in
response to changes in condition and topology of the networks.
Example: Given a transmission from network A to network D, a
router may send the first packet by way of network B, the second
packet by way of network C, and the third packet by way of network
Q, depending of which route is most efficient at the moment.
Gateways
Gateways
In routing, the pathway with the lowest cost is considered the best.
As long as the cost of each link is known, a router can find the
optimal combination for any transmission.
Several routing algorithms exist for making this calculations.
The most popular are:
Distance Vector Routing
Link State Routing
Distance Vector Routing
Distance Vector Routing
Each router periodically shares its knowledge about the entire network
with its neighbors. The three keys to understand how this algorithm works
are as follows:
1. Knowledge about the whole network – Each router shares its knowledge about
the entire network. It sends all of its collected knowledge about the network to
its neighbors. At the outset, a router’s knowledge of the network may be sparse.
How much it knows, however is unimportant: its sends whatever it has
2. Routing only to neighbors – Each router periodically sends its knowledge about
the network only to those routers to which it has direct links. It sends whatever
knowledge it has about the whole network through all its ports. This information
is received and kept by each neighboring router and used to update the router’s
own information about the network.
3. Information sharing at regular intervals – For example, every 30 seconds, each
router sends its information about the whole network to its neighbors. This
sharing occurs whether or not the network has changed since the last time
information was exchanged.
Sharing Information Example to understand Distance Vector Routing
NET ID: The Network ID defines the final destination of the packet.
Cost: The cost is the number of hops that packet must take to get there.
Next hop: The ID of the next router.
Routing table distribution in distance vector routing
The combined table may contain some duplicate data. In the above figure, the
combined table of router A contains the duplicate data, so it keeps only those data
which has the lowest cost. For example, A can send the data to network 1 in two
ways. The first, which uses no next router, so it costs one hop. The second requires
two hops (A to B, then B to Network 1). The first option has the lowest cost,
therefore it is kept and the second one is dropped.
The process of creating the routing table continues for all routers. Every router
receives the information from the neighbors, and update the routing table.
Final Routing Table
A
Example 2:
Final Routing Table
Final Routing Table
Example 3:
Final Routing Table
Final Routing Table
Updating Algorithm
The updating requires that the router first add one hop to the hop
count field for each advertised route. The router should apply the
following rules to each advertised route:
1. If the advertised destination is not in the routing table, the router
should add the advertised information to the table
2. If the advertised destination is in the routing table,
a. If the next field is the same, the router should replace the entry in the
table with the advertised one. Note that even if the advertised hop count
is larger, the advertised should replace the entry in the table because the
new information invalidates the old.
b. If the next hop field is not the same,
i. If the advertised hop count is smaller than one in the table, the router
should replace the entry with the new one.
ii. If the advertised hop count is not smaller (same or larger), the router should
do nothing.
Updating Algorithm - Example
Link State Routing
Link State Routing
In link state routing, each router shares its
knowledge with every other router on the
internetwork. The three keys to understand
how this algorithm works are as follows:
1. Knowledge about the neighborhood: Instead
of sending its entire routing table, a router
sends information about its neighborhood
only.
2. To all routers: Each router sends this
information to every other routers in the
internetwork, not just to its neighbors. This
process is called flooding.
3. Information sharing when there is a change:
Each router sends out information about the
neighbors when there is a change.
Concept of Link State Routing
Link State Routing
Information Sharing: First step in
link state routing is information
sharing. Each router shares its
knowledge about its neighborhood
with every other router on the
internetwork.
Packet Cost:
In Distance Vector Routing, cost
refers to hop count.
In Link State Routing, cost refers to
weighted value based on a variety of
factors such as security levels,
Cost in Link State Routing
traffic, or the state of the link.
Link State Routing
Link State Packet: When a router
floods the network with information
about its neighborhood, it is said to
be advertising. The basis of this
advertising is a short packet called a
link state packet (LSP).
LSP usually contains four fields:
1. The ID of the advertiser Link State Packet
2. The ID of the destination network
3. The cost
4. The ID of the neighbor router
Initialization
Link State Routing Process for
router A
Getting Information about neighbors: A
router gets its information about its
neighbors by periodically sending them a
short greeting packet. If the neighbor
responds to the greeting as expected, it is
assume to be alive and functioning. If it
does not, a change is assume to have
occurred and the sending router alerts the
rest of the network in its next LSP.
Initialization: If all routers come up at the
same time, each router sends a greeting
packet to its neighbors to find out the sate
of the link. It then prepares an LSP based
on the results of these greetings and Flooding of A’s LSP
floods the network with it.
Link State Routing
Link State Database: Every router receives every LSP and puts the
information into a link state database.
The Dijkstra Algorithm
To calculate its routing table, each router
applies an algorithm called the Dijkstra
algorithm to its link state database.
The Dijkstra algorithm calculates the shortest
path between two points on a network.
Network – graph made up of nodes or arcs
Nodes - are of two types: networks and routers.
Arcs – connection between a router and a
network (router to network and network to
router)
Cost is applied only to the arc from router to
network.
The cost from network to router is always zero Costs in the Dijkstra algorithm
Shortest Path Tree
The The Dijkstra algorithm follows
four step to discover the shortest path
tree (routing table) for each router.
1. The algorithm begins to build the tree
by identifying its root. The root is
router itself. The algorithm then
attaches all nodes that can be reached
from that root (all the other neighbor
nodes) Nodes and Arcs are temporary
at this step.
2. The algorithm compares the tree’s
temporary arcs and identifies the arc
with lowest cost. The arc and the node
to which it connects now becomes a
permanent part of the shortest path
tree.
Shortest Path Tree