A Medium Access Control (MAC) address is a unique data link layer address assigned to a network device. A switch which is the data link layer device maintains a MAC address table to forward frames to a destination port. The MAC address table entries on the switch are built either statically or dynamically.
In this scenario, a static MAC address is configured on one of the ports that belongs to VLAN 1 on the switch through the Command Line Interface (CLI).
The objective of this document is to show you how to configure a static MAC address on the Sx500 and SG500X Series Stackable Switches through the CLI.
Note: Images may slightly vary depending on the exact model of the device you are using. The images below are taken from the SG500X-48MP switch.
Step 1. Log in to the CLI of the switch and enter your username and password for the device.
Note: The default username and password is cisco/cisco. In this example, the default User Name is cisco, and a personal password is used.
Step 2. In the CLI, enter the global configuration command mode by entering the following:
Step 3. Once on the global configuration mode, enter the command to specify a static MAC address to add to the MAC address table by entering the following:
SG500X (config) #mac address-table static c8:0a:a9:73:b0:a1 vlan 1 interface ge 1/1Note: In this example, the MAC address c8:0a:a9:73:b0:a1 for port GE 1/1 in vlan 1 is entered. The image above shows only the shortened version of the command indicated by a $ due to character length limitation on the CLI.
Step 4. Exit the global configuration mode by entering the following:
SG500X (config) #exitStep 5. Check the MAC address table to verify the entered static MAC address by entering the following:
SG500X#show mac address-tableThe MAC address table should now show the configured static MAC address in the specified vlan and port.
Step 6. (Optional) To permanently save your settings, enter the following:
SG500X# copy running-config startup-configStep 7. Enter Y in the Overwrite file prompt to indicate Yes and to save the settings to the startup configuration file.
Overwrite file [startup-config].... (Y/N) [N] ? YThe page will then confirm that copying the running configuration to the startup configuration is successful.
You now have successfully configured a static MAC address on the Sx500 and SG500X switch through the CLI.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2018 |
Initial Release |