bridging

48
Bridging

Upload: sorena

Post on 19-Jan-2016

16 views

Category:

Documents


1 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Bridging

Bridging

Page 2: 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

Page 3: Bridging

Data Link Layer Switching

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

a single LAN.

Page 4: Bridging

Local Internetworking

A configuration with four LANs and two bridges.

Page 5: Bridging

Bridges from 802.x to 802.y

Operation of a LAN bridge from 802.11 to 802.3.

Page 6: Bridging

Bridges from 802.x to 802.y

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

Page 7: Bridging

Bridges

Various types of bridges− No-frills bridges− Learning bridges− Complete (Spanning Tree) bridges

Complete bridges− Topology changes− Timeout procedure− Settable parameters

Source routing bridgesVLANs

Page 8: Bridging

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.

Page 9: Bridging

Example of No-frills Bridge

BPORT 1 PORT 2

P RQ

PORT 3

Page 10: Bridging

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.

Page 11: Bridging

Example of Learning Bridge

Station A sends to station D

BPORT 1 PORT 2

A QMD

PORT 3

Page 12: Bridging

Example of Learning Bridge

Station A sends to station D

Z C

BPORT 1 PORT 2

A QMD

A

PORT 3

Page 13: Bridging

Example of Learning Bridge

Station D sends to station A

BPORT 1 PORT 2

A QMD

A

Z C

PORT 3

Page 14: Bridging

Example of Learning Bridge

Station D sends to station A

BPORT 1 PORT 2

A QMD

A

Z C

D

PORT 3

Page 15: Bridging

Example of Learning Bridge

Station Q sends to station A

BPORT 1 PORT 2

A QMD

A

Z C

D

PORT 3

Page 16: Bridging

Example of Learning Bridge

Station Q sends to station A

BPORT 1 PORT 2

A QMD

A

Z C

DQ

PORT 3

Page 17: Bridging

Example of Multiple Learning Bridges

A

B1

T

B2

MDQ K

A QPORT 1

K D M TPORT 2

D Q M APORT 1

T KPORT 2

LAN2LAN1 LAN3

Page 18: Bridging

B1 B2 B3

LAN1

LAN2

ATopology with Loops

Page 19: Bridging

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.

Page 20: Bridging

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.

Page 21: Bridging

Spanning Tree Bridges

(a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.

Page 22: Bridging

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.

Page 23: Bridging

Configuration Message

Configuration message format

DSAP=SSAP=01000010Configuration 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

Page 24: Bridging

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 forwardsmessages to ports 1 and 3

Page 25: Bridging

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.

Page 26: Bridging

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.11141.12.31541.19.125 41.13.90

Page 27: Bridging

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.11141.12.31541.19.125 41.13.90

41.13.92 41.13.92

Page 28: Bridging

Refinements of ST Algorithm

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.

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.

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

Page 29: Bridging

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.

Page 30: Bridging

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

Page 31: Bridging

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.

Page 32: Bridging

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.11141.12.315 41.13.9041.13.92 41.13.92

41.13.92

Page 33: Bridging

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.11141.12.315 41.13.9041.14.9241.14.92

41.14.9241.14.92

Page 34: Bridging

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.11141.12.315 41.13.90

92.0.9292.0.9292.0.9292.0.92

92.0.92

Page 35: Bridging

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.

Page 36: Bridging

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.

Page 37: Bridging

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.

Page 38: Bridging

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

TopologyChange AckFlag

Page 39: Bridging

protocol identifier

version

message type

broj okteta

2

1

1

Topology Change Notification Message Format

Page 40: Bridging

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.

Page 41: Bridging

Remote Bridges

Remote bridges can be used to interconnect distant LANs.

Page 42: Bridging

Remote Bridges

One bridge must inform the other if it ignores its packets.

Packet format has to be agreed upon.

Each bridge has to be connected to all bridges on WAN separately. They have to have individual network addresses because multicasting is not supported.

Page 43: Bridging

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.

Page 44: Bridging

Virtual LANs

A building with centralized wiring using hubs and a switch.

Page 45: Bridging

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.

Page 46: Bridging

The IEEE 802.1Q Standard

Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN

aware. The empty ones are not.

Page 47: Bridging

The IEEE 802.1Q Standard

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

Page 48: Bridging

References

Radia Perlman, Interconnections: Bridges, Routers, Switches and Internetworking Protocols, Addison-Wesley January 2000.