Sep 16, 2013

Configuring an IP Address on an Interface in Cisco Router

Configuring an IP Address on an Interface
You don’t have to use 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.
Cisco_Interface
Router(config) #int  e0
Router (config-if)#ip   address   172.6.10.2   255.255.255.0
Router (config-if)#no shut
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.6.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
!
- – - – - ————————————————————
Sub interfaces
Sub interfaces allow you to create virtual interfaces within the router. The prompt then changes to
Router(config-subif)#
Router(config)#int  f0/0.  ?
<0-4294967295>FastEthernet interface number
Router(config)#int  f0/0. 1
Router(config-subif)#
———————————————————————-
Media type
To set the type of connector used,use the command media-type.How-ever,this is typically auto-detected.
Router(config)#int  fa  0/0.  ?
Router(config-if)#media-type  ?
100 Base X Use R J45 for-TX ;SC  FO for -FX
MII Use MII connector
———————————————————————-
Serial Interface Commands
To configure a serial interface,there are a couple of specifics that need to  be discussed.Typically,the interface will be attached to a CSU/DSU type of device that provides clocking for the line.However,if you have a back-to-back configuration used in a lab environment,for example,one end must provide clocking.this would be the DCE end of the cable.Cisco routers,by default,are all DTE devices,and you must tell an interface to provide clocking if it is to act as a DCE device.You configure a DCE serial interface with the clock rate command.
Router#config t
Router(config)#int  s0
Router(config-if)#clock rate 64000
%Error : This command applies only to DCE interfaces
Router(config-if)#int  s1
Router(config-if)#clock rate 64000
[note:-this command of clock speed only used if both router use back-to-back cable]

0 comments:

Post a Comment