📄 labcdp.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Cisco Discovery Protocol Lab</title>
</head>
<body>
<script language="Javascript">
<!--
function printpage() {
if (window.print)
window.print()
else
alert("Sorry, your browser doesn't support this feature.");
}
//-->
</script>
<FORM>
<INPUT TYPE="button" VALUE="Print this page" onClick="printpage()">
</FORM>
<p><b><font size="4" color="green" face="Arial">Lab: CDP</font></b></p>
<p><font face="Arial"><i>Objective</i>:<b> </b> To understand how
the Cisco Discovery Protocol functions and what it takes for Cisco devices to
be discovered.<br>
<i>Lab Equipment</i>: We will be using eRouter 1 & eRouter 4. To select
eRouter 1 click on the click on the button eRouter1 at the top of your screen. </font></p>
<p><font color="#FF00FF"><b><font face="Times New Roman, Times, serif">1. </font></b></font><font face="Times New Roman, Times, serif">On
eRouter 1, enter global configuration mode <br>
</font></p>
<form name="form21">
<p><font face="Times New Roman, Times, serif">
<select size="1">
<option>- Click Here to View Answer -</option>
<option>Router>enable</option>
<option>eRouter#conf t</option>
<option>eRouter(config)#</option>
</select>
</font></p>
</form>
<p align="left"><font face="Times New Roman, Times, serif"><b><font color="#FF00FF">2.</font></b>
On eRouter 1, and change the hostname to <b>R1</b><br>
</font></p>
<form name="form31">
<p><font face="Times New Roman, Times, serif">
<select size="1">
<option>- Click Here to View Answer -</option>
<option>Router(config)#hostname R1</option>
<option>R1(config)#</option>
</select>
</font></p>
</form>
<p><font color="#FF00FF" face="Times New Roman, Times, serif"><b>3.</b> </font><font face="Times New Roman, Times, serif">Select
eRouter 4 by clicking on the button eRouter4 at the top of your screen, and
change the hostname to <b>R4</b> <br>
</font></p>
<form name="form41">
<p><font face="Times New Roman, Times, serif">
<select size="1">
<option>- Click Here to View Answer -</option>
<option>Router>enable</option>
<option>Router#conf t</option>
<option>Router(config)#hostname R4</option>
<option>R4(config)#</option>
</select>
</font></p>
</form>
<p><font face="Times New Roman">Note: By default, all interfaces are shutdown
(disabled).</font></p>
<p><font color="#FF00FF"><b><font face="Times New Roman, Times, serif">4.</font></b></font><font face="Times New Roman, Times, serif">
Enable the Serial 0 interface on R1.</font></p>
<form name="form51">
<p><font face="Times New Roman, Times, serif">
<select size="1">
<option>- Click Here to View Answer -</option>
<option>R1(config)#interface Serial 0</option>
<option>R1(config-if)#no shutdown</option>
</select>
</font></p>
</form>
<p><font color="#FF00FF" face="Times New Roman, Times, serif"><b>5.</b> </font><font face="Times New Roman, Times, serif">Now
enable the Serial 0 interface on R4</font></p>
<p><font face="Times New Roman, Times, serif">
<select size="1">
<option>- Click Here to View Answer -</option>
<option>R4(config)#interface Serial 0</option>
<option>R4(config-if)#no shutdown</option>
</select>
</font></p>
<p><font color="#FF00FF" face="Times New Roman, Times, serif"><b>6</b>.</font><font face="Times New Roman, Times, serif">
Enable the Ethernet 0 interface on R1.</font></p>
<form name="form61">
<p><font face="Times New Roman, Times, serif">
<select size="1">
<option>- Click Here to View Answer -</option>
<option>R1(config)#interface Ethernet 0</option>
<option>R1(config-if)#no shutdown</option>
</select>
</font></p>
</form>
<p><font face="Times New Roman">CDP
allows devices to share basic configuration information. CDP will operate
without any protocol specific information configured. CDP is enabled by default on all
interfaces. CDP is a Datalink Protocol occurring at Layer 2 of the OSI model.
This is important to understand because CDP is not routable. It can only
traverse to directly connected devices.</font></p>
<p><font color="#FF00FF"><b><font face="Times New Roman, Times, serif">7.</font></b></font><font face="Times New Roman, Times, serif">
On R1, type the command to give the status of all interfaces that are running
CDP.</font></p>
<form name="form71">
<p><font face="Times New Roman, Times, serif">
<select size="1" name="d">
<option>- Click Here to View Answer -</option>
<option>R1(config-if)#exit</option>
<option>R1(config)#exit</option>
<option>R1#show cdp interface</option>
</select>
</font></p>
</form>
<p><font face="Times New Roman, Times, serif">The sample output below shows that
both interfaces are up and sending CDP packets.</font></p>
<p><font color="#FF0000">
<br>
</font><font face="Terminal" size="2">Serial0 is up, line protocol is up<br>
Encapsulation HDLC<br>
Sending CDP packets every 60 seconds<br>
Holdtime is 180 seconds <br>
<output omitted>
<br>R1# </font></p>
<p><font face="Times New Roman, Times, serif">Now
that the router has interfaces that are broadcasting and receiving CDP updates
we can use CDP to find out about directly connected neighbors.</font></font></p>
<p><font color="#FF00FF" face="Times New Roman, Times, serif"><b>8.</b> </font><font face="Times New Roman, Times, serif">On
R1, type the command to provide information about directly connected neighbors.</font></p>
<form name="form81">
<p><font face="Times New Roman, Times, serif">
<select size="1">
<option>- Click Here to View Answer -</option>
<option>R1#show cdp neighbors</option>
</select>
</font></p>
</form>
<p><font face="Times New Roman, Times, serif">The below is sample output</font></p>
<p><font face="Terminal" size="2">Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge<br>
S - Switch, H - Host, I - IGMP, r - Repeater<br>
<br>
Device ID Local Interface Holdtme
Capability Platform
Port ID<br>
R4 Serial 0
148
R
1700 Serial 0<br>
R1#</font></p>
<p><font face="Times New Roman, Times, serif">The first device on the list for R1 is R4 via the
Serial0 link. R1 is receiving CDP updates from R4, the updates tell R1 to hold on to
the information for a specified amount of time. At the time this command was
pressed there were 148 seconds left in the holdtime for R1's update. If that
time expires before receiving another update R1's information will be removed
from the table. R4 is a 1000 series router, this is shown in the platform
column. The final column, Port ID, is the port on the other device from which
the updates are being sent.</font></p>
<p><font color="#FF00FF" face="Times New Roman, Times, serif"><b>9. </b></font><font face="Times New Roman, Times, serif">On
R1, type the command to provide more detailed information about directly connected
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -