CDP Configuration

CDP (Cisco Discovery Protrocol):

CDP is used for finding athe Cisco Device in the nNetwork. It can only be enabled on Cisco Devices, and & can only find Cthe cisco devices.
Consider the tTwo Cisco Switches as below:


As shown in figure above, there are two Cisco switches – Norman and Vishal Switch.

Configuring The CDP in Norman Switch

Norman_Switch(Config)# cdp run                        →        for enabling CDP

Norman_Switch(config)# do show cdp neighbors

Norman_Switch(config)# do show cdp interfaces      →      for Verifying

Norman_Switch(config)# do show cdp entry

Norman_Switch(config)# no cdp run             →       for disabling CDP

Similarly doing same on Vishal Switch

Switch Memory

Similar to a router, a switch also has three types of memory:

  • Running-config,  which stores the running-configuration. Volatile memory.
  • Startup-config, which stores the saved configuration. It is non-volatile memory.
  • Flash memory, in which the IOS is stored in a .bin file.

Switch Security:

Port security

Consider a Switch that has two PCs Connected with the following MAC Address:


Configureing the Switch interface with port security. If other PC’s are connected to it, the pPort will be sShut down. This mMeans other PCspc can’t connect to the Switch.
Switch> enable
Switch# configure terminal
Switch(Config)# hostname Norman
Norman(Config)# interface range f0/1-2
Norman(Config-if)# switchport mode access
Norman(Config)# interface f0/1
Norman(Config-if)# switchport port-security mac-address 0090.2B53.C7A9
Norman(Config-if)# switchport port-security violation shutdown
Norman(Config-if)# exit
Norman(Config)# interface f0/2
Norman(Config-if)# switchport port-security mac-address 0001.427D.48AD
Norman(Config-if)# switchport port-security violation shutdown
Norman(Config-if)# exit

Now, if another PCpc connects to F0/1 or F0/2 of the switch, it will not be able to connect.
These above ports will shut down.

Creating Password:

These commands are similar to router commands.
Switch> enable
Switch# configure terminal
Switch(Config)# enable secret norman123

For Console
Switch(config)# line console 0
Switch(config-line)# password norcon123
Switch(config-line)# login
Switch(config-line)# exit

For Telnet
Switch(config)# line vty 0 1
Switch(config-line)# password nortel123
Switch(config-line)# login
Switch(config-line)# exit

Switch(config)# service password-encryption
Switch(config)# do show running-config
Switch(config)# do write memory (for saving configurations)
Switch(config)# do show startup-config

Read more

    Free Cisco CCNA Study Guide