Bridges and
switches are layer 2 devices that segment (break up) collision domains. A
collision domain basically includes all the devices that share a media type at
layer 1.
Difference between bridge and switch
Functions
|
Bridges
|
Switches
|
Form of switching
|
Software
|
Hardware
|
Method of switching
|
Store and forward
|
Store and forward, cut-through,
Fragment-free
|
port
|
2-20
|
100 plus
|
Duplex
|
Half
|
Half and full
|
Collision domains
|
1 per port
|
1 per port
|
Broadcast domains
|
1
|
per vlan
|
STP instances
|
1
|
1
|
Methods of Switching
Store and Forward
Store and
Forward is the basic mode that bridges and switches use. It is the only mode
that bridges can use, but many switches can use one or more of the other modes
as well, depending on the model. In Store-and-Forward switching, the entire
frame is buffered (copied into memory) and the Cyclic Redundancy Check (CRC),
also known as the FCS or Frame Check Sequence is run to ensure that the frame
is valid and not corrupted.
Cut Through
Cut Through
is the fastest switching mode. The switch analyzes the first six bytes after the
preamble of the frame to make its forwarding decision. Those six bytes are the
destination MAC address, which, if you think about it, is the minimum amount of
information a switch has to look at to switch efficiently. After the forwarding
decision has been made, the switch can begin to send the frame out the
appropriate port(s), even if the rest of the frame is still arriving at the
inbound port. The chief advantage of Cut-Through switching is speed; no time is
spent running the CRC, and the frame is forwarded as fast as possible
Fragment-free
Switching
will switch a frame after the switch sees at least 64 bytes, which prevents the
switching of runt frames. This is the default switching method for the 1900
series. 2950 doesn’t support cut-through Fragment-Free switching is sometimes
called "runtless" switching for this reason. Because the switch only
ever buffers 64 bytes of each frame, Fragment Free is a faster mode than Store
and Forward, but there still exists a risk of forwarding bad frames, so the
previously described mechanisms to change to Store and Forward if excessive bad
CRCs are received are often implemented as well.
Functions of Bridging and Switching
Learning
Address
learning refers to the intelligent capability of switches to dynamically learn
the source MAC addresses of devices that are connected to its various ports.
These addresses are stored in RAM in a table that lists the address and the
port on which a frame was last received from that address. This enables a
switch to selectively forward the frame out the appropriate port(s), based on
the destination MAC address of the frame. Anytime a device that is connected to
a switch sends a frame through the switch, the switch records the source MAC
address of the frame in a table and associates that address with the port the
frame arrived on.
Bridges
place learned source MAC addresses and their corresponding ports in a CAM
(content addressable memory
Forwarding
Address
learning refers to the intelligent capability of switches to dynamically learn
the source MAC addresses of devices that are connected to its various ports.
These addresses are stored in RAM in a table that lists the address and the
port on which a frame was last received from that address. This enables a
switch to selectively forward the frame out the appropriate port(s), based on
the destination MAC address of the frame. Anytime a device that is connected to
a switch sends a frame through the switch, the switch records the source MAC
address of the frame in a table and associates that address with the port the
frame arrived on.
There are
some situations in which a switch cannot make its forwarding decision and flood
the frame.
Three frame types that are always flooded:
Three frame types that are always flooded:
- Broadcast address Destination
MAC address of FFFF.FFFF.FFFFF
- Multicast address Destination
MAC addresses between 0100.5E00.0000 and 0100.5E7F.FFFF
- Unknown unicast destination MAC
addresses The MAC address is not found in the CAM table
Removing layer-2 loops
Spanning
Tree Protocol (STP - 802.1d) The main function of the Spanning Tree Protocol
(STP) is to remove layer-2 loops from your topology
Static MAC Addresses
In addition
to having the switches learn MAC addresses dynamically, you can manually create
static entries. You might want to do this for security reasons. Statically
configuring MAC addresses on the switch is not very common today. If
configured, static entries are typically used for network devices, such as
servers and routers.
Port Security Feature
Port
security is a switch feature that allows you to lock down switch ports based on
the MAC address or addresses associated with the interface, preventing
unauthorized access to a LAN. Three options are possible if a security
violation occurs—the MAC address is seen connected to a different port.
- protect
When the number of secure addresses reaches the maximum number allowed, any additionally learned addresses will be dropped. - restrict
Causes the switch to generate a security violation alert. - shutdown
Causes the switch to generate an alert and to disable the interface. The only way to re-enable the interface is to use the no shutdown command. This is the default violation mode if you don’t specify the mode.
EtherChannels
An EtherChannelis
a layer 2 solution that allows you to aggregate multiple layer 2 Ethernet-based
connections between directly connected devices. Basically, an EtherChannel
bundles together multiple Ethernet ports between devices, providing what
appears to be single logical interface.
EtherChannels
provide these advantages:
- Redundancy If one connection in the
channel fails, you can use other connections in the channel.
- More bandwidth each connection can be used simultaneously to
send frames.
- Simplified management
Configuration is done on the logical interface, not on each
individual connection in the channel.
EtherChannel Restrictions
Interfaces
in an EtherChannel must be configured identically: speed, duplexing, and VLAN
settings (in the same VLAN if they are access ports or the same trunk
properties) must be the same.
When setting
up EtherChannels, you can use up to eight interfaces bundled together:
- Up to eight Fast Ethernet
connections, providing up to 800 Mbps
- Up to eight Gigabit Ethernet
connections, providing up to 8 Gbps
- Up to eight 10-Gigabit Ethernet
connections, providing up to 80 Gbps
You can have
a total of six EtherChannels on a switch.
EtherChannel Operations
Channels can
be formed dynamically between devices by using one of two protocols: Port
Aggregation Protocol (PAgP) or Link Aggregation Control Protocol (LACP).
Remember that ports participating in a channel must be configured identically.
Once a channel is formed, load balancing can be used by the connected devices
to utilize all the ports in the channel. Load balancing is performed by
reducing part of the binary addressing in the frame or packet to a numeric
value and then associating the numeric value to one of the ports in the
channel.
Load
balancing can use MAC or IP addresses, source or destination addresses, or both
source and destination address pairs. With this fashion, you are guaranteed
that all links in the channel will be utilized; however, you are not guaranteed
that all the ports will be utilized the same. For example, if you are load
balancing based on source addresses; you are guaranteed that different source MAC
addresses will use different ports in the channel. All traffic from a
single-source MAC address, however, will always use the same port in the
channel. Given this situation, if you have one device generating a lot of
traffic, that link will possibly be utilized more than other links in the
channel. In this situation, you might want to load balance based on destination
or both source and destination addresses.
0 comments:
Post a Comment