cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
36550
Views
0
Helpful
6
Replies

use of no ip address command

mahesh18
Level 6
Level 6

Hi all,

need to know when and why we use the no ip address command?

thanks

mahesh

2 Accepted Solutions

Accepted Solutions

Hi,

That is correct, simply put - no IP address is defined for the interface by default.Once you enter an ip address for an interface you make it a L3 port. You can disable IP processing on a particular interface (revert back to L2) by removing its IP address with the 'no ip address' command.

Hope that helps!

Cheers,

Abhishek.

View solution in original post

The default configuration looks like this:

SWITCH(config)#show run int fa4/20
Building configuration...

Current configuration : 59 bytes
!
interface FastEthernet4/20
no ip address
shutdown

end

<<<<<<<<<< The above is a layer 3 interface now.

<<<<<<<<<< When you assign an ip address you would see the following.

SWITCH#conf t
SWITCH(config)#
SWITCH(config)#int fa4/20
SWITCH(config-if)#ip address 10.1.1.1 255.0.0.0
SWITCH(config-if)#^Z
SWITCH#show run int fa4/20
Building configuration...

Current configuration : 75 bytes
!
interface FastEthernet4/20
ip address 10.1.1.1 255.0.0.0
shutdown
end

SWITCH#

<<<<<<<<<<< when you make this a layer 2 inteface:

SWITCH#conf t
SWITCH(config)#int fa4/20
SWITCH(config-if)#no ip address
SWITCH(config-if)#switchport
SWITCH(config-if)#^Z
SWITCH#show run int fa4/20
Building configuration...

Current configuration : 56 bytes
!
interface FastEthernet4/20      <<<<< now its a layer 2 interface...
switchport
shutdown
end

SWITCH#

Hope this helps...

(please rate the helpful posts)

Regards,

ranraju

View solution in original post

6 Replies 6

ranraju
Cisco Employee
Cisco Employee

Hello Mahesh,

If you have an IP address assigned to a layer 3 interface, and you wish to remove the assigned ip address on that interface, you use this command "no ip address".

To view the IP address on the interface you could use on of the following commands, "show running-config int gigx/y" or "show ip int br | ex unas".

Hope your question is answered.

Regards,

ranraju

Hi  Ranraju,

thanks for reply

I also see the command

no ip address   on switchport that connects to IP  phone?

do you know why we use this command on port going to Cisco phone?

mahesh

I guess you are looking at a layer 3 interface. And by default on the layer 3 interface you would see "no ip address" under it.. once you assing an ip address on that interface then you would just see that ip address under that interface.. eg " ip address 10.1.1.1 255.0.0.0"

Now if you want an ip phone to be connected to a layer 2 port and assign a voice and a data vlan - you could do so by making that interface a "switchport" first, once its made a "switchport" you will not see "no ip address" under that interface... as you cannot have an ip address on a layer 2 interface..

Hope this helps..

(please rate the helpful posts..)

Regards,

ranraju

Hi,

That is correct, simply put - no IP address is defined for the interface by default.Once you enter an ip address for an interface you make it a L3 port. You can disable IP processing on a particular interface (revert back to L2) by removing its IP address with the 'no ip address' command.

Hope that helps!

Cheers,

Abhishek.

The default configuration looks like this:

SWITCH(config)#show run int fa4/20
Building configuration...

Current configuration : 59 bytes
!
interface FastEthernet4/20
no ip address
shutdown

end

<<<<<<<<<< The above is a layer 3 interface now.

<<<<<<<<<< When you assign an ip address you would see the following.

SWITCH#conf t
SWITCH(config)#
SWITCH(config)#int fa4/20
SWITCH(config-if)#ip address 10.1.1.1 255.0.0.0
SWITCH(config-if)#^Z
SWITCH#show run int fa4/20
Building configuration...

Current configuration : 75 bytes
!
interface FastEthernet4/20
ip address 10.1.1.1 255.0.0.0
shutdown
end

SWITCH#

<<<<<<<<<<< when you make this a layer 2 inteface:

SWITCH#conf t
SWITCH(config)#int fa4/20
SWITCH(config-if)#no ip address
SWITCH(config-if)#switchport
SWITCH(config-if)#^Z
SWITCH#show run int fa4/20
Building configuration...

Current configuration : 56 bytes
!
interface FastEthernet4/20      <<<<< now its a layer 2 interface...
switchport
shutdown
end

SWITCH#

Hope this helps...

(please rate the helpful posts)

Regards,

ranraju

Hi Ranraju and Abhishek,

Many thanks for good explanation

regards

mahesh

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card