0% found this document useful (0 votes)
8 views

Unit - 5

Uploaded by

koshika.lamba
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)
8 views

Unit - 5

Uploaded by

koshika.lamba
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/ 67

Networking and Internetworking Devices

Networking Devices

 Network – two or more devices connected for the purpose of


sharing data and resources
 Putting together a network is not a simple task (plugging cable into a
hub). It is complicated.
 Example problems: (i) LAN may need to cover more distance and
(ii) number of stations may be too great and network may need to be
subdivided.
 Solution: (i) Repeater or Regenerator and (ii) Bridge
Internetworking Devices

 Internetwork (or internet) – When two or more networks


connected for the purpose of sharing data and resources
 Linking a number of LANs into an internet requires internetworking
devices.
 Internetworking Devices – Routers and Gateway

An internet is different from the Internet


Connecting Devices

Connecting
Devices

Networking Internetworking
Devices Device

Repeaters Bridges Routers Gateways


Connecting Devices and the OSI Model
 Each of these four devices interacts with
protocols at different layers of the OSI Model.
 Repeaters – active at the Physical Layer (acts
only upon the electrical components of a
signal)
 Bridges – active at the Data Link Layer (uses
addressing protocol and affect the flow control
of the single LAN)
 Routers – active at the Network Layer
(provides link between separate, but same type
LANs)
 Gateways – active in all the Layers (provides
translation services between incompatible
LANs or applications)
Repeaters
Repeaters

 Repeater or Regenerator – an electronic device that operates only


on the physical layer
 Signals that carry information within a network can travel a fixed
distance before attenuation endangers the integrity of the data.
 A repeater installed on a link receives the signal before it becomes
too weak and corrupted. It regenerates the original bit pattern, and
puts the refreshed copy back onto the link.
 It helps to extend the physical length of a network.
A repeater in the OSI Model
Not an Amplifier

 An amplifier cannot discriminate the intended signal and noise. It


amplifies equally everything fed into it.
 A repeater does not amplify the signal; it regenerates it.
 Whet it receives the weakened or corrupted signal, it creates a copy
bit for bit, at the original strength.

A repeater is a regenerator, not an amplifier


Function of a repeaters

 Location of a repeater on a link is vital. A repeater must be placed


so that a signal reaches it before any noise changes the meaning of
any of its bits.
 A little noise won’t destroy the original message, but if the
corrupted signal travels farther, the accumulated noise can change
it’s meaning. At this point the original signal becomes
unrecoverable.
Bridges
Bridges

 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

 As it operates at the data link layer, it has access to the physical


address.
 When a frame enters a bridge, it checks the address of the
destination and forwarded the signal only to the segment which
contains the actual destination station.
 As a bridge encounters a packet, it reads the address in the frame
and compares the address with a table of all the stations on both
segments. When it finds a match, it discovers to which segment the
station belongs and relays the packet only to that segment.
Two segments joined by a bridge
Function of a bridge

 Case 1: A packet from Station A to Station D


 Station A and D are on the same segment
 Therefor, the packet is blocked from crossing into the lower segment
 The packet is relayed to the entire upper segment, where it is received by
Station D.
 Case 2: A packet from Station A to Station G
 The bridge allows the packet to cross and relays it to the entire lower
segment, where it is received by Station G.
Types of bridges

Bridges

Simple Multiport Transparent


Bridge Bridge Bridge
Simple Bridges

 Primitive and inexpensive


 Links two segments and contains a table of addresses of all the
stations of the segments
 Manual entry of addresses
 Whenever a station is added, the table must be modified manually
 Whenever a station is removed, the invalid address must be deleted
 Installation, configuration and maintenance are time consuming
Multiport Bridges

 Used to connect more than two LANs


 The bridge has three tables, each one holding the physical addresses
of stations reachable through the corresponding port
Transparent Bridges

 Transparent or Learning, bridge builds its table of station address on


its own as it performs its function.
 When it is first installed, the table is empty.
 As it encounters each packet, it looks at both the source and the
destination address.
 It checks the destination address and send the packet to the
appropriate station.
 If it does not recognize the destination address, it relays the packets
to all the stations on both segments.
Transparent Bridges

 It uses the source address to build its table


 As it reads the source address, it notes
which side the packet came from and
associates the segment to which it
belongs.
 Example: When station A sends packet to
station G, the bridge learns that packet
coming from Station A from the upper
segment. Now whenever the bridge
encounters a packet addressed to A, it
knows them to relay them only to the
upper segment.
Transparent 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

 Routers – Operate in Physical, Data Link and Network Layers of


the OSI model.
 not just a simple hardware like repeaters and bridges
 Sophisticated
 Have access to network layer addresses and contains software to
choose the best path for transmission
A Router in the OSI Model
Routers
 Relay packets among multiple
interconnected networks
 Route packet from one network to any of a
number of potential destination on an
internetwork
 A packet sent from a station of one network
to the to a station on a neighboring network
goes first to the jointly held router, which
switches it over to the destination network.
 If there is no one router connected to both
sending and receiving networks, then the
sending router transfers the packet across
one of its connected network to the next
router in the direction of ultimate
destination. Routers in an internet
 The router forwards the packet to the next (internetwork of five networks)
router on the path, and so on until the
destination is reached.
Routers

 Routers act like stations on a network.


 Stations are members on only one
network, but routers have addresses on,
and links to, two are more networks at
the same time.
 In their simplest function, they receive
packets from one connected network
and pass them to a second connected
network.
 The router checks the destination
address, finds the best route for the Routers in an internet
packet, and passes it to the destination (internetwork of five networks)
network.
Routing Concepts
 Router’s job is to forward packets through the network
 Example: Packet from network A to C via router (network) B
 More than one pathway exists between the source and the destination
 For example, packet could reach C through router D instead of B
 Multiple options - Router has to choose the path
 Which path does it choose?
 Least-Cost Routing – based on efficiency: which path is the cheapest or
shortest? A value is assigned to each link; Length of the particular path = total
of the values of the component links. In some cases, shortest means, shortest
number of relays, or hops called as Hop-Count Routing.
 Shortest means fastest, cheapest, most reliable, most secure or best of any
other quality that can make one particular link (or combination of links) more
attractive than another.
Nonadaptive Vs. Adaptive Routing

Routing

Nonadaptive Routing Adaptive Routing


Nonadaptive Routing

 In some routing protocols, once a pathway to a destination has been


selected, the router sends all the packets for that destination along
that one route.
 The routing decisions are not made based on the condition or
topology of the networks.
Adaptive 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

 Operate in all seven layers of the OSI model


 A gateway is a protocol converter.
 A router can accept, relays or transfers packets only across the
networks using similar protocols.
 A gateway on the other hand, can accept a packet formatted for one
protocol (e.g. AppleTalk) and convert it to a packet formatted for
another protocol (e.g. TCP/IP) before forwarding it.
A gateway in the OSI Model
Gateways

 A gateway is generally a software installed within a router.


 The gateway understands the protocols used by each network and
translates one to another.
 In some cases, the only necessary modification are the header and
the trailer of the packet.
 In other cases, the gateway must adjust the data rate, size, and
format as well.
A Gateway

A gateway connecting a SNA network (IBM) to a NetWare network (Novell)


Routing Algorithms
Routing Algorithms

 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

 The cloud represents the LANs


 LANs are connected by routers, and they
are represented by the boxes labeled as
A,B,C,D,E and F.
 Distance vector routing algorithm
simplifies the routing process by
assuming the cost of every link is one
unit. Therefore, the efficiency of
transmission can be measured by the
number of links to reach the destination.
 In Distance vector routing, the cost is
based on hop count.
The concept of distance vector routing

 This is the first step in the algorithm


 The text boxes indicates the
relationships of the routers to its
neighbors.
 Each router sends its information about
the internetwork only to its immediate
neighbors.
 The neighbors add this knowledge to
their own knowledge and sends the
updated table to their own neighbors.
In this way, routers get its own
information plus the new information
about the neighbors.
Routing Table
 Two process occurs:
1. Creating the Table
2. Updating the Table
1. Creating the Table
 Initially, the routing table is created for each router that contains at least three
types of information such as Network ID, the cost and the next hop.

Distance Vector Routing Table

 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

 In the figure, the original routing tables are


shown of all the routers. In a routing table, the
first column represents the network ID, the
second column represents the cost of the link,
and the third column is empty.
 These routing tables are sent to all the neighbors.
For Example:
 A sends its routing table to B, F & E.
 B sends its routing table to A & C.
 C sends its routing table to B & D.
 D sends its routing table to E & C.
 E sends its routing table to A & D.
 F sends its routing table to A.
Routing Table
2. Updating the Table
 When A receives a routing table from B, then it uses its information
to update the table.
 The routing table of B shows how the packets can move to the
networks 1 and 4.
 The B is a neighbor to the A router, the packets from A to B can
reach in one hop. So, 1 is added to all the costs given in the B's table
and the sum will be the cost to reach a particular network.
After adjustment, A then combines this table with its own table to create a combined
table.

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

3. The algorithm examines the database


and identifies every node that can be
reached from its chosen node. These nodes
and their arcs are added temporarily to the
tree.
4. The last two steps are repeated until
every node in the network has become a
permanent part of the tree.
Shortest Path Tree
 Each router now uses the shortest path tree to construct its routing table.
 Each router uses the same algorithm and the same link state database to
calculate its own shortest path tree and routing table.

Link state routing table for router A

You might also like