introduction to backwards learning algorithm
Post on 11-Jul-2015
700 Views
Preview:
TRANSCRIPT
1
Introduction to Backward Learning Algorithmfor creating Bridges
by Roshan Karunarathna
2
Contents
• Before we learn Algorithm• Data Link Layer• Interconnection Devices• LAN• Limits of LAN
• Interconnecting LANs• Bridge
• What is bridge
• Backward learning Algorithm
3
Data Link Layer
• In the seven-layer OSI model of computer
networking, the data link layer is layer 2.
In TCP/IP reference model, it corresponds
to, or is part of the link layer.
• The data link layer is the protocol layer
that transfers data between adjacent
network nodes in a wide area network or
between nodes on the same local area
network segment.
4
Interconnection Devices
Interconnection devices are used to inter connect networks
at the different layers of the network architecture. The
devices can operate at:
– the physical layer such as optical repeaters, hubs, digital
cross connects, etc.
– the data link layer such as LAN switches/bridges, frame relay
switches, etc.,
– the network layer such as a router or a gateway
– the transport layer for TCP segment switching
– the application layer for overlay networks such as content
delivery networks
5
Interconnection Devices
Ethernet Ethernet
Ethernet
Repeater
Autonomous
System Autonomous
SystemBridge
Gateway
Router
6
Limits of a LAN
• One shared LAN can limit us in terms of:
– Distance
– Number of nodes
– Performance
• How do we scale to a larger, faster
network?
– We must be able to interconnect LANs
7
LAN Interconnection
• Extend range of LAN.
• Support more users.
• Security and robustness.
• Heterogeneity.
Hub
Switch
8
Interconnecting Different LANs
• Conversion between different frame
formats.
– E.g., different frame lengths.
• Speed mismatch.
– Buffering.
• Security.
– Different security services provided by
different DLLs/MACs.
9
LAN Interconnection: Example
• Multiple LANs connected by a backbone.
10
Bridges
• Connect LANs.
• Operate at the DLL.
– Route based on DLL addresses.
• Distinction between bridges, switches, and
routers gets fuzzier as technology
advances.
11
Repeaters and Bridges
• Repeaters:
– Extend scope of LANs.
– Serve as amplifiers.
– No storage/routing capabilities.
• Bridges:
– Also extend scope of LANs.
– Routing/storage capabilities.
12
Bridges and Extended LANs
• “Transparently” interconnect LANs
– Receive frames from each LAN and forward to the
other
– Each LAN is its own domain; a bridge is not a
repeater
– Could have many ports or join to a remote LAN
bridge
13
14
More on Bridges
• Have multiple interfaces, 1 per LAN.
• Use destination address to forward unicast
frames; if destination is on the same LAN,
drops frame; otherwise forwards it.
• Forward all broadcast frames.
• Have storage and routing capability.
15
More on Bridges
• No additional encapsulation.
• But they may have to do header conversion if
interconnecting different LANs (e.g., 802.3 to
802.4 frame).
• May interconnect more than 2 LANs.
• LANs may be interconnected by more than 1
bridge.
16
Bridges from 802.x to 802.y
• Operation of a LAN bridge from 802.11 to 802.3.
17
Routing
• Routing is the process of forwarding of a packet
in a network so that it reaches its intended
destination. The main goals of routing are:
• Correctness
• Simplicity
• Robustness
• Stability
• Fairness
• Optimality
18
Routing with Bridges
• Bridge decides to relay frame based on
destination MAC address.
• If only 2 LANs, decision is simple.
• If more complex topologies, routing is needed,
i.e., frame may traverse more than 1 bridge.
19
Routing with Bridges
B1 4
5 8
Frames for
5->8.
Frames for
1->4
LAN A
LAN B
20
Routing with Bridges (Cont’d)
• Listens to all frames on LAN A and accepts those
addressed to stations on LAN B.
• Retransmits frames onto B.
• Does the same for B-to-A traffic.
21
Transparent Bridges
• Plug them in and they work!
• How do they work?
– Promiscuous mode operation.
– Upon receiving frame, decide whether to
forward it or not.
– Routing table mapping destination addresses
to outgoing interface.
22
• The concept of backwards learning is very simple:
• Learn about an (source) address from the direction from
which it came, then place that address in a table and use it
for (destination) forwarding.
• Bridges operate in promiscuous mode, they listen to all
traffic that is broadcast on every link connected to its
active ports.
• By examining the source MAC address of every packet
traversing the link associated with a particular port on the
bridge, the bridge learns what addresses are reachable via
that particular port.
• These addresses are stored in a forwarding database or
table
Backward Learning Algorithm
23
Every LAN switch/Bridge maintains a forwarding database or
table. This table contains the following fields:
• MAC address
• Outgoing Port number
• Timer – indicating age of entry
The table can be interpreted as follows:
A machine with MAC address lies in direction of
outgoing port number. The entry is timer time units old.
Backward Learning Algorithm
24
Backward Learning Algorithm
• To increase overall performance:
– Shouldn’t forward AB or CD, should forward AC and DB
• How does the bridge know?– Learn who is where by observing source
addresses
– Forward using destination address; age for robustness
25
Backward Learning Algorithm
• used by transparent bridges.
• When a bridge starts, its routing table is empty.– So, it floods: every incoming frame is forwarded in
all outgoing interfaces, except the one the frame was received.
– In promiscuous mode, bridge sees all frames.
– They look at the frame’s source and “remember” which LAN it came from.
– Entries are time stamped and expire after a certain interval.
• Allows for topology changes.
26
Backward Learning (Cont’d)
• If source LAN = destination LAN, discard
frame.
• If source LAN <>destination LAN, forward
frame.
– If destination LAN unknown, flood frame.
27
Backward Learning (Cont’d)
28
• As the bridges are connected in a loop free tree topology,
• the flooding will terminate at the leaves of the tree. • we illustrate the operation of the backwards learning
algorithm by stepping through an example of a frame transmission
• through a single LAN switch with an initially empty
forwarding table.
29
A LAN1
B LAN1
C LAN2…
30
31
32
33
34
35
Bridge 1 Bridge 2
MAC Address Port MAC Address Port
A 1 A 1
C 2 C 1
E 2 E 2
36
In this method the routing tables at each node gets modified by
information from the incoming packets.
One way to implement backward learning is to include the identity of
the source node in each packet, together with a hop counter that is
incremented on each hop. When a node receives a packet in a
particular line, it notes down the number of hops it has taken to reach
it from the source node. If the previous value of hop count stored in
the node is better than the current one then nothing is done but if the
current value is better then the value is updated for future use.
The problem with this is that when the best route goes down then it
cannot recall the second best route to a particular node. Hence all the
nodes have to forget the stored informations periodically and start all
over again.
Further more….
37
Thank You!Q & A now……
top related