37
Introduction to Backward Learning Algorithm for creating Bridges by Roshan Karunarathna

Introduction to backwards learning algorithm

Embed Size (px)

Citation preview

Page 1: Introduction to backwards learning algorithm

1

Introduction to Backward Learning Algorithmfor creating Bridges

by Roshan Karunarathna

Page 2: Introduction to backwards learning algorithm

2

Contents

• Before we learn Algorithm• Data Link Layer• Interconnection Devices• LAN• Limits of LAN

• Interconnecting LANs• Bridge

• What is bridge

• Backward learning Algorithm

Page 3: Introduction to backwards 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.

Page 4: Introduction to backwards learning algorithm

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

Page 5: Introduction to backwards learning algorithm

5

Interconnection Devices

Ethernet Ethernet

Ethernet

Repeater

Autonomous

System Autonomous

SystemBridge

Gateway

Router

Page 6: Introduction to backwards learning algorithm

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

Page 7: Introduction to backwards learning algorithm

7

LAN Interconnection

• Extend range of LAN.

• Support more users.

• Security and robustness.

• Heterogeneity.

Hub

Switch

Page 8: Introduction to backwards learning algorithm

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.

Page 9: Introduction to backwards learning algorithm

9

LAN Interconnection: Example

• Multiple LANs connected by a backbone.

Page 10: Introduction to backwards learning algorithm

10

Bridges

• Connect LANs.

• Operate at the DLL.

– Route based on DLL addresses.

• Distinction between bridges, switches, and

routers gets fuzzier as technology

advances.

Page 11: Introduction to backwards learning algorithm

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.

Page 12: Introduction to backwards learning algorithm

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

Page 13: Introduction to backwards learning algorithm

13

Page 14: Introduction to backwards learning algorithm

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.

Page 15: Introduction to backwards learning algorithm

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.

Page 16: Introduction to backwards learning algorithm

16

Bridges from 802.x to 802.y

• Operation of a LAN bridge from 802.11 to 802.3.

Page 17: Introduction to backwards learning algorithm

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

Page 18: Introduction to backwards learning algorithm

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.

Page 19: Introduction to backwards learning algorithm

19

Routing with Bridges

B1 4

5 8

Frames for

5->8.

Frames for

1->4

LAN A

LAN B

Page 20: Introduction to backwards learning algorithm

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.

Page 21: Introduction to backwards learning algorithm

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.

Page 22: Introduction to backwards learning algorithm

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

Page 23: Introduction to backwards 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

Page 24: Introduction to backwards 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

Page 25: Introduction to backwards learning algorithm

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.

Page 26: Introduction to backwards learning algorithm

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.

Page 27: Introduction to backwards learning algorithm

27

Backward Learning (Cont’d)

Page 28: Introduction to backwards learning algorithm

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.

Page 29: Introduction to backwards learning algorithm

29

A LAN1

B LAN1

C LAN2…

Page 30: Introduction to backwards learning algorithm

30

Page 31: Introduction to backwards learning algorithm

31

Page 32: Introduction to backwards learning algorithm

32

Page 33: Introduction to backwards learning algorithm

33

Page 34: Introduction to backwards learning algorithm

34

Page 35: Introduction to backwards learning algorithm

35

Bridge 1 Bridge 2

MAC Address Port MAC Address Port

A 1 A 1

C 2 C 1

E 2 E 2

Page 36: Introduction to backwards learning algorithm

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….

Page 37: Introduction to backwards learning algorithm

37

Thank You!Q & A now……