CDP and subnet mask

Unanswered Question
Aug 15th, 2007
User Badges:

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?)

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
guruprasadr Wed, 08/15/2007 - 04:13
User Badges:
  • Gold, 750 points or more

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

milkdroogy Wed, 08/15/2007 - 05:58
User Badges:

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?

Edison Ortiz Wed, 08/15/2007 - 06:15
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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.



This Discussion