|
|
Very little configuration is required to establish basic connectivity to the switch. This section describes the basic tasks needed to get the switch up and running:
Step 1 Prepare to Configure the Switch---Obtain the information you need to configure the switch.
Step 2 Establish a Console Port Connection---Connect to the switch through the console port to access the command-line interface (CLI).
Step 3 Set the Switch IP Configuration---Assign an IP address, subnet mask, and default gateway to the switch interface.
Step 4 Configure Switch Ports---Make sure the switch ports are properly configured to communicate with connected devices.
Before configuring the switch, make sure the chassis, switching modules, and power supplies are installed and cabled to specification. Refer to the hardware documentation for your switch for information on installation.
Before you begin configuring the switch, you should collect the following information:
Connecting a terminal to the supervisor engine console port allows you to access the switch CLI before the switch is configured and connected to the network.
You must enter privileged mode to perform most of the tasks described in this publication. Enter the enable command to enter privileged mode.
To connect to the switch through the console port and to enter privileged mode, perform this task:
This example shows the end of the bootup cycle and how to enter privileged mode. By default, both the normal and privileged mode passwords are not set; press Return at the Enter Password prompts. The output on your switch might look different, depending on the switch model you are booting.
<...output truncated...> Exiting Off-line Diagnostics IP address for Catalyst not configured BOOTP will commence after the ports are online Ports are coming online ... Cisco Systems, Inc. Console Enter password: 1999 Apr 08 15:35:14 %SYS-5-MOD_OK:Module 1 is online 1999 Apr 08 15:35:17 %SYS-5-MOD_OK:Module 2 is online 1999 Apr 08 15:35:17 %SYS-5-MOD_OK:Module 3 is online <Return> Console> enable Enter password: <Return> Console> (enable)
Before you can Telnet to your switch, you need to:
This information allows you to communicate with the switch using IP.
When configuring the switch for the first time, the in-band (sc0) interface is assigned to the default VLAN, VLAN 1.
After you have configured additional VLANs, you can assign the interface to any VLAN. Make sure the IP address you specify belongs to the IP subnet associated with that VLAN, and that you configure an appropriate default gateway for that subnet.
To set the switch IP configuration, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 Assign an IP address and subnet mask to the switch. | set interface sc0 ip_addr netmask |
Step 2 (Optional) Assign the switch interface to a VLAN. (If you do not specify a VLAN, VLAN 1 is used.) | set interface sc0 vlan_num |
Step 3 Specify one or more default gateways to the switch. The default gateway address should be the address of a router in the same subnet/VLAN as the switch IP address. | set ip route default gateway |
Step 4 Verify the in-band interface configuration. | |
Step 5 Verify the default gateway assignment. |
This example shows how to assign an IP address and default gateway to the switch, and verify the configuration:
Console> (enable) set interface sc0 10.10.1.20/24
Interface sc0 IP address set.
Console> (enable) set ip route default 10.10.1.1
Route added.
Console> (enable) show interface
sl0: flags=50<DOWN,POINTOPOINT,RUNNING>
slip 0.0.0.0 dest 0.0.0.0
sc0: flags=63<UP,BROADCAST,RUNNING>
vlan 1 inet 10.10.1.20 netmask 255.0.0.0 broadcast 10.255.255.255
me1: flags=62<DOWN,BROADCAST,RUNNING>
inet 0.0.0.0 netmask 255.0.0.0 broadcast 0.0.0.0
Console> (enable) show ip route
Fragmentation Redirect Unreachable
------------- -------- -----------
enabled enabled enabled
The primary gateway: 10.10.1.1
Destination Gateway RouteMask Flags Use Interface
--------------- --------------- ---------- ----- -------- ---------
default 10.10.1.1 0x0 UG 0 sc0
10.0.0.0 10.10.1.20 0xff000000 U 11 sc0
Console> (enable)
In most cases, the default port configuration is adequate. If you have trouble communicating with the connected device, check the port configuration on both ends of the link.
Gigabit Ethernet ports (and some Fast Ethernet ports) support flow control and link negotiation. In most cases, you do not need to change the default configuration.
To change the port configuration, perform this task in privileged mode:
| Task | Command |
|---|---|
Step 1 On 10/100-Mbps Fast Ethernet ports, you can explicitly set the port speed or you can use the auto keyword to allow the port to autonegotiate both port speed and duplex mode with the connected port. | set port speed mod_num/port_num {10 | 100 | auto} |
Step 2 On Ethernet or Fast Ethernet ports, set the port duplex mode. Make sure the duplex mode is the same on both ends of the link. | set port duplex mod_num/port_num {full | half} |
Step 3 On Fast or Gigabit Ethernet ports (on supported hardware), set the flow control mode for transmit (Tx) and receive (Rx). | set port flowcontrol mod_num/port_num {receive | send} {on | off | desired} |
Step 4 On Fast or Gigabit Ethernet ports (on supported hardware), configure link negotiation. | set port negotiation mod_num/port_num {enable | disable} |
Step 5 Set the port name, if desired. | set port name mod_num/port_num name_string |
Step 6 Verify the port configuration. | show port mod_num/port_num |
This example shows how to configure the port speed, duplex mode, and port name on a 10/100-Mbps Fast Ethernet port, and how to verify the port configuration:
Console> (enable) set port speed 6/1 100 Port(s) 6/1 speed set to 100Mbps. Console> (enable) set port duplex 6/1 full Port(s) 6/1 set to full-duplex. Console> (enable) set port name 6/1 Sparc Ultra Port 6/1 name set. Console> (enable) show port 6/1 Port Name Status Vlan Level Duplex Speed Type ----- ------------------ ---------- ---------- ------ ------ ----- ------------ 6/1 Sparc Ultra connected trunk normal full 100 10/100BaseTX <...output truncated...> Last-Time-Cleared -------------------------- Thu Apr 30 1999, 18:38:59 Console> (enable)
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Fri Oct 1 13:01:46 PDT 1999
Copyright 1989-1999©Cisco Systems Inc.