Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
New Member

CDP and subnet mask

Is there a way to find out about my neighbors subnet mask?

when i issue the command:

>show cdp neighbors detail

i get an ip address but not the mask.

is there any way to find it using cdp?

(suppose i have a router that is connected to a switch but i cant access that switch - only through cdp. and i need to configure the routers address for the interface which connects to the switch - how do i do that if i cant see the mask?)


Re: CDP and subnet mask

Hi, [Pls Rate if HELPS]

"show cdp neighbors" will not give you the MASK Details.

You need to have a Valid IP Range for this Network Setup. Verify the IP Subnetting Documents in Web. Calculate the IP Address Ranges using the Site below:

Consider Router FastEthernet0/1 connected to the Switch.

Router#configure terminal

Router(config)#int fa eth 0/1

Router(config-if)#ip address mask


Configure the Same IP @ Subnet in the Switch Interface.

Test the Connection using Ping. If successful then you should be able to Telnet the Switch also.


Best Regards,

Guru Prasad R

New Member

Re: CDP and subnet mask

I cannot access to the switch! only if if i could telnet to it. it has an ip assigned to it which i can find using cdp. is it gonna work?

Hall of Fame Super Bronze

Re: CDP and subnet mask

If you know the switch IP from CDP, just apply the switch IP + 1 on the router interface.

For instance if the switch IP is, assign the router - test with ping and then attempt to telnet.

The subnet mask need not to match. Ideally, all devices in a subnet must have the same subnet mask so they can agree on their broadcast domain but you can have a device with and another device with The first device will limit its broadcast domain to 14 hosts while the second device will have its broadcast domain composed of 254.


CreatePlease to create content