cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4855
Views
5
Helpful
5
Replies

CDP neighbour showing lowest IP address

srego4
Level 2
Level 2

Is there a way to specify what IP address the s

witch will advertise in its cdp packets?

I have a switch which has two IP's

10.x.x.x  and 192.x.x.x.  I want the switch to advertise the 192 address but it only sends the 10 address in its advertisements.

5 Replies 5

Collin Clark
VIP Alumni
VIP Alumni

Try cdp source-interface [interface name]

Hope that helps.

Ganesh Hariharan
VIP Alumni
VIP Alumni

Is there a way to specify what IP address the s

witch will advertise in its cdp packets?

I have a switch which has two IP's

10.x.x.x  and 192.x.x.x.  I want the switch to advertise the 192 address but it only sends the 10 address in its advertisements

Hi,

cdp source-interface

Use of this command ensures that Cisco Discovery Protocol packets use the IP address that has been previously assigned to an interface. Without this command, Cisco Discovery Protocol uses the IP address of the first available interface.

The conditions that an interface should satisfy to be the source interface are as follows:

•It should have an IP address.
•Its status should be UP.
•It should not be an IP unnumbered interface.

When Cisco Discovery Protocol is enabled and the Cisco Discovery Protocol source interface has not been configured, then Cisco Discovery Protocol uses the IP address of the first available interface.

The following example configures Cisco Discovery Protocol to use the IP address that has been assigned to interface loopback 1.

Router# configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)# cdp source-interface loopback 1

Router(config)# exit

Hope to help !!

Ganesh.H

thks collin, ganesh, but that did not help me.  Looks like cisco may have taken out the comma

nd?

My ios is (C3560-ADVIPSERVICESK9-M), Version 12.2(40)SE   and I am trying it on a 3560 cat switch.  It does not appear to be a supported or unsupported command. I tried with /without the hyphen, also global & interface...no luck.

switch(config)#cdp source-interface vlan 210

                           ^

% Invalid input detected at '^' marker.

My interface also matches all the reqts -

•It should have an IP address.
•Its status should be UP.
•It should not be an IP unnumbered interface.

Ooops that's my fault, I thought it was a router. According to the documentation that is not a valid command. I also checked my switches and I don't see of any way to do it. Sorry.

bbosch4210
Level 1
Level 1

I still don't understand why the cdp source-interface hasn't been implemented on Catalyst fixed configuration switches.

I'm surely not the only one with multiple IP addresses on Access and Distribution switches.

Please Cisco, add the code.

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco