11-28-2021 09:04 PM
12-04-2021 09:18 PM
Hi Jaggy ,
When LLDP is confgured the ip address selection is based on the following points .
IPv4 and IPv6 management addresses—In general, both IPv4 and IPv6 addresses will be advertised if they are available, and preference is given to the address that is configured on the transmitting interface.
If the transmitting interface does not have a configured address, then the TLV will be populated with an address from another interface. The advertised LLDP IP address is implemented according to the following priority order of IP addresses for interfaces on the router:
Locally configured address --------- local LDP interface ip
MgmtEth0/RP0/CPU0/0
MgmtEth0/RP0/CPU0/1
Loopback interfaces
There are some differences between IPv4 and IPv6 address management in LLDP:
For IPv4, as long as the IPv4 address is configured on an interface, it can be used as an LLDP management address.
For IPv6, after the IPv6 address is configured on an interface, the interface status must be Up and pass the DAD (Duplicate Address Detection) process before it is can be used as an LLDP management address.
So if you want to have a loopback ip (which has lowest priortiy ) for lldp advertisement then you can try to assign the ip address via "ipv4 unnumbered loopback" on specefic LLDP physical interface (on MGMT interface we cannot try this method ).
This will force to pick the loopback as the LLDP advertisement ip as shown below .
for example :
ASR-TEST1 Hu 0/0/0/23 ---------lldp ----------- Hu 0/0/0/16 ASR-TEST2
RP/0/RSP0/CPU0:ASR-TEST1#sh int loop 0
Sun Dec 5 04:55:42.230 UTC
Loopback0 is up, line protocol is up
Interface state transitions: 1
Hardware is Loopback interface(s)
Internet address is 1.1.1.2/32
RP/0/RSP0/CPU0:ASR-TEST1#sh run int HundredGigE0/0/0/23
Sun Dec 5 04:51:06.300 UTC
interface HundredGigE0/0/0/23
cdp
ipv4 point-to-point
ipv4 unnumbered Loopback0
lldp
enable
!
!
RP/0/RSP0/CPU0:ASR-TEST1#sh lldp neighbors HundredGigE0/0/0/23 detail
Sun Dec 5 04:51:16.517 UTC
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
------------------------------------------------
Local Interface: HundredGigE0/0/0/23
Chassis id: 08ec.f56f.ae99
Port id: HundredGigE0/0/0/16
Port Description - not advertised
System Name: ASR-TEST2
System Description:
7.1.15, ASR9K
Time remaining: 101 seconds
Hold Time: 120 seconds
System Capabilities: R
Enabled Capabilities: R
Management Addresses:
IPv4 address: 172.18.87.90 ---- from other side i am getting Mgmt ip from ASR-TEST2
-------------------------------
RP/0/RSP1/CPU0:ASR-TEST2#sh run int mgmtEth 0/RSP1/CPU0/0
Sun Dec 5 05:12:04.403 UTC
interface MgmtEth0/RSP1/CPU0/0
cdp
vrf calo-mgmt
ipv4 address 172.18.87.90 255.255.255.192
RP/0/RSP1/CPU0:ASR-TEST2#sh lldp neighbors HundredGigE0/0/0/16 detail
Sun Dec 5 05:04:26.809 UTC
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
------------------------------------------------
Local Interface: HundredGigE0/0/0/16
Chassis id: 70e4.2271.5d57
Port id: HundredGigE0/0/0/23
Port Description - not advertised
System Name: ASR-TEST1
System Description:
7.3.1, ASR9K
Time remaining: 113 seconds
Hold Time: 120 seconds
System Capabilities: R
Enabled Capabilities: R
Management Addresses:
IPv4 address: 1.1.1.2 ---- i am getting the loopback ip from ASR-TEST1 end
12-04-2021 09:18 PM
Hi Jaggy ,
When LLDP is confgured the ip address selection is based on the following points .
IPv4 and IPv6 management addresses—In general, both IPv4 and IPv6 addresses will be advertised if they are available, and preference is given to the address that is configured on the transmitting interface.
If the transmitting interface does not have a configured address, then the TLV will be populated with an address from another interface. The advertised LLDP IP address is implemented according to the following priority order of IP addresses for interfaces on the router:
Locally configured address --------- local LDP interface ip
MgmtEth0/RP0/CPU0/0
MgmtEth0/RP0/CPU0/1
Loopback interfaces
There are some differences between IPv4 and IPv6 address management in LLDP:
For IPv4, as long as the IPv4 address is configured on an interface, it can be used as an LLDP management address.
For IPv6, after the IPv6 address is configured on an interface, the interface status must be Up and pass the DAD (Duplicate Address Detection) process before it is can be used as an LLDP management address.
So if you want to have a loopback ip (which has lowest priortiy ) for lldp advertisement then you can try to assign the ip address via "ipv4 unnumbered loopback" on specefic LLDP physical interface (on MGMT interface we cannot try this method ).
This will force to pick the loopback as the LLDP advertisement ip as shown below .
for example :
ASR-TEST1 Hu 0/0/0/23 ---------lldp ----------- Hu 0/0/0/16 ASR-TEST2
RP/0/RSP0/CPU0:ASR-TEST1#sh int loop 0
Sun Dec 5 04:55:42.230 UTC
Loopback0 is up, line protocol is up
Interface state transitions: 1
Hardware is Loopback interface(s)
Internet address is 1.1.1.2/32
RP/0/RSP0/CPU0:ASR-TEST1#sh run int HundredGigE0/0/0/23
Sun Dec 5 04:51:06.300 UTC
interface HundredGigE0/0/0/23
cdp
ipv4 point-to-point
ipv4 unnumbered Loopback0
lldp
enable
!
!
RP/0/RSP0/CPU0:ASR-TEST1#sh lldp neighbors HundredGigE0/0/0/23 detail
Sun Dec 5 04:51:16.517 UTC
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
------------------------------------------------
Local Interface: HundredGigE0/0/0/23
Chassis id: 08ec.f56f.ae99
Port id: HundredGigE0/0/0/16
Port Description - not advertised
System Name: ASR-TEST2
System Description:
7.1.15, ASR9K
Time remaining: 101 seconds
Hold Time: 120 seconds
System Capabilities: R
Enabled Capabilities: R
Management Addresses:
IPv4 address: 172.18.87.90 ---- from other side i am getting Mgmt ip from ASR-TEST2
-------------------------------
RP/0/RSP1/CPU0:ASR-TEST2#sh run int mgmtEth 0/RSP1/CPU0/0
Sun Dec 5 05:12:04.403 UTC
interface MgmtEth0/RSP1/CPU0/0
cdp
vrf calo-mgmt
ipv4 address 172.18.87.90 255.255.255.192
RP/0/RSP1/CPU0:ASR-TEST2#sh lldp neighbors HundredGigE0/0/0/16 detail
Sun Dec 5 05:04:26.809 UTC
Capability codes:
(R) Router, (B) Bridge, (T) Telephone, (C) DOCSIS Cable Device
(W) WLAN Access Point, (P) Repeater, (S) Station, (O) Other
------------------------------------------------
Local Interface: HundredGigE0/0/0/16
Chassis id: 70e4.2271.5d57
Port id: HundredGigE0/0/0/23
Port Description - not advertised
System Name: ASR-TEST1
System Description:
7.3.1, ASR9K
Time remaining: 113 seconds
Hold Time: 120 seconds
System Capabilities: R
Enabled Capabilities: R
Management Addresses:
IPv4 address: 1.1.1.2 ---- i am getting the loopback ip from ASR-TEST1 end
12-05-2021 04:29 AM
Hi ntikader,
Thanks for explanation, what about the lldp address behaviour on switch?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide