![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/6/30/63096e50-8ee1-4c84-b87d-32eeabc07e61/63096e50-8ee1-4c84-b87d-32eeabc07e61-bg28e.png)
30-12
Software Configuration Guide—Release 15.0(2)SG
OL-23818-01
Chapter 30 Configuring Layer 3 Interfaces
Configuring Physical Layer 3 Interfaces
Configuring Physical Layer 3 Interfaces
Note Before you can configure physical Layer 3 interfaces, you must enable IP routing if IP routing is
disabled, and specify an IP routing protocol.
To configure physical Layer 3 interfaces, perform this task:
This example shows how to configure an IP address on Fast Ethernet interface 2/1:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# ip routing
Switch(config)# interface fastethernet 2/1
Switch(config-if)# no switchport
Switch(config-if)# ip address 10.1.1.1 255.255.255.248
Switch(config-if)# no shutdown
Switch(config-if)# end
Switch#
This example shows how to use the show running-config command to display the interface IP address
configuration of Fast Ethernet interface 2/1:
Switch# show running-config
Building configuration...
!
interface FastEthernet2/1
no switchport
ip address 10.1.1.1 255.255.255.248
!
…
ip classless
no ip http server
!
!
line con 0
line aux 0
Command Purpose
Step 1
Switch(config)#ip routing
Enables IP routing (required only if disabled)
Step 2
Switch(config)# interface {fastethernet |
gigabitethernet | tengigabitethernet} slot/port}
| {port-channel port_channel_number}
Selects an interface to configure.
Step 3
Switch(config-if)#no switchport
Converts this port from physical Layer 2 port to physical
Layer 3 port.
Step 4
Switch(config-if)# ip address ip_address
subnet_mask
Configures the IP address and IP subnet.
Step 5
Switch(config-if)# no shutdown
Enables the interface.
Step 6
Switch(config-if)# end
Exits configuration mode.
Step 7
Switch# copy running-config startup-config
Saves your configuration changes to NVRAM.
Step 8
Switch# show interfaces [type slot/interface]
Switch# show ip interfaces [type slot/interface]
Switch# show running-config interfaces [type
slot/interface]
Verifies the configuration.