background image
582
Appendix A
Introduction to the Cisco IOS: Hands-on Labs
00:57:08: %LINK-3-UPDOWN: Interface Ethernet0, changed
state to up
00:57:09: %LINEPROTO-5-UPDOWN: Line protocol on
Interface Ethernet0, changed state to up
Router#sh int e0
Ethernet0 is up, line protocol is up
3.
Configure the router to enable all interfaces by issuing the no
shutdown
command on all interfaces.
Lab A.8: Configuring an IP Address
on an Interface
Y
ou don't have to use Internet Protocol (IP) on your routers; however,
IP is typically used on all routers. To configure IP addresses on an interface,
use the ip address command from interface configuration mode.
1.
Configure the Ethernet 0 interface with the IP address of
172.16.10.2/24.
Router(config)#int e0
Router(config-if)#ip address 172.16.10.2 255.255.255.0
Router(config-if)#no shut
Notice that you turn on an interface with the no shut command.
Remember to look at the command show interface e0, for example,
which will show you if it is administratively shut down or not. show
running-config
will also show you if the interface is shut down.
2.
If you want to add a second subnet address to an interface, then you
must use the secondary command. If you type another IP address and
press Enter, it will replace the existing IP address and mask. To add a
secondary IP address, use the secondary command.
Router(config-if)#ip address 172.16.20.2 255.255.255.0
secondary
Router(config-if)#^Z
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com