Chapter 6. Configuring a Switch

This chapter provides information and commands concerning the following topics:

Image Help commands

Image Command modes

Image Verifying commands

Image Resetting switch configuration

Image Setting host names

Image Setting passwords

Image Setting IP addresses and default gateways

Image Setting interface descriptions

Image The mdix auto command

Image Setting duplex operation

Image Setting operation speed

Image Managing the MAC address table

Image Configuration example

Help Commands

Image

Command Modes

Image

Verifying Commands

Image

Resetting Switch Configuration

Image

Setting Host Names

Image

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

Setting passwords for the 2960 series switches is the same method as used for a router.

Image

Setting IP Addresses and Default Gateways

Image

Tip

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.


Setting Interface Descriptions

Image

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.


The mdix auto Command

Image

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.

Image

Setting Duplex Operation

Image

Setting Operation Speed

Image

Managing the MAC Address Table

Image

Configuration Example

Figure 6-1 shows the network topology for the basic configuration of a 2960 series switch using commands covered in this chapter.

Image

Figure 6-1 Network Topology for 2960 Series Switch Configuration

Image
Image
Image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.189.247