CCNA2 Chapter 4
description
Transcript of CCNA2 Chapter 4
![Page 1: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/1.jpg)
CCNA2 Chapter 4
Learning about other Devices
![Page 2: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/2.jpg)
Neighbor Discovery with CDP
Scenario: Assume your boss asks you to create a topology map of the network, including model numbers, IOS versions of Cisco equipment, etc. Now, suppose you are not in the building where the equipment is. You could use the Cisco Discovery Protocol (CDP) to gather information of directly connected Cisco neighbors.
CDP is:
• Cisco proprietary (as the name indicates)
•Operates at the Data Link layer
•Functions regardless of what Physical layer media yu are using (fiber, UTP, etc)
•Network layer routed protocol independent (IP, IPX, AppleTallk, etc)
•Enabled on all Cisco devices by default
•Sent as a multicast every 60 seconds out of all functioning interfaces, which enables neighbor Cisco devices collect information about each other.
Cisco Discovery Protocol (CDP)
![Page 3: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/3.jpg)
CDP is used to:
• gather hardware and protocol information about neighboring devices
• types of devices (switch, type of router)
• router interfaces they are connected to
• interfaces used to make the connection ( E0, S0, etc.)
• model number of the devices
Best way to learn CDP is to do the labs!
Cisco Discovery Protocol (CDP)
![Page 4: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/4.jpg)
When a Cisco device boots up, CDP starts up automatically and allows the device to detect neighboring devices that are also running CDP.
CDP runs over the data link layer and allows the two systems to learn about each other.
Each device configured for CDP sends periodic messages, known as advertisements, to multiple Cisco routers
Cisco Discovery Protocol (CDP)
![Page 5: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/5.jpg)
Primary use of CDP is to discover all Cisco devices that are directly connected to a local device.
This is done by transmitting type length values (TLVs) which are blocks of information embedded in CDP advertisements.
To display the CDP information, use the command:
show cdp
Cisco Discovery Protocol (CDP)
Shows information that can be configured in Cisco devices:
CDP timer - how often CDP packets are transmitted to all active interfaces
CDP hold time – the amount of time that the device will hold packets received from neighbor devices
![Page 6: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/6.jpg)
Cisco Discovery Protocol (CDP)
Merida# show cdpGlobal CDP information: Sending CDP packets every 60 seconds Sending a holdtime value of 180 seconds Sending CDPv2 advertisements is enabled
Merida# show cdp neigCapability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDInternet Fas 0/0 168 R C2600 Fas 0/0Vargas Ser 0/0 168 R C2600 Ser 0/0
![Page 7: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/7.jpg)
Device TLVs displayed by the show cdp neighbors include:
• Device ID (hostname of device directly connected)
• Local Interface (port or interface in which you received CDP packets)
• Holdtime (keeps track of how long it has been since you received information from that neighbor and how many seconds to wait until you consider that neighbor dead)
• Capability (router, switch, or repeater)
• Platform (the model number such as Cisco router 2600, etc.)
• Port ID (interface in which the neighbor device sent out the CDP information)
* Supported by Cisco IOS release 12.0(3)T or later
Cisco Discovery Protocol (CDP)
![Page 8: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/8.jpg)
Cisco Discovery Protocol (CDP)
Sarasota# show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - PhoneDevice ID Local Intrfce Holdtme Capability Platform Port IDBradenton Ser 0/0 147 R PT1000 Ser 9/0Miami Ser 1/0 148 R PT1000 Ser 9/0Sarasota#
![Page 9: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/9.jpg)
To enable CDP globally:
cdp run
CDP is globally enabled by default.
NOTE: on some switches (1900) cdp is not enabled
To enable CDP on a particular interface, do:
cdp enable
On Cisco IOS Release 10.2 or higher, CDP is enabled by default
Cisco Discovery Protocol (CDP)
![Page 10: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/10.jpg)
CDP Exercise
Create the topology in the graph
Assign IP addresses with their respective masks:Bradenton Serial 9/0: 211.211.211.1 255.255.255.0 – clock rate 56000Sarasota: Serial 0/0 211.211.211.2 255.255.255.0Sarasota: Serial 1/0 200.200.200.1 255.255.255.0 – clock rate 56000Miami: Serial 9/0 200.200.200.2 255.255.255.0
NOTE: You may have different numbers for your serial interfaces
Change the hostnames to Bradenton, Sarasota and Miami.
From the Sarasota router, issue a show CDP neighbors command. Your output should look like the one from slide 8
![Page 11: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/11.jpg)
NOTE:
1. Disable CDP at the global level with no cdp run
2. If CDP is disabled globally, individual interfaces cannot be enabled for CDP
3. IOS Release 10.3 or higher, CDP is enabled by default.
4. To disable CDP on a specific interface after it has been enabled: no cdp enable
Cisco Discovery Protocol (CDP)
![Page 12: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/12.jpg)
Test this with the Sarasota router.
(You must be in that interface first.)
Sarasota(config)#int s1/0
Sarasota(config-if)#no cdp enable
Issue the following command, and you’ll see info coming form interface…..?
Sarasota#show cdp neig
Now, put it back the way it was
Sarasota(config)#int s1/0
Sarasota(config-if)# cdp enable
Sarasota#show cdp neig
Sarasota#show cdp neig
CDP Exercise 2 (Dissable CDP in local interface)
![Page 13: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/13.jpg)
Test this with the Sarasota router.
Sarasota(config)#no cdp run
Issue the following command, and you’ll see info coming form interface…..?
Sarasota#show cdp neig
Now, put it back the way it was
Sarasota(config)# cdp run
and check it again
Sarasota#show cdp neig
CDP Exercise 3 (Dissable CDP globally)
![Page 14: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/14.jpg)
Clear cdp counters
Useful for resetting interface statistics on a Cisco router
![Page 15: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/15.jpg)
Show cdp
![Page 16: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/16.jpg)
Show cdp entry
![Page 17: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/17.jpg)
Status of the carrier detect signal
Keepalive messages
Show cdp interface
![Page 18: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/18.jpg)
Router#show cdp neighbors detail will also give the IP address of the neighboring Cisco device
Know this output!
Show cdp neighbors
![Page 19: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/19.jpg)
Telnet is a virtual terminal protocol that is part of the TCP/IP protocol suite.
Provides a remote login capability.
Telnet function is at the application layer. If a telnet command is successful from one device to another, then all 7 layers of the OSI model is ‘working’.
Cisco says - It is the most complete testing mechanism available.
Telnet uses the five (5) vty sessions.
There has to be a ‘login’ and password associated with the vty session in order for telnet to work.
If a Telnet session is left open for 10 minutes without activity, it will automatically close itself.
Telnet
![Page 20: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/20.jpg)
• Multiple Telnet sessions can be used and suspended by using the Ctrl-Shift-6, then x sequence.
• The session can be resumed by pressing Enter. • Pressing the Enter key causes Cisco IOS to
resume the most recently suspended session.• The resume command can be used to start up a
previous session, but must know the connection ID.
• Use the show sessions command to get the connection ID, then resume the correct session.
Reopening a suspended Telnet session
![Page 21: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/21.jpg)
Reopening a suspended Telnet session
It works with Packet Tracer!
![Page 22: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/22.jpg)
If there is a ‘host table’ on the router ( ip host <name> <ip add> ), then you can do telnet <host name>.
As an example:
telnet routerB
DO THE LABS FOR resuming and suspending SESSION.
NOTE:
1. Pressing Enter takes you to the most recent session
2. To resume a session it needs a connection ID.
Telnet
![Page 23: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/23.jpg)
Ping command is used to determine if a particular ip address is reachable.
Traceroute command is used to trace the route to an ip address.
Ping sends ICMP echo request messages and receive an echo reply.
Ping Command Code Explanation
! ICMP echo reply received
. Nothing received
U ICMP unreachable (destination) received
N ICMP unreachable (network) received
P ICMP unreachable (port) received
Ping
![Page 24: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/24.jpg)
Serial is up, line protocol is up operational
Serial is up, line protocol is down Connection problems (L2)
Serial is down, line protocol is down Interface problems (L1)
Serial is administratively down, line protocol is down
Manually disabled
Interface Protocol
![Page 25: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/25.jpg)
For serial port:
Serial is up, line protocol is down maybe caused by:
• network mismatched
• clock rate not set on DCE
• mismatch of encapsulation (HDLC vs. PPP)
Interface Protocol
![Page 26: CCNA2 Chapter 4](https://reader035.fdocuments.us/reader035/viewer/2022081421/5681500b550346895dbde76b/html5/thumbnails/26.jpg)
Key terms
Hostname hostname
Ip host hostname IP
Ip domain-lookup no ip domain-lookup
Exec-timeout minutes seconds
show cdp neighbors
show cdp neighbors detail
cdp run
cdp enable
telnet IP_address