CDP සහ LLDP කියන්නේ මොනවාද? සරල සිංහලෙන්

CDP සහ LLDP කියන්නේ මොනවාද? සරල සිංහලෙන්
Hasitha PriyadarshanaOctober 1, 2026Networking

CDP සහ LLDP කියන්නේ මොනවාද?

Networking කරනකොට අපේ Router එකට හෝ Switch එකට directly connect වෙලා තියෙන්නේ මොන devices ද කියලා ඉක්මනින් හොයාගන්න ඕන වෙන අවස්ථා ගොඩක් තියෙනවා.

උදාහරණයක් විදිහට Switch එකකට තවත් Switch එකක් connect වෙලා තියෙනවා කියමු.

අපිට ඒ device එකේ Device Name එක, connect වෙලා තියෙන Port එක, Device Type එක, Model එක සහ IP Address එක වගේ information දැනගන්න අවශ්‍ය වෙන්න පුළුවන්.

මේ වගේ වෙලාවක Neighbor Discovery Protocols භාවිතා කරන්න පුළුවන්.

Cisco networking වල මේකට වැදගත් protocols දෙකක් තමයි:

  • CDP – Cisco Discovery Protocol
  • LLDP – Link Layer Discovery Protocol

CDP කියන්නේ මොකක්ද?

CDP (Cisco Discovery Protocol) කියන්නේ Cisco devices වල directly connected neighboring devices ගැන information discover කරන්න භාවිතා කරන Layer 2 protocol එකක්.

සරල network එකක් බලමු:

Router1 -------- Switch1 -------- Switch2

Router1 එකෙන් CDP භාවිතා කරලා directly connected Switch1 ගැන information ලබාගන්න පුළුවන්.

හැබැයි Router1 එකෙන් Switch2 direct neighbor කෙනෙක් නෙවෙයි.

ඒ නිසා CDP කියන්නේ මුළු network එකම scan කරන protocol එකක් නෙවෙයි. ඒක directly connected neighbors discover කරන්න භාවිතා කරන protocol එකක්.

CDP වලින් දැනගන්න පුළුවන් මොනවාද?

CDP මගින් neighbor device එක ගැන මේ වගේ information ලබාගන්න පුළුවන්:

  • Device ID
  • Local Interface
  • Holdtime
  • Capability
  • Platform
  • Port ID
  • IP Address
  • Software Version
  • Native VLAN වගේ additional information

උදාහරණයක්:

R1 -------- SW1
G0/0        G0/1

R1 එකෙන් neighbors බලන්න:

R1# show cdp neighbors

මේ command එකෙන් directly connected CDP neighbors වල summary information ලබාගන්න පුළුවන්.

Detailed CDP Information

Neighbor device එක ගැන තවත් details බලන්න:

Router# show cdp neighbors detail

මේකෙන් Device ID, IP Address, Platform, Local Interface, Remote Port සහ Software information වගේ වැඩි details ලබාගන්න පුළුවන්.

CDP Enable කරන්නේ කොහොමද?

CDP globally enable කරන්න:

Router(config)# cdp run

Globally disable කරන්න:

Router(config)# no cdp run

Specific interface එකක CDP enable කරන්න:

Router(config)# interface g0/0
Router(config-if)# cdp enable

Interface එකක CDP disable කරන්න:

Router(config-if)# no cdp enable

සරලව මතක තියාගන්න:

cdp run    = Global
cdp enable = Interface

LLDP කියන්නේ මොකක්ද?

LLDP (Link Layer Discovery Protocol) වලත් basic purpose එක CDP වගේමයි.

ඒ කියන්නේ directly connected neighboring devices ගැන information discover කරන එක.

හැබැයි CDP සහ LLDP අතර වැදගත් වෙනසක් තියෙනවා.

CDP Cisco proprietary protocol එකක්.

LLDP IEEE standard protocol එකක්.

ඒ නිසා different vendors ලගේ networking devices තියෙන environment එකක LLDP භාවිතා කරන්න පුළුවන්.

උදාහරණයක්:

Cisco Switch
     |
     |
Aruba Switch
     |
     |
Juniper Device

මේ වගේ multi-vendor environment එකක LLDP ගොඩක් useful.

LLDP Enable කරන්නේ කොහොමද?

LLDP globally enable කරන්න:

Switch(config)# lldp run

Globally disable කරන්න:

Switch(config)# no lldp run

LLDP Transmit සහ Receive

LLDP interface level එකේ වැදගත් commands දෙකක් තියෙනවා.

Switch(config)# interface g0/1
Switch(config-if)# lldp transmit
Switch(config-if)# lldp receive

lldp transmit කියන්නේ interface එකෙන් LLDP information send කරන්න.

lldp receive කියන්නේ වෙනත් devices වලින් එන LLDP information receive කරන්න.

සරලව:

lldp transmit = Send
lldp receive  = Receive

LLDP Neighbors බලන්නේ කොහොමද?

LLDP neighbors බලන්න:

Switch# show lldp neighbors

Detailed information බලන්න:

Switch# show lldp neighbors detail

LLDP information බලන්න:

Switch# show lldp

CDP සහ LLDP අතර වෙනස

| Feature | CDP | LLDP | |---|---|---| | Full Name | Cisco Discovery Protocol | Link Layer Discovery Protocol | | Type | Cisco proprietary | IEEE standard | | Multi-vendor | Mainly Cisco environments | Yes | | Neighbor Discovery | Yes | Yes | | Global Enable | cdp run | lldp run | | Neighbor Command | show cdp neighbors | show lldp neighbors | | Detailed Command | show cdp neighbors detail | show lldp neighbors detail |

CDP සහ LLDP Layer 2 ද?

ඔව්. CDP සහ LLDP දෙකම Layer 2 neighbor discovery protocols.

ඒ නිසා directly connected interface එකකට IP address එකක් configure කරලා නැති වුණත් neighbor discovery information ලබාගන්න පුළුවන්.

හැබැයි neighbor device එකෙන් IP information advertise කරන්න address එකක් available නැත්නම් ඒ IP information එක ලබාගන්න බැහැ.

Practical Example

Network එක මෙහෙමයි කියලා හිතමු:

R1 ---------------- SW1
G0/0                G0/1

R1 එකෙන්:

R1# show cdp neighbors

run කළාම SW1 device එක, local interface එක සහ remote port එක වගේ information ලබාගන්න පුළුවන්.

උදාහරණයක්:

Device ID       : SW1
Local Interface : G0/0
Remote Port     : G0/1
Capability      : Switch

මේක physical network connections identify කරන්න ගොඩක් useful.

Troubleshooting වල CDP සහ LLDP

Real network එකක troubleshooting කරනකොට CDP සහ LLDP ගොඩක් useful.

හිතමු Router එකේ G0/1 interface එක connect වෙලා තියෙන්නේ මොන Switch එකේ මොන port එකටද කියලා හොයාගන්න ඕන.

එතකොට:

show cdp neighbors

හෝ

show lldp neighbors

භාවිතා කරලා neighboring device සහ port information හොයාගන්න පුළුවන්.

Security ගැනත් හිතන්න ඕන

CDP සහ LLDP වලින් device names, platforms, interfaces සහ වෙනත් network information advertise වෙන්න පුළුවන්.

ඒ නිසා discovery protocol අවශ්‍ය නැති untrusted-facing interface එකක් නම් ඒ interface එකේ protocol එක disable කිරීම සුදුසු වෙන්න පුළුවන්.

CDP interface එකක disable කරන්න:

Router(config-if)# no cdp enable

LLDP transmit සහ receive disable කරන්න:

Switch(config-if)# no lldp transmit
Switch(config-if)# no lldp receive

CCNA වලට මතක තියාගන්න

CDP = Cisco proprietary
LLDP = IEEE standard / Multi-vendor

cdp run = CDP globally enable
cdp enable = CDP interface එකක enable

lldp run = LLDP globally enable
lldp transmit = Send LLDP information
lldp receive = Receive LLDP information

Neighbor information බලන්න:

show cdp neighbors
show lldp neighbors

Detailed information බලන්න:

show cdp neighbors detail
show lldp neighbors detail

අවසානයේ

සරලවම කිව්වොත් CDP සහ LLDP කියන්නේ directly connected network devices එකිනෙකා ගැන information discover කරගන්න භාවිතා කරන Layer 2 protocols දෙකක්.

Cisco environment එකක CDP භාවිතා වෙන්න පුළුවන්. Different vendors ලගේ devices එකට වැඩ කරන environment එකක LLDP ගොඩක් වැදගත්.

අවසානයට මේ දෙක මතක තියාගන්න:

CDP  = Cisco Discovery
LLDP = Standards-based Multi-Vendor Discovery

Networking practicals, troubleshooting සහ CCNA exam එකටත් CDP සහ LLDP ගැන හොඳ understanding එකක් තියෙන එක වැදගත්.