10.8.1 Packet Tracer - Configure CDP, LLDP, and NTP Answers
Topology
Addressing Table
| Device | Interface | IP Address |
|---|---|---|
| HQ | G0/0/0 | 192.168.1.1/24 |
| G0/0/1 | 192.168.2.1/24 | |
| S0/1/0 | 192.168.3.1/30 | |
| Branch | G0/0/0 | 192.168.4.1/24 |
| S0/1/0 | 192.168.3.2/30 | |
| HQ-SW-1 | VLAN 1 | Not configured |
| HQ-SW-2 | VLAN 1 | Not configured |
| BR-SW-1 | VLAN 10 | 192.168.4.250 |
| BR-SW-2 | VLAN 10 | 192.168.4.253 |
| BR-SW-3 | VLAN 10 | 192.168.4.254 |
| NTP Server | NIC | 192.168.1.254 |
| PC1 | NIC | 192.168.2.10 |
| PC2 | NIC | 192.168.4.10 |
| PC3 | NIC | 192.168.4.20 |
Objectives
In this activity, you will configure a router to receive time information over NTP and configure devices with CDP and LLDP.
- Configure CDP to run globally on a device.
- Disable CDP on device interfaces where necessary.
- Configure LLDP to run globally on a device.
- Configure LLDP to send and receive messages according to requirements.
- Configure a router to use an NTP server.
Background / Scenario
A network administrator has been asked to investigate a new client’s network. Documentation is incomplete for the network, so some information needs to be discovered. In addition, the NTP server needs to be configured on a router. Discovery protocols must also be adjusted to control traffic discovery protocol traffic and prevent information about the network from being received by potentially unauthorized hosts.
Some of the device IP addresses are unknown to you. You must determine what the IP addresses are so that you can connect to the devices over SSH in order to configure them. You can enter them into the Addressing Table as you discover them.
Instructions
Use the table below to logon to the Branch switches when you need to do so.
| Device | Username | User Password | Enable Secret |
|---|---|---|---|
| BR-SW-1 | admin | SW1admin# | SW1EnaAccess# |
| BR-SW-2 | admin | SW2admin# | SW2EnaAccess# |
| BR-SW-3 | admin | SW3admin# | SW3EnaAccess# |
Note: Click the Fast Forward Time button in the blue bar below the topology to speed up STP convergence. You can also click it several times to speed up the CDP update process.
Configure LLDP as follows:
- Disable CDP on the HQ router.
HQ(config)# no cdp run
- Enable LLDP globally on HQ.
HQ(config)# lldp run
- On HQ, configure the links to the switches to only receive LLDP messages.
HQ(config)# interface gigabitethernet 0/0/0 HQ(config-if)# no lldp transmit HQ(config-if)# lldp receive HQ(config-if)# interface gigabitethernet 0/0/1 HQ(config-if)# no lldp transmit HQ(config-if)# lldp receive
HQ# 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 HQ-SW-2 Gig0/0/1 120 B Gig0/1 HQ-SW-1 Gig0/0/0 120 B Gig0/1 Total entries displayed: 2 - Disable CDP on the HQ-SW-1 and HQ-SW-2 switches.
HQ-SW-1:HQ-SW-1(config)# no cdp run
HQ-SW-2:
HQ-SW-2(config)# no cdp run
- Enable LLDP on the HQ-SW-1 and HQ-SW-2 switches.
HQ-SW-1:HQ-SW-1(config)# lldp run
HQ-SW-2:
HQ-SW-2(config)# lldp run
- On the HQ-SW-1 and HQ-SW-2 switches, configure the links to the HQ router to only send, not receive, LLDP messages.
HQ-SW-1:HQ-SW-1(config)# interface gigabitethernet 0/1 HQ-SW-1(config-if)# no lldp receive
HQ-SW-2:
HQ-SW-2(config)# interface gigabitethernet 0/1 HQ-SW-2(config-if)# no lldp receive
- Disable LLDP completely on the HQ-SW-1 and HQ-SW-2 access ports that are in use.
HQ-SW-1:HQ-SW-1# show interfaces status Port Name Status Vlan Duplex Speed Type <output omitted> Fa0/24 connected 1 a-full a-100 10/100BaseTX Gig0/1 connected 1 a-full a-100 10/100/1000BaseTX <output omitted>HQ-SW-1(config)# interface fastethernet 0/24 HQ-SW-1(config-if)# no lldp receive HQ-SW-1(config-if)# no lldp transmit
HQ-SW-2:
HQ-SW-2# show interfaces status Port Name Status Vlan Duplex Speed Type Fa0/1 connected 1 a-full a-100 10/100BaseTX <output omitted> Gig0/1 connected 1 a-full a-100 10/100/1000BaseTX <output omitted>HQ-SW-2(config)# interface fastethernet 0/1 HQ-SW-2(config-if)# no lldp receive HQ-SW-2(config-if)# no lldp transmit
Configure CDP as follows:
- Activate CDP on the Branch router.
Branch(config)# cdp run
On the Branch router, issue the command
show cdp neighbors detailto identify the IP address of BR-SW-1 and populate this address in the address table.Branch# show cdp neighbors detail Device ID: BR-SW-1 Entry address(es): IP address : 192.168.4.250 Platform: cisco 2960, Capabilities: Switch Interface: GigabitEthernet0/0/0.10, Port ID (outgoing port): GigabitEthernet0/1 Holdtime: 135 Version : Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by Cisco Systems, Inc. Compiled Wed 12-Oct-05 22:05 by pt_team advertisement version: 2 Duplex: full
- Connect to switch BR-SW-1 over SSH. You will not be able to open a CLI window by clicking the Branch switches.
Branch# ssh -l admin 192.168.4.250 Password: SW1admin# BR-SW-1>On the BR-SW-1, issue the command
show cdp neighbors detailto identify the IP address of BR-SW-2/BR-SW-3 and populate this address in the address table.BR-SW-1> enable Password: SW1EnaAccess# BR-SW-1# show cdp neighbors detail Device ID: BR-SW-3 Entry address(es): IP address : 192.168.4.254 Platform: cisco 2960, Capabilities: Switch Interface: FastEthernet0/24, Port ID (outgoing port): GigabitEthernet0/1 Holdtime: 140 Version : Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by Cisco Systems, Inc. Compiled Wed 12-Oct-05 22:05 by pt_team advertisement version: 2 Duplex: full --------------------------- Device ID: BR-SW-2 Entry address(es): IP address : 192.168.4.253 Platform: cisco 2960, Capabilities: Switch Interface: GigabitEthernet0/2, Port ID (outgoing port): GigabitEthernet0/2 Holdtime: 140 Version : Cisco IOS Software, C2960 Software (C2960-LANBASE-M), Version 12.2(25)FX, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2005 by Cisco Systems, Inc. Compiled Wed 12-Oct-05 22:05 by pt_team advertisement version: 2 Duplex: full --------------------------- Device ID: Branch Entry address(es): Platform: cisco ISR4300, Capabilities: Router Interface: GigabitEthernet0/1, Port ID (outgoing port): GigabitEthernet0/0/0 Holdtime: 161 Version : Cisco IOS XE Software, Version 03.13.04.S - Extended Support Release Cisco IOS Software, ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.5(3)S5, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2017 by Cisco Systems, Inc. Compiled Mon 05-Oct-15 11:24 by mcpre advertisement version: 2 Duplex: full --------------------------- Device ID: Branch Entry address(es): IP address : 192.168.4.1 Platform: cisco ISR4300, Capabilities: Router Interface: GigabitEthernet0/1, Port ID (outgoing port): GigabitEthernet0/0/0.10 Holdtime: 161 Version : Cisco IOS XE Software, Version 03.13.04.S - Extended Support Release Cisco IOS Software, ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.5(3)S5, RELEASE SOFTWARE (fc2) Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2017 by Cisco Systems, Inc. Compiled Mon 05-Oct-15 11:24 by mcpre advertisement version: 2 Duplex: full
- Connect to switches BR-SW-2 and BR-SW-3 over SSH. Configure the access ports that are in use to not send CDP messages out of the ports.
BR-SW-2:BR-SW-1# ssh -l admin 192.168.4.253 Password: SW2admin# BR-SW-2> enable Password: SW2EnaAccess# BR-SW-2#
BR-SW-2# show interfaces status Port Name Status Vlan Duplex Speed Type Fa0/1 connected 10 a-full a-100 10/100BaseTX <output omitted> Fa0/24 connected trunk a-full a-100 10/100BaseTX <output omitted> Gig0/2 connected trunk a-full a-100 10/100/1000BaseTXBR-SW-2(config)# interface fastethernet 0/1 BR-SW-2(config-if)# no cdp enable
BR-SW-2# show cdp interface fastethernet 0/1 BR-SW-2#
BR-SW-3:
BR-SW-2# ssh -l admin 192.168.4.254 Password: SW3admin# BR-SW-3> enable Password: SW3EnaAccess# BR-SW-3#
BR-SW-3# show interfaces status Port Name Status Vlan Duplex Speed Type Fa0/1 connected 1 a-full a-100 10/100BaseTX <output omitted> Fa0/24 connected trunk a-full a-100 10/100BaseTX Gig0/1 connected trunk a-full a-100 10/100/1000BaseTX <output omitted>BR-SW-3(config)# interface fastethernet 0/1 BR-SW-3(config-if)# no cdp enable
BR-SW-3# show cdp interface fastethernet 0/1 BR-SW-3#
Configure NTP:
- Configure HQ to use the device at 192.168.1.254 as an NTP server.
HQ(config)# ntp server 192.168.1.254
HQ# show ntp status Clock is synchronized, stratum 2, reference is 192.168.1.254 nominal freq is 250.0000 Hz, actual freq is 249.9990 Hz, precision is 2**24 reference time is E0E0EA8A.0000004B (2:8:10.075 UTC Fri Aug 23 2019) clock offset is 0.00 msec, root delay is 0.00 msec root dispersion is 68.94 msec, peer dispersion is -137269716642244.14 msec. loopfilter state is 'CTRL' (Normal Controlled Loop), drift is - 0.000001193 s/s system poll interval is 4, last update was 12 sec ago. HQ# show ntp associations address ref clock st when poll reach delay offset disp *~192.168.1.254 127.127.1.1 1 1 16 377 0.00 0.00 -137269716642243.92 * sys.peer, # selected, + candidate, - outlyer, x falseticker, ~ configured
Device Configs - Final
ROUTER HQ
! ============================================================== !--- 10.8.1 Packet Tracer - Configure CDP, LLDP, and NTP !--- ANSWER SCRIPT FOR ROUTER HQ !--- Usage: open the HQ CLI tab and paste this whole file at the HQ> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Configure LLDP ! -------------------------------------------------------------- !--- Disable CDP on HQ. no cdp run !--- Enable LLDP globally. lldp run !--- Links to HQ-SW-1 and HQ-SW-2: receive LLDP only. interface gigabitethernet 0/0/0 no lldp transmit lldp receive exit interface gigabitethernet 0/0/1 no lldp transmit lldp receive exit ! -------------------------------------------------------------- !--- Configure NTP ! -------------------------------------------------------------- !--- Use 192.168.1.254 as the NTP server. ntp server 192.168.1.254 end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show cdp -> % CDP is not enabled !--- show lldp neighbors -> HQ-SW-1 and HQ-SW-2 !--- show ntp status -> Clock is synchronized, reference is 192.168.1.254 ! ==============================================================
ROUTER Branch
! ============================================================== !--- 10.8.1 Packet Tracer - Configure CDP, LLDP, and NTP !--- ANSWER SCRIPT FOR ROUTER Branch !--- Usage: open the Branch CLI tab and paste this whole file at the Branch> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Configure CDP ! -------------------------------------------------------------- !--- Activate CDP on Branch. cdp run end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show cdp neighbors detail -> BR-SW-1, IP address 192.168.4.250 ! ==============================================================
SWITCH HQ-SW-1
! ============================================================== !--- 10.8.1 Packet Tracer - Configure CDP, LLDP, and NTP !--- ANSWER SCRIPT FOR SWITCH HQ-SW-1 !--- Usage: open the HQ-SW-1 CLI tab and paste this whole file at the HQ-SW-1> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Configure LLDP ! -------------------------------------------------------------- !--- Disable CDP. no cdp run !--- Enable LLDP globally. lldp run !--- Link to the HQ router: send LLDP only, do not receive. interface gigabitethernet 0/1 no lldp receive exit !--- Access port in use (NTP Server): disable LLDP completely. interface fastethernet 0/24 no lldp receive no lldp transmit exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show cdp -> % CDP is not enabled !--- show lldp interface -> G0/1 Rx: disabled; Fa0/24 Tx and Rx: disabled ! ==============================================================
SWITCH HQ-SW-2
! ============================================================== !--- 10.8.1 Packet Tracer - Configure CDP, LLDP, and NTP !--- ANSWER SCRIPT FOR SWITCH HQ-SW-2 !--- Usage: open the HQ-SW-2 CLI tab and paste this whole file at the HQ-SW-2> prompt. Every line beginning with "!" is a comment; IOS ignores it, so pasting a comment by accident is harmless. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Configure LLDP ! -------------------------------------------------------------- !--- Disable CDP. no cdp run !--- Enable LLDP globally. lldp run !--- Link to the HQ router: send LLDP only, do not receive. interface gigabitethernet 0/1 no lldp receive exit !--- Access port in use (PC1): disable LLDP completely. interface fastethernet 0/1 no lldp receive no lldp transmit exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show cdp -> % CDP is not enabled !--- show lldp interface -> G0/1 Rx: disabled; Fa0/1 Tx and Rx: disabled ! ==============================================================
SWITCH BR-SW-2
! ============================================================== !--- 10.8.1 Packet Tracer - Configure CDP, LLDP, and NTP !--- ANSWER SCRIPT FOR SWITCH BR-SW-2 !--- Usage: BR-SW-2 has no CLI tab. From BR-SW-1, run ssh -l admin 192.168.4.253 (password SW2admin#), then paste this whole file at the BR-SW-2> prompt; enter the enable secret SW2EnaAccess# when asked. Every line beginning with "!" is a comment; IOS ignores it. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Configure CDP ! -------------------------------------------------------------- !--- Access port in use (PC2): do not send CDP messages. interface fastethernet 0/1 no cdp enable exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show cdp interface fastethernet 0/1 -> no output (CDP disabled on the port) ! ==============================================================
SWITCH BR-SW-3
! ============================================================== !--- 10.8.1 Packet Tracer - Configure CDP, LLDP, and NTP !--- ANSWER SCRIPT FOR SWITCH BR-SW-3 !--- Usage: BR-SW-3 has no CLI tab. From BR-SW-2, run ssh -l admin 192.168.4.254 (password SW3admin#), then paste this whole file at the BR-SW-3> prompt; enter the enable secret SW3EnaAccess# when asked. Every line beginning with "!" is a comment; IOS ignores it. ! ============================================================== enable configure terminal ! -------------------------------------------------------------- !--- Configure CDP ! -------------------------------------------------------------- !--- Access port in use (PC3): do not send CDP messages. interface fastethernet 0/1 no cdp enable exit end ! -------------------------------------------------------------- !--- Save the configuration to NVRAM. (Press Enter when prompted for the destination filename.) ! -------------------------------------------------------------- copy running-config startup-config ! ============================================================== !--- Verification: !--- show cdp interface fastethernet 0/1 -> no output (CDP disabled on the port) ! ==============================================================





