
Basic Switch Operation and Verifi cation
373
CertPrs8
/CCNA
®
Cisco Certified Network Associate Study Guide/Richard Deal/149728-5/Chapter 12
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. If a
user moves her connection from one switch port to another, her traffic won’t be
forwarded correctly if you had statically configured her address to the old port. For
traffic to flow correctly again, you would have to change the old entry to reflect the
user’s new interface. You may want to do this to ensure that the user doesn’t unplug
her connection from one port and connect it to another port, where the user might
have access to more networking resources.
Unlike dynamic entries in a CAM table, static entries do not age out. This is true
even if you reboot the switch (assuming your configuration has been saved). Also,
if you have a static entry for a device and you move that device to a different port,
even though the switch will see the change, the static entry will always override the
learning function of the switch.
On a 2960 switch, use the following command to create a static entry in the
CAM table:
Switch(config)#
mac-address-table static
MAC_address
vlan
VLAN_#
interface
type
module
/
port_#
In addition to specifying the MAC address of the device and the interface where the
device is located, you must also specify the VLAN in which the device is located
(see Chapter 13). Use the
show mac-address-table
command to view your
new entries. To remove a static entry from the CAM table, preface the preceding
command with the
no
parameter.
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. If you are concerned about controlling what user device is
located from which interface on a switch, either use the port security feature
or 802.1x authentication.
Be familiar with the output
of the
show
mac-address-table
command. If a destination MAC address is
not in the table (unknown), the switch will
flood it.
ch12.indd 373
3/12/08 4:45:10 PM