본문 바로가기

CCNA 기초

CDP (Cisco Discovery Protocol)


CDP (Cisco Discovery Protocol)
- 시스코 라우터나 스위치 장비들끼리 서로의 정보를 볼 수 있도록 만든 프로토콜




Router 0 설정

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa 0/0
Router(config-if)#ip add 10.1.1.1 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int se 0/0/0
Router(config-if)#ip add 10.1.12.1 255.255.255.0
Router(config-if)#no sh
Router(config-if)#clock rate 64000
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
Router(config-if)#end
%SYS-5-CONFIG_I: Configured from console by console

Router#ping 10.1.12.2     - 라우터 1의 설정이 모두 끝난 후 제대로 설정이 되었는지 확인
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 31/31/32 ms

- router rip 설정 -
Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#end
%SYS-5-CONFIG_I: Configured from console by console

- CDP의 확인 -
R1#show cdp ?
  entry          Information for specific neighbor entry
  interface    CDP interface status and configuration
  neighbors  CDP neighbor entries
  <cr>
R1#show cdp
Global CDP information:
    Sending CDP packets every 60 seconds
    Sending a holdtime value of 180 seconds
    Sending CDPv2 advertisements is enabled
R1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID    Local Intrfce   Holdtme    Capability   Platform    Port ID
Switch       Fas 0/0          125            S       2950        Fas 0/2
Router       Ser 0/0/0        140            R       C2800       Ser 0/0/0
R1#show cdp entry ?
  *         all CDP neighbor entries
  WORD  Name of CDP neighbor entry
R1#show cdp entry *
Device ID: Switch
Entry address(es):
Platform: cisco 2950, Capabilities: Switch
Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/2
Holdtime: 166

Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

advertisement version: 2
Duplex: full
---------------------------

Device ID: Router
Entry address(es):
  IP address : 10.1.12.2
Platform: cisco C2800, Capabilities: Router
Interface: Serial0/0/0, Port ID (outgoing port): Serial0/0/0
Holdtime: 121

Version :
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team

advertisement version: 2
Duplex: full

R1#show cdp neighbors ?
  detail  Show detailed information
  <cr>
R1#show cdp neighbors detail
Device ID: Switch
Entry address(es):
Platform: cisco 2950, Capabilities: Switch
Interface: FastEthernet0/0, Port ID (outgoing port): FastEthernet0/2
Holdtime: 172

Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA4, RELEASE SOFTWARE(fc1)
Copyright (c) 1986-2005 by cisco Systems, Inc.
Compiled Wed 18-May-05 22:31 by jharirba

advertisement version: 2
Duplex: full
---------------------------

Device ID: Router
Entry address(es):
  IP address : 10.1.12.2
Platform: cisco C2800, Capabilities: Router
Interface: Serial0/0/0, Port ID (outgoing port): Serial0/0/0
Holdtime: 67

Version :
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(15)T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Wed 18-Jul-07 06:21 by pt_rel_team

advertisement version: 2
Duplex: full
---------------------------

R1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID    Local Intrfce   Holdtme    Capability   Platform    Port ID
Switch       Fas 0/0          150            S       2950        Fas 0/2
Router       Ser 0/0/0        45             R       C2800       Ser 0/0/0    - Router 1으로 호스트 네임을 적용해 주기 전의 이름이다.
R2           Ser 0/0/0        165            R       C2800       Ser 0/0/0     - Router 1으로 호스트 네임을 적용한 이름이다.
R1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID    Local Intrfce   Holdtme    Capability   Platform    Port ID
Switch       Fas 0/0          136            S       2950        Fas 0/2
R2           Ser 0/0/0        151            R       C2800       Ser 0/0/0    - 시간이 지난후 Router 1의 내용이 갱신되었다.

------------------------------------------------------------------------------------------------------------------

Router 1 설정

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa 0/0
Router(config-if)#ip add 10.2.2.2 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#int se 0/0/0
Router(config-if)#ip add 10.1.12.2 255.255.255.0
Router(config-if)#no sh
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up
Router(config-if)#exit
Router(config)#do show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.12.0 is directly connected, Serial0/0/0
C       10.2.2.0 is directly connected, FastEthernet0/0

Router(config)#do ping 10.1.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
Router(config)#!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/31 ms

- Router rip  설정 -
Router(config)#router rip
Router(config-router)#network 10.0.0.0
Router(config-router)#end
%SYS-5-CONFIG_I: Configured from console by console
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R2     - Router 1의 호스트네임 설정
R2(config)#end
%SYS-5-CONFIG_I: Configured from console by console


'CCNA 기초' 카테고리의 다른 글

WAN - Frame Relay  (0) 2008.12.04
WAN (Wide Area Network) - PPP & HDLC  (0) 2008.12.04
Wireless LAN  (0) 2008.12.04
Router Flash Backup  (0) 2008.12.04
IP Routing - OSPF  (0) 2008.12.03
IP Routing - EIGRP  (0) 2008.12.03