8-23
Catalyst 3550 Multilayer Switch Software Configuration Guide
78-11194-03
Chapter 8 Configuring Interface Characteristics
Configuring Layer 3 Interfaces
Beginning in privileged EXEC mode, follow these steps to configure a Layer 3 interface:
To remove an IP address from an interface, use the no ip address interface configuration command.
This example shows how to configure an interface 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 gigabitethernet0/2
Switch(config-if)# no switchport
Switch(config-if)# ip address 192.20.135.21 255.255.255.0
Switch(config-if)# no shutdown
Switch(config-if)# end
This is an example of output from the show interfaces privileged EXEC command for an interface:
Switch(config)# show interfaces gigabitethernet0/2
GigabitEthernet0/2 is up, line protocol is up
Hardware is Gigabit Ethernet, address is 0002.4b29.4400 (bia 0002.4b29.4400)
Internet address is 192.20.135.21/24
MTU 1500 bytes, BW 100000 Kbit, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s
input flow-control is off, output flow-control is off
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:02, output 00:00:08, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
89604 packets input, 8480109 bytes, 0 no buffer
Received 81848 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 input packets with dribble condition detected
60665 packets output, 6029820 bytes, 0 underruns
0 output errors, 0 collisions, 16 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Command
Purpose
Step 1
configure terminal
Enter global configuration mode.
Step 2
interface {{fastethernet | gigabitethernet} interface-id}
| {vlan vlan-id} | {port-channel port-channel-number}
Enter interface configuration mode, and enter the
interface to be configured as a Layer 3 interface.
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]
show ip interface [interface-id]
show running-config interface [interface-id]
Verify the configuration.
Step 8
copy running-config startup-config
(Optional) Save your entries in the configuration file.