Chapter 11 Configuring Interface Characteristics

Configuring Layer 3 Interfaces

If the switch is notified by VLAN Trunking Protocol (VTP) of a new VLAN, it sends a message that there are not enough hardware resources available and shuts down the VLAN. The output of the show vlan user EXEC command shows the VLAN in a suspended state.

If the switch attempts to boot up with a configuration that has more VLANs and routed ports than hardware can support, the VLANs are created, but the routed ports are shut down, and the switch sends a message that this was due to insufficient hardware resources.

All Layer 3 interfaces require an IP address to route traffic. This procedure shows how to configure an interface as a Layer 3 interface and how to assign an IP address to an interface.

Note If the physical port is in Layer 2 mode (the default), you must enter the no switchport interface configuration command to put the interface into Layer 3 mode. Entering a no switchport command disables and then re-enables the interface, which might generate messages on the device to which the interface is connected. Furthermore, when you put an interface that is in Layer 2 mode into Layer 3 mode, the previous configuration information related to the affected interface might be lost, and the interface is returned to its default configuration

Beginning in privileged EXEC mode, follow these steps to configure a Layer 3 interface:

 

Command

Purpose

Step 1

 

 

configure terminal

Enter global configuration mode.

Step 2

 

 

interface {gigabitethernet interface-id} {vlan vlan-id}

Specify the interface to be configured as a Layer 3

 

{port-channelport-channel-number}

interface, and enter interface configuration mode.

Step 3

 

 

no switchport

For physical ports only, enter Layer 3 mode.

Step 4

 

 

ip address ip_address subnet_mask

Configure the IP address and IP subnet.

Step 5

 

 

no shutdown

Enable the interface.

Step 6

 

 

end

Return to privileged EXEC mode.

Step 7

 

 

show interfaces [interface-id]

Verify the configuration.

 

show ip interface [interface-id]

 

 

show running-config interface [interface-id]

 

Step 8

 

 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

 

 

 

To remove an IP address from an interface, use the no ip address interface configuration command. This example shows how to configure a port as a routed port and to assign it an IP address:

Switch# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)# interface gigabitethernet1/0/2

Switch(config-if)# no switchport

Switch(config-if)#ip address 192.20.135.21 255.255.255.0

Switch(config-if)# no shutdown

 

Catalyst 3750-E and 3560-E Switch Software Configuration Guide

11-32

OL-9775-02

Page 328
Image 328
Cisco Systems 3750E manual Interface gigabitethernet interface-id vlan vlan-id, No switchport, No shutdown, 11-32