Bridging - kondor.etf.rs

hellhollowreadingΔίκτυα και Επικοινωνίες

26 Οκτ 2013 (πριν από 3 χρόνια και 11 μήνες)

92 εμφανίσεις

Bridging

Bridge Functions

To extend size of LANs either geographically
or in terms number of users.


Protocols that include collisions can be performed
in a collision domain of limited size.


In ring networks the number of stations is limited.

To connect LANs that use different
technologies

To avoid using more costly routers

Data Link Layer Switching

Multiple LANs connected by a backbone to
handle a total load higher than the capacity of
a single LAN.

Local Internetworking

A configuration with four LANs and two
bridges.

Bridges from 802.x to 802.y

Operation of a LAN bridge from 802.11 to
802.3.

Bridges from 802.x to 802.y


The IEEE 802 frame formats. The drawing is
not to scale.

Bridges

Various types of bridges


No
-
frills bridges


Learning bridges


Complete (Spanning Tree) bridges

Complete bridges


Topology changes


Timeout procedure


Settable parameters

VLANs

No
-
frills Bridges

Serve to extend the size of a single LAN segment, i.e.
the size of a collision domain.

Bridge receives packets from all LANs attached to its
ports.

Bridge receives a packet, stores it, and broadcast it to
all of its ports when they become idle, except to the
port that received the packet.

The total network capacity cannot exceed the capacity
of a single LAN.

Learning Bridges

Bridge receives packets from all LANs attached to its ports.

Whenever a learning bridge receives a packet from some
LAN, it reads the packet source address and stores the source
and the corresponding port into the cache memory.

Whenever a bridge receives a packet, it reads the packet
destination address, and the port address to which the
destination is attached from the cache memory, if the address
is available. Bridge transmits the packet to the read port, or to
all ports except to the receiving one, if the port address is not
available.

Cache entries are deleted after a specified timeout period.



Example of Learning Bridge

Station A sends to station D

B

PORT 1

PORT 2

A Q

M

D

PORT
3

Example of Learning Bridge

Station A sends to station D

Z

C

B

PORT 1

PORT 2

A Q

M

D

A

PORT
3

Example of Learning Bridge

Station D sends to station A

B

PORT 1

PORT 2

A Q

M

D

A

Z

C

PORT
3

Example of Learning Bridge

Station D sends to station A

B

PORT 1

PORT 2

A Q

M

D

A

Z

C

D

PORT
3

Example of Learning Bridge

Station Q sends to station A

B

PORT 1

PORT 2

A Q

M

D

A

Z

C

D

PORT
3

Example of Learning Bridge

Station Q sends to station A

B

PORT 1

PORT 2

A Q

M

D

A

Z

C

D

Q

PORT
3

Example of Multiple Learning Bridges

A

B1

T


B2

M

D

Q

K

A Q

PORT 1

K D M T

PORT 2

D Q M A

PORT 1

T K

PORT 2

LAN2

LAN1

LAN3

B1

B2

B3

LAN1

LAN2

A

Topology with Loops

Learning Bridges with Loops

All three bridges receive a packet, note that station A is on
LAN1, and queue the packet for transmission.

Say bridge 3 is the first to transmit the packet onto LAN2.
Bridges 1 and 2 view the packet as it is transmitted on LAN2,
note that A is now on LAN2, and queue the packet.

Say bridge 1 now transmit the first received packet onto
LAN2. Bridge 3 note that the packet is on LAN2 and queue
the packet.

The number of packets transmitted on the network
exponentially increases.

Complete Bridges

Complete bridges are defined by IEEE 802.1
standard.

They run spanning tree algorithm to exclude loops. A
tree comprising bridges is calculated, and these
bridges send messages toward the tree root.

Tree is formed in a distributed way, each bridge sends
configuration messages, and each bridge forwards
only the best configuration message. The procedure
stops when all bridges forward the same
configuration message.


Spanning Tree Bridges

(a)

Interconnected LANs.
(b)

A spanning tree
covering the LANs. The dotted lines are not
part of the spanning tree.

Spanning Tree (ST) Algorithm

Based on the information from the configuration
messages, bridges calculate the spanning tree.

Bridges choose the bridge to be the tree root.

Bridges calculate the number of hops to the tree
root.

For each LAN, the designated bridge is
determined, which forwards packets to the root.

Designated bridge determines the root port
through which it forwads packets to the root.



Configuration Message

Configuration message format




DSAP=SSAP=01000010

Configuration message comprises tree root ID,
cost of forwarding (the number of hops from
the tree root), transmitting bridge ID, port ID
at the transmitting bridge, settable parameters.

Destination Source DSAP SSAP configuration message


Best Configuration Message

The best configuration message has the lowest root ID. If
multiple messages have the same root ID, the best message
has the lowest cost. If multiple messages have the same root
ID, and the same cost, the best message has the lowest
transmitting bridge ID. If multiple messages have these three
values the same, the best one has the lowest port ID on the
transmitting bridge.

Root

Cost

Bridge

Port 1

12

93

51

Port 2

12

85

40

Port 3

15

31

27


Port 2 becomes a

root port, and forwards

messages to ports

1 and 3

Best Configuration Message





Root

Cost

Bridge

Port 1

12

93

51

Port 2

12

85

40

Port 3

15

31

27


Root bridge is 12, given bridge B becomes designated
bridge for LANs attached to its ports 1 and 3, the bridge port
2 becomes a root port, and forwards configuration messages
to ports 1 and 3, cost (the number of hops) is incremented by
1 becoming 86 and updated in the configuration message
which is then forwarded.

Example of ST Algorithm

Bridge B92 receives the configuration
messages

81.0.81

B92

PORT 1

PORT 3

PORT 2

PORT 4

PORT 5

41.12.111

41.12.315

41.19.125

41.13.90

Example of ST Algorithm

Bridge B92 receives the configuration
messages

B92

PORT 1

PORT 3

PORT 2

PORT 4

PORT 5

81.0.81

41.12.111

41.12.315

41.19.125

41.13.90

41.13.92


41.13.92

Refinements of ST Algorithm

Failures of the links or bridges must be detected by
the downstream bridges. Root bridge sends
configuration messages reapetedly. Configuration
messages have age, and maximum age.

Changes of the topology because of failures or new
equipment are announced with the special messages.
Upstream bridges acknowledge those notifications.

Changes of topology should not introduce loops. For
this reason preforwarding time is introduced.

Cache values with the positions of the stations should
be regularly updated. So, cache is deleted after
timeout period.


protocol identifier

version

message type



TCA

reserved TC

root ID

cost of path to root

bridge ID

port ID

message age

max age

hello time

forward

delay

broj okteta

8

2

2

2

2

2

8

4

1

1

1

2

Configuration Message Format

Topology

Change

Flag

Topology

Change

Ack

Flag

protocol identifier

version

message type

broj okteta

2

1

1

Topology Change Notification
Message Format

Topology Change Due to Failures

Root transmits configuration messages with age equal
to 0 once per each hello time. Root also specifies the
maximum age.

Each bridge increments message age field in each slot
of a specified duration. It sends this message every
hello time.

When the message age exceeds the maximum age, the
bridge discards the configuration message in
question, and recalculates the spanning tree.


Example of Failure

Configuration message at root port 4 expires,
and port 3 becomes a root port.

B92

PORT 1

PORT 3

PORT 2

PORT 4

PORT 5

41.12.111

41.12.315

41.13.90

41.13.92


41.13.92

41.13.92

Example of Failure

Configuration message at root port 3 expires,
and port 5 becomes a root port.

B92

PORT 1

PORT 3

PORT 2

PORT 4

PORT 5

41.12.111

41.12.315

41.13.90

41.14.92

41.14.92


41.14.92

41.14.92

Example of Failure

Configuration message at root port 5 expires,
and bridge B92 becomes a root bridge.

B92

PORT 1

PORT 3

PORT 2

PORT 4

PORT 5

41.12.111

41.12.315

41.13.90

92.0.92


92.0.92

92.0.92

92.0.92

92.0.92

Notification of Topology Change

Topology changes when a bridge or a link fails, or a new
bridge or a new link is added to the network.

Bridge that notices the topology change sends the topology
change notification message on its root port to the upstream
bridge, once per hello time, until the upstream bridge
acknowledges the receipt of the topology change notification
message.

Topology change notification messages are propagated in this
way bridges in the tree to the root bridge. Root then sets
topology change flag in the configuration messages that it
sends downstream.

Avoiding Loops as Topology Changes

Loops can be formed in transient intervals when there
are topology changes. When topology changes a new
tree is calculated. Some bridges might turn on before
the others turn off, and loop can be formed.

Before some bridge start forwarding, it waits during
the time interval sufficient for all bridges to get the
information about new spanning tree. Waiting time is
divided into listening and learning intervals. During
the listening interval, the bridge only forwards
configuration messages. During the learning interval,
the bridge receives messages only to learn about the
positions of the stations, but does not forward them.

Cache Duration

Because placement of stations changes, the cache
entries linking stations and ports should be deleted
occassionaly, after the cache timeout period.

Cache timeout period should be as long as several
minutes. But, when the bridges get the configuration
messages with the topology change flag set, they set
the cache timeout period to the forwarding delay.


Settable Parameters

Bridge and the port priorities: two and one
octet respectively.

Hello time: the time that elapses between two
consecutive configuration messages, or
between consecutive topology change
notification messages. Recommended 2s.

Max age: the configuration message age value
for which it is discarded as too old.
Recommended value 20s, 2s per hop.

Settable Parameters

Forward delay: the duration of the listening
modes, and the learning mode before a bridge
starts forwarding data. It is half the time
needed for the topology information to spread.
Recommended value 30s.

Long cache timer: recommended 5min.

Path cost: the cost to be added to the cost field
at some bridge.


Problems of Bridging

The probability of packet loss increases.

The delay increases.

Error rate increases when CRC is changed.

Packet reordering when the tree is reconfigured.

Packet duplication because of temporary loops.

Stations cannot use the maximum packet size.

LAN specific information such as priority may be
lost.

Unexpected packet format conversion may occur.


Virtual LAN (VLAN)

VLAN is equivalent to the broadcast domain.

Motivations for VLANs are: separation of
broadcast domains, moving stations without
changing their IP addresses, security.

Multiple VLANs can be attached to one packet
switch. Stations attached to one port may
belong to one or more VLANs.

Packet travelling between switches have
VLAN tag comprising 2 bytes.

Virtual LANs


(a)

Four physical LANs organized into two VLANs,
gray and white, by two bridges.
(b)

The same 15 machines
organized into two VLANs by switches.

The IEEE 802.1Q Standard


The 802.3 (legacy) and 802.1Q Ethernet frame
formats.