Assign or configure IP addresses on Cisco routers
Every active interface on a Cisco router to be used with IP requires an IP address assigned to it. This short recipe describes how to set an interface’s IP address.
Given an interface fastethernet1, the IP address 192.168.1.5 with the subnet mask 255.255.255.0 can be assigned to it using the following command from privileged mode:
Router(config)#interface fastethernet1
Router(config-if)#ip address 192.168.1.5 255.255.255.0
Router(config-if)#no shut
The last command is important. It is an abbreviated form of “no shutdown.” The default state of an interface is “shutdown” which makes the interface administratively down. If you plumb up an interface and it doesn’t work, check to make sure it isn’t administratively down first.








sajan said on August 27, 2009
Thank you very much
Iliyya said on April 20, 2011
i add ip for interface 878 and recive the error IP addresses may not be configured on L2 links.
Prem said on November 12, 2011
How to configure ip address for an interface in a switch ?
I keep getting the same error(I tried to configure the ip address to an interface of a switch with the commands you had mentioned earlier), i have attached the error that configured to me
”
Switch(config-if)#ip address 192.168.1.5 255.255.255.0
^
% Invalid input detected at ‘^’ marker.
“
Veronica Hearst said on December 8, 2011
Thanks It rally helped me As I m new to using the cisco your post is very helpful for Thanks again.:)