EdgeRouter - 인터페이스에서 LLDP 환경설정 =============================================== download at 2017-09-14T03:23:09Z `origin `_ Overview -------------- 이 문서는 링크 레이어 탐색 프로토콜 (Link Layer Discovery Protocol, LLDP)를 EdgeRouter에 구성하는 방법에 대하여 서술합니다. LLDP는 IEEE 802 로컬 영역 네트워크에서 광고, 탐색을 위한 레이어 2 프로토콜 입니다. LLDP의 기능은 Cisco의 CDP(Cisco Discovery Protocol)과 그 기능이 동일합니다. 구성 다음은 최소한의 환경설정입니다: :: ubnt@R1# set service lldp [edit] ubnt@R1# commit [ service lldp ] Starting lldpd... 명령어 확인하기 \ *show lldp* 를 통해서 명령어를 확인할 수 있습니다: :: ubnt@R1:~$ show lldp neighbors Capability Codes: R - Router, B - Bridge, W - Wlan r - Repeater, S - Station D - Docsis, T - Telephone, O - Other Device ID Local Proto Cap Platform Port ID --------- ----- ----- --- -------- ------- ProCurve Switch 2510B-24 eth0 LLDP B ProCurve J9019B Swit 1 R2 eth1 LLDP R UBNT EdgeRouter Lite 3-Port eth1 :: ubnt@R1:~$ show lldp neighbors detail ------------------------------------------------------------------------------- LLDP neighbors: ------------------------------------------------------------------------------- Interface: eth0, via: LLDP, RID: 1, Time: 0 day, 00:02:56 Chassis: ChassisID: mac c0:91:34:51:9d:00 SysName: ProCurve Switch 2510B-24 SysDescr: ProCurve J9019B Switch 2510B-24, revision Q.11.17, ROM Q.10.02 (/sw/code/build/harp(bh2)) MgmtIP: 10.1.0.209 Capability: Bridge, on Port: PortID: local 1 PortDescr: 1 ------------------------------------------------------------------------------- Interface: eth1, via: LLDP, RID: 3, Time: 0 day, 00:01:44 Chassis: ChassisID: mac dc:9f:db:17:12:34 SysName: R2 SysDescr: UBNT EdgeRouter Lite 3-Port running on v1.0.3dev.4515948.121206.0102 MgmtIP: 192.0.2.20 Capability: Bridge, off Capability: Router, on Capability: Wlan, off Port: PortID: mac dc:9f:db:17:12:35 PortDescr: eth1 PMD autoneg: supported: yes, enabled: yes Adv: 10Base-T, HD: yes, FD: yes Adv: 100Base-T, HD: yes, FD: yes Adv: 1000Base-T, HD: no, FD: yes MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex mode LLDP-MED: Device Type: Network Connectivity Device Capability: Capabilities Capability: Policy Capability: Location Capability: MDI/PSE Capability: MDI/PD Capability: Inventory Inventory: Software Revision: 2.6.32.13-UBNT 추가 LLDP 환경설정 주어진 인터페이스, 혹은 모든 인터페이스에 대하여 자세한 내용을 확인할 수 있습니다. - 다음 3가지 방법을 사용하여 위치를 지정할 수 있습니다: :: ubnt@R2# set service lldp interface all location ? Possible completions: civic-based Civic-based location data coordinate-based Coordinate based location elin ECS ELIN number - 다음 예제는 civic 기반 위치 데이터를 사용합니다. 사용 가능한 데이터 타입은 다음과 같습니다: :: ubnt@R2# set service lldp interface all location civic-based country-code US [edit] ubnt@R2# set service lldp interface all location civic-based ca-type ? Possible completions: 0 Language 1 National subdivisions 2 County, parish, district 3 City, township 4 City division, borough, ward 5 Neighborhood, block 6 Street 16 Leading street direction 17 Trailing street suffix 18 Street suffix 19 House number 20 House number suffix 21 Landmark or vanity address 22 Additional location info 23 Name 24 Postal/ZIP code 25 Building 26 Unit 27 Floor 28 Room number 29 Place type 128 Script - 다음 명령어를 사용하여 civic 기반 위치 데이터를 지정할 수 있습니다: :: ubnt@R2# edit service lldp interface all location civic-based [edit service lldp interface all location civic-based] ubnt@R2# set country-code US [edit service lldp interface all location civic-based] ubnt@R2# set ca-type 2 ca-value 'Santa Clara' [edit service lldp interface all location civic-based] ubnt@R2# set ca-type 3 ca-value 'San Jose' [edit service lldp interface all location civic-based] ubnt@R2# set ca-type 6 ca-value '2580 Orchard Parkway' [edit service lldp interface all location civic-based] ubnt@R2# set ca-type 24 ca-value 95131 [edit service lldp interface all location civic-based] ubnt@R2# set ca-type 1 ca-value CA [edit service lldp interface all location civic-based] ubnt@R2# top [edit] ubnt@R2# commit [ service lldp ] Starting lldpd... Stopping lldpd... set_location: Location set successfully for eth0 set_location: Location set successfully for eth1 set_location: Location set successfully for eth2 - \ *show lldp neighbors detail* 명령어를 사용하여 새롭게 추가된 상세 내용을 확인할 수 있습니다: :: ubnt@R1:~$ show lldp neighbors detail ------------------------------------------------------------------------------- LLDP neighbors: ------------------------------------------------------------------------------- Interface: eth1, via: LLDP, RID: 3, Time: 0 day, 00:01:28 Chassis: ChassisID: mac dc:9f:db:17:12:34 SysName: R2 SysDescr: UBNT EdgeRouter Lite 3-Port running on v1.0.3dev.4515948.121206.0102 MgmtIP: 192.0.2.20 Capability: Bridge, off Capability: Router, on Capability: Wlan, off Port: PortID: mac dc:9f:db:17:12:35 PortDescr: eth1 PMD autoneg: supported: yes, enabled: yes Adv: 10Base-T, HD: yes, FD: yes Adv: 100Base-T, HD: yes, FD: yes Adv: 1000Base-T, HD: no, FD: yes MAU oper type: 1000BaseTFD - Four-pair Category 5 UTP, full duplex mode LLDP-MED: Device Type: Network Connectivity Device Capability: Capabilities Capability: Policy Capability: Location Capability: MDI/PSE Capability: MDI/PD Capability: Inventory LLDP-MED Location Identification: Type: address Country: US National subdivisions: CA County, parish, district: Santa Clara City, township: San Jose Street: 2580 Orchard Parkway Postal/ZIP code: 95131 Inventory: Software Revision: 2.6.32.13-UBNT 인터페이스 비활성화하기 특정 인터페이스에 대하여 LLDP 광고를 비활성화하기: :: ubnt@R1# set service lldp interface eth0 disable [edit] ubnt@R1# commit [ service lldp ] Starting lldpd... Stopping lldpd...