Learning Bridges
The simple bridges described above re-transmit
every packet whether this is necessary or not. A
learning bridge examines the source field of every
packet it sees on each port and builds up a picture
of which addresses are connected to which ports.
This means that it will NOT re-transmit a packet
if it knows that the destination address is connected
to the same port as the bridge saw the packet on.
A special problem arises if a bridge sees a packet
addressed to a destination that is not in its address
table. In this case the packet is re-transmitted
on every port except the one it was received on.
Bridges also age address table entries, if a given
address has not been heard from in a specified period
of time then the address is deleted from the address
table.
Prohibiting loops is one of the main functions of
bridges. Most bridges use a method known as the 'spanning
tree algorithm' to construct an effect non-looping
topology by deciding not to use certain of the links
in the network. It is also possible to reconfigure
the network dynamically.
The spanning tree algorithm works by bridges interchanging
special messages known as configuration bridge protocol
data units as described in IEEE 802.1. The configuration
message contains enough information to enable the
bridges to
- Elect a single bridge, from amongst all the
connected bridges to be the "root" bridge.
- Calculate the shortest path distance to the
"root" bridge from each bridge.
- For each LAN identify a "designated bridge"
on that LAN that will be used for forwarding packets
towards the root.
- Choose a port on each bridge that gives the
best path towards the root.
- Select ports to be included in the spanning
tree.
The effective topology after construction of the
spanning tree is loop free, this is achieved by
effectively choosing not to use certain links between
bridges. The links are still there and may come
into use if the network is re-configured.
Configuration messages are sent to a special multicast
address meaning "all bridges" using the
binary SAP value 01000010. Configuration messages
are autonomously originated by bridges but are NOT
forwarded by bridges. There are three pieces of
information in a configuration message.
- The ID of the bridge assumed to be root.
- The ID of the bridge transmitting the message.
- The cost of the best known path from the transmitting
bridge to the assumed root.
- The port number the message was transmitted
on.
A bridge initially assumes itself to be root with
a path cost of zero. For each port a bridge will
receive incoming configuration messages from other
bridges on the LAN connected to that port. For each
port the bridge will remember the best configuration
message. T
Finally if the configuration message a bridge receives
on any port is better than the configuration message
it would transmit, it stops transmitting configuration
messages on that port and uses the information to
re-calculate the information in the configuration
messages it will transmit on other ports.
The method described above details how a network
starts up. It is also necessary for networks to
be able to reconfigure automatically if a node or
link fails or a new node or link comes on-line.
To allow for reconfiguration all the stored configuration
messages in a bridge are aged. Once the age of a
configuration message exceeds a certain value, it
is discarded and the configuration re-calculated.
In the normal course of events the root bridge periodically
transmits configuration messages with an age of
zero, receipt of these by bridges causes the bridges
to transmit their own configuration messages also
with an age of zero. The time between such messages
is called the "Hello Time"
Once the network has stabilized bridges will only
issue configuration messages if they receive such
messages or if the age of their internal messages
has exceeded the maximum. Configuration messages
with age zero can only be transmitted if a configuration
message with age zero has been received.
Bridges may not attempt to forward data traffic
whilst the "spanning tree" is being calculated,
in fact they should not even attempt the "learning"
phase until the tree has been defined. This is called
the "forward delay" A special "topology
change" flag in a configuration message forces
a bridge into the "spanning tree" calculation
mode.
Ethernet Switching
Switches are data communications devices that operate
principally at Layer 2 of the OSI reference model.
As such, they are widely referred to as data link
layer devices.
Today, switching technology has emerged as the
evolutionary heir to bridging based internetworking
solutions. Switching implementations now dominate
applications in which bridging technologies were
implemented in prior network designs. Superior throughput
performance, higher port density, lower per-port
cost, and greater flexibility have contributed to
the emergence of switches as replacement technology
for bridges and as complements to routing technology.
Switching occur at the link layer, which controls
data flow, handles transmission errors, provides
physical (as opposed to logical) addressing, and
manages access to the physical medium. Bridges provide
these functions by using various link-layer protocols
that dictate specific flow control, error handling,
addressing, and media-access algorithms.
switches are not complicated devices. They analyze
incoming frames, make forwarding decisions based
on information contained in the frames, and forward
the frames toward the destination. In some cases,
such as source-route bridging, the entire path to
the destination is contained in each frame. In other
cases, such as transparent bridging, frames are
forwarded one hop at a time toward the destination.
Upper-layer protocol transparency is a primary
advantage of both bridging and switching. Because
both device types operate at the link layer, they
are not required to examine upper-layer information.
This means that they can rapidly forward traffic
representing any network-layer protocol. It is not
uncommon for a bridge to move AppleTalk, DECnet,
TCP/IP, XNS, and other traffic between two or more
networks.
Switches are capable of filtering frames based
on any Layer 2 fields. Certain types of switches
can be programmed to reject (filter and not forward)
all frames sourced from a particular network. Because
link-layer information often includes a reference
to an upper-layer protocol, bridges usually can
filter on this parameter. Furthermore, filters can
be helpful in dealing with unnecessary broadcast
and multicast packets.
By dividing large networks into self-contained
units, bridges and switches provide several advantages.
Because only a certain percentage of traffic is
forwarded, a bridge or switch diminishes the traffic
experienced by devices on all connected segments.
The bridge or switch will act as a firewall for
some potentially damaging network errors, and both
accommodate communication between a larger number
of devices than would be supported on any single
LAN connected to the bridge. Bridges and switches
extend the effective length of a LAN, permitting
the attachment of distant stations that were not
previously permitted.
Although bridges and switches share
most relevant attributes, several distinctions differentiate
these technologies. Switches are significantly faster
because they switch in hardware, while bridges switch
in software and can interconnect LANs of unlike
bandwidth. A 10-Mbps Ethernet LAN and a 100-Mbps
Ethernet LAN, for example, can be connected using
a switch. Switches also can support higher port
densities than bridges. Some switches support cut-through
switching, which reduces latency and delays in the
network, while bridges support only store-and-forward
traffic switching. Finally, switches reduce collisions
on network segments because they provide dedicated
bandwidth to each network segment. Below, is a basic
diagram of industrial devices connecting to an industrial
Ethernet switch.

LAN switches are used to interconnect multiple
LAN segments. LAN switching provides dedicated,
collision-free communication between network devices,
with support for multiple simultaneous conversations.
LAN switches are designed to switch data frames
at high speeds.