background image
Command-Line Interface
215
If you want to add a second subnet address to an interface, you have to use
the secondary command. If you type another IP address and press Enter, it
will replace the existing IP address and mask. This is definitely a most excel-
lent feature of the Cisco IOS.
So, let's try it. To add a secondary IP address, just use the secondary
command:
Router(config-if)#ip address 172.16.20.2 255.255.255.0
secondary
Router(config-if)#^Z
You can verify both addresses are configured on the interface with the
show
running-config command (sh run for short):
Router#sh run
Building configuration...
Current configuration:
[output cut]
!
interface Ethernet0
ip address 172.16.20.2 255.255.255.0 secondary
ip address 172.16.10.2 255.255.255.0
!
I really wouldn't recommend having multiple IP addresses on an interface
because it's inefficient, but I showed you anyway just in case you someday
find yourself dealing with an MIS manager who loves a really lame network
design and makes you administrate it!
Serial Interface Commands
Before you jump in and configure a serial interface, there are a couple of
things you need to know. First, the interface will usually be attached to a
CSU/DSU type of device that provides clocking for the line. But if you have
a back-to-back configuration (for example, one that's used in a lab environ-
ment), one end--the data communication equipment (DCE) end of the
cable--must provide clocking. By default, Cisco routers are all data terminal
equipment (DTE) devices, so you must tell an interface to provide clocking
if you need it to act like a DCE device. You configure a DCE serial interface
with the clock rate command:
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com