Discovery 2: Configure IP Network Protocols
Introduction
There are different IP network protocols that you need to configure to create an efficient Cisco Collaboration
environment. The most significant protocols include NTP, DHCP, DNS, TFTP, Cisco Discovery Protocol, and,
LLDP-MED, LDAP, and SNMP.
In this lab, you will configure DHCP, DNS, NTP, Cisco Discovery Protocol, and LLDP.
There are two Cisco IP Communicator phones. One is located on PC-1 (CIPC-1) and the other is located on PC-2
(CIPC-2). The figure represents the logical topology. All the devices are in the 10.1.5.0/24 network. Cisco Unified
Communications Manager (HQ-UCM) is preconfigured to accept register messages from the CIPC-1 and CIPC-2
phones. A Windows server acts as the NTP and DNS. The router called CSR is configured as a default gateway
and is used to access outside networks. You have no access to the CSR router.
You will configure the DHCP server on Cisco Unified Communications Manager (HQ-UCM). PC-2 will be a DHCP
client. You will use the Wireshark application to verify the DHCP process. You will configure, verify, and
troubleshoot DNS including, A and AAAA records, PTR records, and SRV records. Then you will configure NTP to
enable ROUTER-1 as an NTP master and then to use the NTP Windows server as a time source. Finally, you will
configure the Cisco UCM to synchronize it’s time to the NTP servers and troubleshoot common problems.
In this lab, you will configure Cisco Discovery Protocol and LLDP on the SWITCH, which is presented in the right-
hand topology figure. The SWITCH has two ports, gi0/1 and gi0/2, which are connected to hardware IP phones.
You will not configure or register the IP phones, but only use them to verify the operation of Cisco Discovery
Protocol and LLDP.
        This lab will take approximately 1 hour and 15 minutes to complete.
Topology
Job Aid
Device Information
Device                  Description                                                   IP Address         Credentials
PC-1                    PC running Cisco IP Communicator CIPC-1                       10.1.5.200         Student, C0ll@B
PC-2                    PC running Cisco IP Communicator CIPC-2                       10.1.5.201         Student, C0ll@B
HQ-UCM                  Cisco Unified Communications Manager                          10.1.5.5           Administrator, C0ll@B
WIN-SERVER01            NTP, LDAP, and DNS                                            10.1.5.100
ROUTER-1                Router                                                        10.1.5.252         Administrator, C0ll@B
SWITCH                  Switch                                                        10.1.5.253         Administrator, C0ll@B
Command List
The table describes the commands that are used in this activity. The commands are listed in alphabetical order so
that you can easily locate the information that you need. Refer to this list if you need configuration command
assistance during the lab activity.
Command                             Description
show ntp status                     This command displays the NTP status.
show ntp associations               This command displays all current NTP associations for the device.
                                    This command configures Cisco IOS Software as an NTP master clock with which peers synchronize
ntp master [stratum]
                                    themselves when an external NTP source is not available.
                                    This command configures a device to allow its software clock to be synchronized with the software
ntp server ip-address
                                    clock of an NTP time server.
lldp run                            This command enables LLDP globally on the device.
lldp receive                        This command enables LLDP packets to be sent on the interface.
lldp transmit                       This command enables LLDP packets to be received on the interface.
show lldp neighbors [interface-id] This command displays information about neighbors, including device type, interface type and
[detail]                           number, holdtime settings, capabilities, and Port_ID.
show lldp entry entry-name          This command displays information about a specific neighbor.
cdp run                             This command enables Cisco Discovery Protocol globally on the device.
cdp enable                          This command enables Cisco Discovery Protocol on an interface.
show cdp neighbors [type            This command displays detailed information about neighboring devices that are discovered using
number] [detail]                    Cisco Discovery Protocol.
show cdp entry device-name          This command displays information about a specific neighboring device that is discovered using
[protocol | version]                Cisco Discovery Protocol.
Task 1: Register Endpoints
Activity
Step 1
  On PC-1, open Google Chrome and navigate to Cisco Unified Communications Manager Administration
  (https://10.1.5.5/ccmadmin). Log in using Administrator for the username and C0ll@B for the password.
Step 2
  Select Device > Phone, click Find and observe if Cisco IP Communicator phones are displayed. If phones are
  not displayed wait a while for the automation system to finish configuring Cisco Unified Communicacitons
  Manager and then click Find again. Continue only when phones are displayed.
Step 3
  On PC-1, start Cisco IP Communicator and configure it with the following settings:
     Device Name: CIPC-1
     TFTP Servers: 10.1.5.5
             Cisco IP Communicator will reset due to the control protocol change from SCCP to SIP. Press OK
             when the pop-up box appears.
Cisco IP Communicator registers with HQ-UCM:
Step 4
  On PC-2, start Cisco IP Communicator and configure it with the following settings:
     Device Name: CIPC-2
     TFTP Servers: 10.1.5.5
  Cisco IP Communicator registers with HQ-UCM:
Task 2: Configure DHCP
DHCP is based on BOOTP, which provides the framework for passing configuration information to hosts on a
TCP/IP network.
You will configure and verify DHCP on Cisco Unified Communications Manager.
Activity
DHCP Overview
A DHCP client is an Internet host that uses DHCP to obtain configuration parameters such as an IP address. The
figure shows the basic steps that occur when a DHCP client requests an IP address from a DHCP server. The
client, Host A, sends a DHCPDISCOVER broadcast message to locate a DHCP server. A DHCP server offers
configuration parameters (such as an IP address, subnet mask, default gateway address, DNS server address,
domain name, and a lease for the IP address) to the client in a DHCPOFFER unicast message.
A DHCP client may receive offers from multiple DHCP servers and can accept any one of the offers, but the client
usually accepts the first offer that it receives. The offer from the DHCP server is not a guarantee that the IP
address will be allocated to the client. However, the server usually reserves the address until the client has had a
chance to formally request the address.
The client returns a formal request for the offered IP address to the DHCP server in a DHCPREQUEST broadcast
message. The DHCP server confirms that the IP address has been allocated to the client by returning a DHCPACK
unicast message to the client.
Step 1
  On PC-2, open the Control Panel, click Network and Sharing Center, and then click Change adapter
  settings.
Step 2
  Right-click Ethernet0 and select Properties. You will see that currently, your PC-2 NIC is configured to use static
  IP address (10.1.5.201).
Step 3
  On PC-1, open Google Chrome and navigate to Cisco Unified Communications Manager Administration
  (https://10.1.5.5/ccmadmin). Log in using Administrator for the username and C0ll@B for the password.
Step 4
  Select Device > Phone, click Find and observe the IPv4 addresses of the two Cisco IP Communicator phones.
  You will see that CIPC-1 has IP address 10.1.5.200 and CIPC-2 has IP Address 10.1.5.201.
Step 5
  On PC-2, exit Cisco IP Communicator (CIPC-2).
Step 6
  On PC-1, in the Find and List Phones page, verify the status of the CIPC-2 phone. The phone status is
  unregistered and the IP address that is associated with this phone is 10.1.5.201 (the IP address from the last
  successful registration attempt).
          You will need to refresh the results by clicking Find. You may need to do this a few times before the
          status changes.
Step 7
  Select System > DHCP > DHCP Server. Click Add New then configure the DHCP server with the following
  parameters and click Save:
     Host Server: CUCM-PUB.CLL-COLLAB.INTERNAL
     Primary DNS IPv4 Address: 10.1.5.100
     Primary TFTP Server IPv4 Address (Option 150): 10.1.5.5
          DHCP option 150 provides the IP address of the TFTP server. Cisco IP Communicator works differently
          if using this option. To access the TFTP server, you must specify its IP address manually in the Cisco IP
          Communicator network configuration.
Step 8
  Select System > DHCP > DHCP Subnet. Click Add New then configure the DHCP subnet with the following
  parameters and click Save:
     DHCP Server: CUCM-PUB.CLL-COLLAB.INTERNAL
     Subnet IPv4 Address: 10.1.5.0
     Primary Start IPv4 Address: 10.1.5.210
     Primary End IPv4 Address: 10.1.5.220
     Primary Router IPv4 Address: 10.1.5.1
     IPv4 Subnet Mask: 255.255.255.0
     Primary DNS IPv4 Address: 10.1.5.100
     Primary TFTP Server IPv4 Address (Option 150): 10.1.5.5
     Leave other fields as default values.
Step 9
  On PC-2, open Wireshark, start the capture, and set the filter value to bootp. Then you may start capturing
  packets from the Ethernet0 interface. This action will catch all DHCP events that are sent to Cisco Unified
  Communications Manager from PC-2 and back.
          Ensure that you put the filter in after you start the capture.
Step 10
  In the Internet Protocol Version 4 (TCP/IPv4) Properties window, click Obtain an IP address automatically
  and Obtain DNS server address automatically to receive an IP address from the DHCP server. Click OK. In
  the Ethernet0 Properties window, click Close to save the changes.
Step 11
  Open the cmd and verify the IP address that you received via DHCP. Type ipconfig and you will see the
  configured IP address.
Step 12
  In Wireshark, observe the received packet. You will see the DHCP process of sending Discover, Offer,
  Request, and ACK messages between PC-2 and the DHCP server.
  PC-2 will receive the 10.1.5.212 IP address because it is the first free address in the range you created earlier. Notice
  DHCP server is 10.1.5.1 instead of CUCM, Cisco recomends do not use CUCM DHCP service in production
  environments. IP address can be different in your lab environment.
Step 13
  Stop capturing packets in Wireshark. Do not close the Wireshark application.
Step 14
  Start Cisco IP Communicator and see the registration process. The phone registers with HQ-UCM.
Step 15
  On PC-1, browse to Cisco Unified Communications Manager Administration. Choose Device > Phone and
  observe the IPv4 address of the Cisco IP Communicator phone (CIPC-2).
  You will see that CIPC-2 is registered with HQ-UCM and the IP address of the device is 10.1.5.212.
Step 16
  Place a call from CIPC-1 to CIPC-2.
  The call works.
Task 3: Configure and Troubleshoot DNS
The DNS is a distributed database in which you can map hostnames to IP addresses through the DNS protocol
from a DNS server. Each unique IP address can have more than one associated hostname
You will configure DNS on the Windows server to resolve A records and AAAA records for HQ-UCM. You will
create an SRV record, but you will not use it. As an example, you will create an SRV record for the XMPP client
service that points to the cms.cll-collab.internal host.
Activity
Resource Records in DNS
Resource records comprise the data within a DNS zone. There are different resource records available in DNS,
including A, AAAA, PTR, and SRV records.
Record A specifies the IPv4 address for given host. A records are used for conversion of domain names to
corresponding IP addresses.
Record AAAA (quad-A) specifies the IPv6 address for a given host.
Although the main purpose of the DNS is to point domains to IP addresses, a PTR record works in the opposite
way; it associates an IP with a domain name. Because of its purpose, a PTR record is sometimes called a reverse
DNS record. The purpose of a PTR record is mostly administrative; it shows that an IP is, in fact, used with a
particular domain.
An SRV record is intended to provide information on available services for your systems, and is most commonly
used in SIP configuration. Windows domain controllers use the SRV resource record to advertise services to the
network.
Step 1
  On PC-1, open the windows command prompt and enter the command nslookup. Verify that the default server
  shows the entry of WIN-XXXX.cll-collab.internal which is the DNS server used in this lab.
Step 2
  Enter www.cisco.com to verify that DNS is working and resolving addresses correctly.
Step 3
  Enter cucm-pub.cll-collab.internal. This DNS query will fail indicating that there is a problem with the A record
  in DNS, or the record does not exist.
Step 4
  Enter the IP address 10.1.5.5 (cucm-pub) to verify if the PTR record can resolve the IP address to hostname.
  You will notice this also fails, indicating that the DNS server is not aware of this machines name or its IP address.
Step 5
 On PC-1, open Remote Desktop Connection, and connect to the Windows server (10.1.5.100) using
 CLL-COLLAB\Administrator and C0ll@B for the username and password respectively. Click Yes on the
 certificate error.
Step 6
 On the Windows Administrative Tools, open DNS. Expand Forward Lookup Zones > cll-collab.internal.
 Observe theconfigured A, PTR, and SRV records. You will see that there are many configured records for virtual
 machines.For example, a record imp-pub has an IP association 10.1.5.7. You will also notice there are no
 records for cucm-pub.
Step 7
  Right-click DNS > WIN-XXXXX > Forward Lookup Zones > cll-collab.internal and click New Host (A or
  AAAA)…
Step 8
  Use the following parameters to create the new A record.
     Name: cucm-pub
     IP address: 10.1.5.5
     Check the box: Create associated pointer (PTR) record
         If you entered an IPv6 address in the IP address field, a AAAA record instead of an A record.
Step 9
  Choose DNS > WIN-SERVER01 > Reverse Lookup Zones, refresh it, then expand the 5.1.10.in-addr.arpa
  folder to verify that the PTR record for the cucm-pub.cll-collab.internal host was created.
Step 10
  Minimize the Remote Desktop Connection, and enter cucm-pub.cll-collab.internal again in the nslookup. This
  time the resolution is successful as the A-record in the DNS has been set up correctly.
Step 11
  Enter the IP address 10.1.5.5 (cucm-pub) and verify that the reverse lookup worked, which is possible because
  of the PTR record you created.
Step 12
  On PC-2, open Wireshark, set the filter value to dns, and start capturing packets on Ethernet0 2. This action
  willcatch all DNS events that are sent from the DNS server on PC-2.
Step 13
 On PC-2, open Chrome and navigate to https://cucm-pub.cll-collab.internal. Your request will be successful
 because the DNS server has configured an A record that associates the FQDN name with the IP address of
 Cisco Unified Communications Manager. Observe Wireshark. You will see the captured DNS packets.
          If DNS resolution is still not working, open a command prompt and enter the command ipconfig
          /flushdns to flush the DNS cache.
Step 14
 Stop capturing packets in Wireshark and close the application.
Step 15
 On the Windows server, in the DNS Manger, right-click the cll-collab.internal forward lookup zone and select
 Other New Records…
Step 16
 Scroll down to select Service Location (SRV) and click Create Record…
Step 17
 Configure the new record with the following settings:
    Service: _xmpp-client
    Protocol: _tcp
     Port: 5222
     Host offering this service: cms.cll-collab.internal.
Step 18
  Confirm that the new record has been created in the _tcp folder.
Task 4: Configure and Troubleshoot NTP on a Cisco Router
NTP is a protocol that is designed to time-synchronize a network of machines. An NTP network usually gets its
time from an authoritative time source such as a radio clock or an atomic clock that is attached to a time server.
NTP then distributes this time across the network.
You will now configure NTP.
Activity
NTP Overview
NTP uses the concept of a Stratum to describe how many NTP hops away a machine is from an authoritative time
source. A stratum 1 time server typically has an authoritative time source (such as a radio or atomic clock, or a
GPS time source) directly attached, a stratum 2 time server receives its time via NTP from a stratum 1 time server,
and so on.
NTP has two ways to avoid synchronizing to a machine whose time may not be accurate. NTP will never
synchronize to a machine that is not also synchronized. NTP will compare the time that is reported by several
machines, and will not synchronize to a machine whose time is significantly different from others, even if its
Stratum is lower. This strategy effectively builds a self-organizing tree of NTP servers.
To understand the NTP process, you must understand the description of the fields of the show ntp associations
command output.
In the command output, characters before the address field have these definitions:
Character                       Definition
*                               Synchronized to this peer
                                Almost synchronized to this peer
+                               Peer selected for possible synchronization
-                               Peer is a candidate for selection
~                               Peer is statically configured
In the command output, the following terms are shown:
Term      Description
          This field is the IP address of the peer. If this entry shows 127.127.7.1, the local machine has synced with itself. Generally, only an
address
          NTP master syncs with itself.
ref
          This field is the address of the reference clock for the peer.
clock
st        NTP uses the concept of a Stratum to describe how far away (in NTP hops) a machine is from an authoritative time source.
          This field is the time since the last NTP packet was received from a peer and is reported in seconds. This value should be lower
when
          than the polling interval.
          The polling interval is reported in seconds. The interval usually starts with a minimum of 64-second poll intervals. The RFC
          specifies that no more than one NTP transaction per minute is needed to synchronize two machines. The polling interval
poll      dynamically changes, based on the network conditions between the client and the server and the loss of NTP packets. If a server
          is unreachable for some time, the poll interval is increased in steps to 1024 seconds to reduce network overhead.
          You cannot adjust the NTP poll interval on a router, because the internal is determined by heuristic algorithms.
          Peer reachability is a bit string that is reported as an octal value. This field shows whether the NTP process on the Cisco IOS
          Software received the last eight packets. The packets must be received, processed, and accepted as valid by the NTP process
          and not simply by the router or switch that receives the NTP IP packets. Reach uses the poll interval for a timeout to decide
reach
          whether a packet was received or not. The poll interval is the time that NTP waits before it concludes that a packet was lost. The
          poll time can be different for different peers, so the time before reach decides that a packet was lost can also be different for
          different peers.
          This field is the round-trip delay to a peer and is reported in milliseconds. To set the clock more accurately, this delay is taken into
delay
          account when the clock time is set.
Term     Description
         Offset is the clock time difference between the peers or between the master and client. This value is the correction that is applied
offset   to a client clock to synchronize it. A positive value indicates that the server clock is higher. A negative value indicates that the client
         clock is higher.
         Dispersion, reported in seconds, is the maximum clock time difference that was ever observed between the local clock and the
disp
         server clock.
Step 1
  On PC-1, open Putty from the desktop, in Host Name enter IP address 10.1.5.1, in Connection Type
  option select SSH, then click Open.
Step 2
  Log in to the router using Administrator as the username and C0ll@B as the password. Then verify the NTP
  server configuration.
    ROUTER-1#show ntp status
    %NTP is not enabled.
Step 3
  Configure ROUTER-1 as an NTP master server. Use the NTP Stratum 15.
    ROUTER-1#configure terminal
    ROUTER-1(config)#ntp master 15
Step 4
  Verify the NTP server configuration using the show ntp status command. You will see that the clock is
  unsynchronized, the Stratum value is set to 15, and the reference is 127.127.1.1, which means that the router is
  using its own internal clock as the time source.
          Although the clock currently shows unsynchronized, it will change status to synchronized once the Drift
          has been measured. This can take up to 15 minutes to complete. In the interest of time, you can
          procedure with the next steps in the lab.
   ROUTER-1(config)#exit
   ROUTER-1#show ntp status
   Clock is unsynchronized, stratum 15, reference is 127.127.1.1
   nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
   ntp uptime is 52300 (1/100 of seconds), resolution is 4000
   reference time is E0DF775D.20418990 (19:44:29.126 EST Sun Jul 21 2019)
   clock offset is 0.0000 msec, root delay is 0.00 msec
   root dispersion is 2.33 msec, peer dispersion is 1.20 msec
   loopfilter state is 'FREQ' (Drift being measured), drift is 0.000000000 s/s
   system poll interval is 16, last update was 11 sec ago.
Step 5
  Verify the NTP server configuration using the show ntp associations command. You will see the local NTP
  server configured. The interesting value here is in the Stratum field, which is one less than the configured value,
  ntp master 15 in this case. The router polls its own internal clock, but the clock is never unreachable. The reach
  value 377 is in octal format (octal 377 = 11111111 binary) which indicates that the NTP process received the last
  eight packets.
   ROUTER-1#show ntp associations
   address         ref clock        st   when   poll reach delay offset     disp
   *~127.127.1.1     .LOCL.         14     11     16   377 0.000    0.000 1.204
    * sys.peer, selected, + candidate, - outlyer, x falseticker, ~ configured
Step 6
  Configure the NTP server with the IP address 192.168.1.1.
          Authentication can enhance the security of a system that runs NTP. When you enable the authentication
          feature, the NTP client sends time-of-day requests only to trusted NTP servers.
   ROUTER-1#configure terminal
   ROUTER-1(config)#ntp server 192.168.1.1
Step 7
  Verify the NTP server configuration using the show ntp associations command. You will see two NTP
  addresses: the local NTP source and the remote NTP source. The difference here is that the second string has a
  ref clock device with the address 10.1.5.254, which is CSR router. The Stratum value for the 192.168.1.1 NTP
  server is 2.
   ROUTER-1#show ntp associations
   address         ref clock       st    when   poll reach delay offset   disp
    ~127.127.1.1     .LOCL.           14     12     16   377 0.000  0.000 1.204
   *~192.168.1.1      168.96.251.195          2     10    128    1 0.995 -44.068
    * sys.peer, selected, + candidate, - outlyer, x falseticker, ~ configured
   188.56
Step 8
  Observe the NTP server status. You will see that the clock is synchronized with 192.168.1.1 and the Stratum
  valueis 3. Stratum value 3 means that there are three hops to the time source. The Stratum value of the
  192.168.1.1server is less than the LOCAL, therefore the 192.168.1.1 is selected as the reference NTP server.
   ROUTER-1#show ntp status
   Clock is synchronized, stratum 3, reference is 192.168.1.1
   nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is 2**10
   ntp uptime is 62800 (1/100 of seconds), resolution is 4000
   reference time is E0187ED6.C76C8D68 (20:35:18.779 EST Wed Feb 20 2019)
   clock offset is -44.0685 msec, root delay is 1.62 msec
   root dispersion is 562.54 msec, peer dispersion is 188.56 msec
   loopfilter state is 'CTRL' (Normal Controlled Loop), drift is -0.000000175 s/s
   system poll interval is 128, last update was 8 sec ago.
Task 5: Configure and Troubleshoot NTP on Cisco Unified Communications Manager
Activity
In this task, you will add an incorrect NTP server to the Cisco UCM configuration then using the CLI you will
troubleshoot the problem before correcting it and verifying successful synchronization.
Step 1
  From PC-1, open Google Chrome and navigate to the Cisco Unified Operating System Administration page
  (https://10.1.5.5/cmplatform). Log in with username administrator and password C0ll@B.
Step 2
  Select Settings > NTP Servers and verify that the current NTP server is Accessible and configured with IP
  address 10.1.1.
Step 3
  Click Add New and enter the IP address 10.1.6.252, then click Save.
Step 4
  Verify that the status of the new NTP server is Not Accessible.
Step 5
  Open a new Putty session, select HQ-UCM from the list, click Load, then click Open.
Step 6
  Log in with username administrator and password C0ll@B.
Step 7
  Verify the NTP status by entering the command utils ntp status. Note that the new NTP server is stuck in
  .“INIT.” with a Stratum of 16 (unreachable).
Step 8
  Enter the command utils diagnose module ntp_reachability. After a short wait you will see the error informing
  you that that 10.1.6.252 was not reachable or the service is down.
Step 9
  To further troubleshoot the problem with connectivity to the NTP server, issue the command utils network
  capture port 123.
         Notice the bi-directional communication between the Cisco UCM (CUCM-PUB.CLL-
         COLLAB.INTERNAL) and the NTP server 10.1.5.1 (pod-rtr.cll-collab.internal.ntp). The communication
         between the Cisco UCM and the new NTP server is uni-directional as no replies are received from the
         NTP server.
Step 10
  Leaving the capture running, open Chrome and if needed navigate back to the NTP Server List screen on the
  Cisco Unified Operating System Administration page. The IP address of the new NTP server is incorrect. Delete
  the new server and add a new server with IP address 192.168.1.1. If server do not show as accessible wait two
   minutes very NTP Server List again.
Step 11
  View the capture on the Putty session and confirm that there is bidirectional communication for both NTP
  servers.
Step 12
  Press <Ctrl>+C to stop the capture. Then enter utils ntp status to view and confirm that both NTP servers are
  configured and synchronized.
Task 6: Configure Cisco Discovery Protocol and LLDP
Cisco Discovery Protocol (CDP) is a Layer 2, media-independent, and network-independent protocol that runs on
Cisco devices and enables networking applications to learn about directly connected devices nearby. Link Layer
Discovery Protocol (LLDP) is a neighbor discovery protocol that is used for network devices to advertise
information about themselves to other devices on the network.
You will configure Cisco Discovery Protocol and LLDP and verify the configuration on the switch.
Activity
Step 1
  On PC-1, open Putty from the desktop. Select Switch 1 from the list, click Load, then click Open.
Step 2
  Log in to the switch using Administrator for the username and C0ll@B for the password. Then enter the
  command show cdp neighbors. You will receive an error message indicating that CDP is not enabled on the
  switch.
   SWITCH#show cdp neighbors
   % CDP is not enabled
Step 3
  Enable Cisco Discovery Protocol globally, enter the command cdp run in global configuration mode, then enter
  the show cdp neighbors command again. You may need to refresh the command a few times before the entries
  populate, as the table will build as CDP hello messages are received from the neighbors. Confirm that no entries
  are shown connected to port Gig 0/1 or Gig 0/2.
   SWITCH#configure terminal
   SWITCH(config)#cdp run
   SWITCH(config)#exit
   SWITCH#show cdp neighbors
Step 4
  Enable Cisco Discovery Protocol on the gi0/1 and gi0/2 interfaces by entering the command cdp run under each
  interface. Wait 30 seconds, then enter show cdp neighbors to confirm that the two Cisco IP phones are now
  listed as neighbors.
         Although you enabled CDP at a global level previously, it also needs to be enabled on each interface.
   SWITCH#configure terminal
   SWITCH(config)#interface gigabitEthernet 0/0
   SWITCH(config-if)#cdp enable
   SWITCH(config-if)#interface gigabitEthernet 0/1
   SWITCH(config-if)#cdp enable
  You will only use hardware IP phones to verify the operation of Cisco Discovery Protocol and LLDP.
  Cisco Discovery Protocol uses a 30-second default update period.
   SWITCH#show cdp neighbors
   Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                     S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                     D - Remote, C - CVTA, M - Two-port Mac Relay
   Device ID         Local Intrfce       Holdtme     Capability   Platform   Port ID
   SEP111111111111   Gig 0/0             176              H P M              Port 1
   SEP222222222222   Gig 0/1             176              H P M              Port 1
   Total cdp entries displayed : 6
Step 5
  Verify the LLDP neighbors by entering the command show lldp neighbors. LLDP is becoming more popular,
  especially because it supports multiple vendors.
   SWITCH#show lldp neighbors
   % LLDP is not enabled
Step 6
  ,Configure LLDP globally by entering the command lldp run. Then enter the commands lldp receive and lldp
  transmit on the gi0/0 and gi0/1 interfaces. Verify the LLDP neighbors by entering the command show lldp
  neighbors. To enable LLDP, you must configure it globally and then activate LLDP on each interface to receive
  and transmit packets.
   SWITCH#configure terminal
   SWITCH(config)#lldp run
   SWITCH(config)#interface range gi0/0-1
   SWITCH(config-if-range)#lldp receive
   SWITCH(config-if-range)#lldp transmit
   SWITCH(config)#exit
   SWITCH#show lldp neighbors
   Capability codes:
       (R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
       (W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
   Device ID             Local Intf      Hold-time   Capability       Port ID
   SEP111111111111       Gi0/0           180         R                Gi0/0
   SEP222222222222       Gi0/1           180         R                Gi0/0
   Total entries displayed: 2