TIL: TrueNAS CORE speaks CDP (Cisco Discovery Protocol)

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Create a tunable in the UI:

Variable
ladvd_enable
ValueYES
TypeRC
DescriptionEnable CDP
Enabledyes

Start the service:
Code:
root@freenas[~]# service ladvd start


Result on TrueNAS:
Code:
root@freenas[~]# ifconfig ix0
ix0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: connected to cisco (Gi0/7)
    [...]
root@freenas[~]# ifconfig ix1
ix1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: connected to cisco (Gi0/8)
    [...]


Result on Cisco Catalyst switch:
Code:
cisco#sh cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
                  S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
                  D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
esxi             Gig 0/5           150               S    VMware ES vmnic0
esxi             Gig 0/6           150               S    VMware ES vmnic1
freenas.ettlingen.hausen.com
                 Gig 0/8           153               T    FreeBSD 1 ix1
freenas.ettlingen.hausen.com
                 Gig 0/7           153               T    FreeBSD 1 ix0

Total cdp entries displayed : 4


Nice :smile:
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
And today I learned that you can just enable the LLDP service in the "Services" section in the UI ... :tongue:
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
And today I learned that it even works with ESXi:
Code:
root@freenas[~]# ifconfig ix0
ix0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: connected to esxi (vmnic2)
[...]
root@freenas[~]# ifconfig ix1
ix1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    description: connected to esxi (vmnic3)
[...]

Change the CDP policy from "listen" to "both" on the vSwitch config and TrueNAS will happily show the connected system and interface in the description as shown above.

W00t! :smile:
 
Top