2-290
Catalyst 6500 Series Switch Command Reference—Release7.6
78-15328-01
Chapter2 Catalyst 6500 Series Switch and ROM Monitor Commands
set interface
Usage Guidelines The set interface sc0 dchp command is valid only when the address is learned from the DHCP server
and available in privileged mode only.
Two configurable network interfaces are on a Catalyst6500 series switch: in-band (sc0) and SLIP (sl0).
Configuring the sc0 interface with an IP address and subnet mask allows you to access the switch CLI
via Telnet from a remote host. You should assign the sc0 interface to an active VLAN configured on the
switch (the default is VLAN 1). Make sure the IP address you assign is in the same subnet as other
stations in that VLAN.
Configuring the sl0 interface with an IP address and destination address allows you to make a
point-to-point connection to a host through the console port. Use the slip attach command to activate
SLIP on the console port (you will not be able to access the CLI via a terminal connected to the console
port until you use the slip detach command to deactivate SLIP on the console port).
When you specify the netmask value, this indicates the number of bits allocated to subnetting in the
hostid section of the given Class A, B, or C address. For example, if you enter an IP address for the sc0
interface as 172.22.20.7, the hostid bits for this Class B address is 16.
If you enter the netmask value in length of bits, for example, 204.20. 22.7/24 , the rang e for leng th is from
0 to 31 bits. If you do not enter the netmask va lue, the number of bits is assumed to be the natural
netmask.
Examples This example shows how to use set interface sc0 and set interface sl0 from the console port. It also
shows how to bring down interface sc0 using a terminal connected to the console port:
Console> (enable) set interface sc0 192.20.11.44/255.255.255.0
Interface sc0 IP address and netmask set.
Console> (enable) set interface sl0 192.200.10.45 192.200.10.103
Interface sl0 SLIP and destination address set.
Console> (enable) set interface sc0 down
Interface sc0 administratively down.
Console> (enable)
This example shows how to set the IP address for sc0 through a Telnet session. Note that the default
netmask for that IP address class is used (for example, a Class C address uses 255.255.255.0, and a
Class B uses 255.255.0.0):
Console> (enable) set interface sc0 192.200.11.40
This command may disconnect active telnet sessions.
Do you want to continue (y/n) [n]? y
Interface sc0 IP address set.
This example shows how to take the interface out of operation through a Telnet session:
Console> (enable) set interface sc0 down
This command will inactivate telnet sessions.
Do you want to continue (y/n) [n]? y
Interface sc0 administratively down.
This example shows how to assign the sc0 interface to a particular VLAN:
Console> (enable) set interface sc0 5
Interface sc0 vlan set.
Console> (enable)
This example shows what happens when you assign the sc0 interface to a nonactive VLAN:
Console> (enable) set interface sc0 200
Vlan is not active, user needs to set vlan 200 active
Interface sc0 vlan set.
Console> (enable)