This chapter provides information and commands concerning the following topics:
Resetting switch configuration
Setting IP addresses and default gateways
Setting interface descriptions
Managing the MAC address table
Tip
If you set a hostname that begins with a number, you receive a warning about using illegal characters. However, the switch accepts the name.
Switch(config)#hostname 2960
% Hostname contains one or more illegal characters.
2960(config)#
Setting passwords for the 2960 series switches is the same method as used for a router.
For the 2960 series switches, the IP address of the switch is just that—the IP address for the entire switch. That is why you set the address in VLAN 1 (the default VLAN of the switch) and not in a specific Ethernet interface. If you choose to make your management VLAN a different number, you would use these commands in that VLAN using the interface vlan x command, where x is the number of your management VLAN.
Tip
The 2960 series switches have ports ranging from 8 to 48 Fast Ethernet ports named fa0/1, fa0/2, ... fa0/48—there is no fastethernet 0/0. This is true for the 2960G series, in which all ports are Gigabit Ethernet ports named gi0/0, gi0/2...gi0/48. Again, there is no GigabitEthernet 0/0 port.
Tip
When automatic medium-dependent interface crossover (Auto-MDIX) is enabled on an interface, the interface automatically detects the required cable connection type (straight-through or crossover) and configures the connection appropriately. When connecting switches without the Auto-MDIX feature, you must use straight-through cables to connect to devices such as servers, workstations, or routers and crossover cables to connect to other switches or repeaters. With Auto-MDIX enabled, you can use either type of cable to connect to other devices, and the interface automatically corrects for incorrect cabling.
Tip
The Auto-MDIX feature is enabled by default on switches running Cisco IOS Release 12.2(18)SE or later. For releases between Cisco IOS Release 12.1(14)EA1 and 12.2(18)SE, the Auto-MDIX feature is disabled by default.
Tip
If you are working on a device where Auto-MDIX is enabled by default, the command does not show up when you enter show running-config.
Caution
When you enable Auto-MDIX, you must also set the interface speed and duplex to auto so that the feature operates correctly. In other words, if you use Auto-MDIX to give you the flexibility to use either type of cable to connect your switches, you lose the ability to hard-set the speed/duplex on both sides of the link.
The following table shows the different link state results from Auto-MDIX settings with correct and incorrect cabling.
Figure 6-1 shows the network topology for the basic configuration of a 2960 series switch using commands covered in this chapter.
18.219.189.247