OcNOS-SP : Ansible Guide : Ansible User Guide : LLDP Configuration
LLDP Configuration
Template File for LLDP
Ocnos_lldp.j2
lldp run
{% for lldp in lldp.lldp1 -%}
interface {{ lldp.name }}
{{ lldp.lagent }}
set lldp {{ lldp.state }} {{ lldp.mode }}
lldp tlv {{ lldp.MED }} {{ lldp.powerviamdi }} select
set lldp {{ lldp.port }} {{ lldp.ifname}}
set lldp management-address-tlv ip-address
{% for tlvselect in lldp.tlvselect -%}
lldp tlv basic-mgmt {{ tlvselect.mgmt }} select
{% endfor -%}
exit
{% endfor -%}
 
Parameter File for LLDP
sw2.yml
 
Lldp
lldp configuration
lldp1:
lldp configuration details
- name: xe2
Configure interface xe2 command
lagent: lldp-agent
Enable lldp agent under xe2 interface
state: enable
Configure set lldp enable txrx command under interface xe2
mode: txrx
Configure lldp mode as txrx under interface xe2
MED: med
Configure lldp tlv-select med media-capabilities command under lldp-agent
powerviamdi: media-capabilities
Configure extended-power-via-mdi media-capailities in lldp tlv-select med media-capabilities command under lldp-agent
port: port-id-tlv
Configure port-id-tlv in set lldp port-id-tlv if-name command under interface xe2
ifname: if-name
Configure if-name as port-id-TLV in set lldp port-id-tlv if-name command under interface xe2
tlvselect :
tlv select configuration
- mgmt: port-description
Configure lldp tlv-select basic-mgmt port-description command under interface xe2
- mgmt: system-name
Configure lldp tlv-select basic-mgmt system-name command under interface xe2
- mgmt: system-capabilities
Configure lldp tlv-select basic-mgmt system-capabilities under interface xe2
- mgmt: system-description
Configure lldp tlv-select basic-mgmt system-description under interface xe2
- mgmt: management-address
Configure lldp tlv-select basic-mgmt management-address under interface xe2
- name: xe10
Configure interface xe10 command
lagent: lldp-agent
Enable lldp agent under xe10 interface
state: enable
Configure set lldp enable txrx command under interface xe10
mode: txrx
Configure lldp mode as txrx under interface xe10
MED: med
Configure lldp tlv-select med media-capabilities command under lldp-agent
powerviamdi: media-capabilities
Configure extended-power-via-mdi media-capailities in lldp tlv-select med media-capabilities command under lldp-agent
port: port-id-tlv
Configure port-id-tlv in set lldp port-id-tlv if-name command under interface xe10
ifname: if-name
Configure if-name as port-id-TLV in set lldp port-id-tlv if-name command under interface xe10
tlvselect :
tlv select configuration
- mgmt: port-description
Configure lldp tlv-select basic-mgmt port-description command under interface xe10
- mgmt: system-name
Configure lldp tlv-select basic-mgmt system-name command under interface xe10
- mgmt: system-capabilities
Configure lldp tlv-select basic-mgmt system-capabilities under interface xe10
- mgmt: system-description
Configure lldp tlv-select basic-mgmt system-description under interface xe10
- mgmt: management-address
Configure lldp tlv-select basic-mgmt management-address under interface xe10
- name: xe11
Configure interface xe11 command
lagent: lldp-agent
Enable lldp agent under xe11 interface
state: enable
Configure set lldp enable txrx command under interface xe11
mode: txrx
Configure lldp mode as txrx under interface xe11
MED: med
Configure lldp tlv-select med media-capabilities command under lldp-agent
powerviamdi: media-capabilities
Configure extended-power-via-mdi media-capailities in lldp tlv-select med media-capabilities command under lldp-agent
port: port-id-tlv
Configure port-id-tlv in set lldp port-id-tlv if-name command under interface xe11
ifname: if-name
Configure if-name as port-id-TLV in set lldp port-id-tlv if-name command under interface xe11
tlvselect :
tlv select configuration
- mgmt: port-description
Configure lldp tlv-select basic-mgmt port-description command under interface xe11
- mgmt: system-name
Configure lldp tlv-select basic-mgmt system-name command under interface xe11
- mgmt: system-capabilities
Configure lldp tlv-select basic-mgmt system-capabilities under interface xe11
- mgmt: system-description
Configure lldp tlv-select basic-mgmt system-description under interface xe11
- mgmt: management-address
Configure lldp tlv-select basic-mgmt management-address under interface xe11
- name: xe4
Configure interface xe4 command
state: enable
Enable lldp agent under xe4 interface
lagent: lldp-agent
Configure set lldp enable txrx command under interface xe4
mode: txrx
Configure lldp mode as txrx under interface xe4
MED: med
Configure lldp tlv-select med media-capabilities command under lldp-agent
powerviamdi: media-capabilities
Configure extended-power-via-mdi media-capailities in lldp tlv-select med media-capabilities command under lldp-agent
port: port-id-tlv
Configure port-id-tlv in set lldp port-id-tlv if-name command under interface xe4
ifname: if-name
Configure if-name as port-id-TLV in set lldp port-id-tlv if-name command under interface xe4
tlvselect :
tlv select configuration
- mgmt: port-description
Configure lldp tlv-select basic-mgmt port-description command under interface xe4
- mgmt: system-name
Configure lldp tlv-select basic-mgmt system-name command under interface xe4
- mgmt: system-capabilities
Configure lldp tlv-select basic-mgmt system-capabilities under interface xe4
- mgmt: system-description
Configure lldp tlv-select basic-mgmt system-description under interface xe4
- mgmt: management-address
Configure lldp tlv-select basic-mgmt management-address under interface xe4
Last modified date: 06/08/2023