Configuring IP Addresses on Interfaces


The IP address and subnet mask are required on each network interface in a TCP/IP network. The default gateway is not necessary on a router as it is the default gateway to those switches and devices directly attached to the routers interfaces. A Cisco switch, however, can be configured with a default gateway. The example that follows walks you through configuring an IP address on a Fast Ethernet interface.

When you first connect to the router ”whether from a console cable or a Telnet session ”you are automatically at the User EXEC level, as indicated by a > symbol. Use the enable command to enter the Privilege Exec Mode, which is identified with a # symbol as shown below:

 RTR>  enable  RTR# 

Privilege Exec mode is where you would use most show and debug commands for troubleshooting. The User Exec Mode does have a very limited number of show commands available. The config terminal commands bring you in to Global Configuration Mode, identified by a (config)# added to the router's prompt. Changes made here affect every interface on the router.

 RTR#  config terminal  

Next we need to go into Interface Configuration Mode. You do this by using the interface command, followed by the type of interface, then the number of the interface you need to configure. In this case we are configuring the first of two Fast Ethernet Interfaces. On a Cisco router, the first interface is always identified by a zero, the second a one, and so on.

 RTR(config)#  interface fastethernet0  

Above we see the command to select the interface. Once in Interface Configuration Mode, you will notice the prompt now shows a (config-if)# identifying the new mode. You now need to assign the IP address and subnet mask. To do so, apply the 192.16.1.254 IP address, which becomes the default gateway for the hosts on the network attached to the interface and the Class C subnet mask as shown below.

 RTR(config-if)#  ip address 192.16.1.254 255.255.255.0  

Above we see the IP address now configured on the interface as 192.16.1.254 with a 24-bit subnet mask. The no shutdown command brings up the interface as shown.

 RTR(config-if)#  no shutdown  1w5d: %LINK-5-CHANGED: Interface FastEthernet0,     changed state to administratively down 1w5d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0,     changed state to down 1w5d: %LINK-3-UPDOWN: Interface FastEthernet0, changed state to up 1w5d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0,     changed state to up 

The output above shows that the IP address configuration was successful, that the interface and the protocols running on the interface have changed states to "up", and that the interface is operating properly.



CCNP CIT Exam Cram 2 (642-831)
CCNP CIT Exam Cram 2 (Exam Cram 642-831)
ISBN: 0789730219
EAN: 2147483647
Year: 2003
Pages: 213
Authors: Sean Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net