Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

voice vlan #339

Open
weilixin opened this issue Aug 8, 2019 · 26 comments
Open

voice vlan #339

weilixin opened this issue Aug 8, 2019 · 26 comments

Comments

@weilixin
Copy link

weilixin commented Aug 8, 2019

Hello, Vincent

I hope to simplify VoIP deployment by supporting Voice VLAN, our voice device is based on android 4.4, LLDP has been compiled successfully and is running well.

root@rk3188:/ # lldpcli -help
Usage: lldpcli [OPTIONS ...] [COMMAND ...]
Version: lldpd 1.0.4-9-g9b68a67-dirty

-d Enable more debugging information.
-u socket Specify the Unix-domain socket used for communication with lldpd(8).
-f format Choose output format (plain, keyvalue, json, json0).
-c conf Read the provided configuration file.

see manual page lldpcli(8) for more information

But I don't know what to do next, How to get tag ID of voice VLAN ?

Here's what I learned about other similar problems:

lldp-med #145

The result of my attempt:
130|root@rk3188:/ # lldpcli -d
[lldpcli] # conf med policy application voice vlan 4088 priority voice
2019-08-08T21:42:40 [INFO/lldpctl] LLDP-MED policy has been set for port eth0

After receiving the lldp packet with vlan, vlan will be automatically stripped? #319

I was wondering if I would need to change the implementation code ?

I look forward to your answer, thank you very much!

@vincentbernat
Copy link
Member

You can use lldpctl -f keyvalue show neighbors details | grep policy and you can extract the VLAN from here.

@weilixin
Copy link
Author

weilixin commented Aug 9, 2019

You can use lldpctl -f keyvalue show neighbors details | grep policy and you can extract the VLAN from here.

Thank you for your reply!
Looking at the manual page for lldpd carefully, I followed the following steps.

1.Start the lldpd

root@rk3188:/ # lldpd -v
1.0.4-9-g9b68a67-dirty

root@rk3188:/ # lldpd -ddddd -M 3

2019-08-09T21:12:20 [ DBG/main] lldpd 1.0.4-9-g9b68a67-dirty starting...
2019-08-09T21:12:20 [ DBG/main] creating control socket
2019-08-09T21:12:20 [ DBG/control] create control socket /system/var/run/lldpd.socket
2019-08-09T21:12:20 [INFO/main] unable to create control socket because it already exists
2019-08-09T21:12:20 [INFO/main] check if another instance is running
2019-08-09T21:12:20 [ DBG/control] connect to control socket /system/var/run/lldpd.socket
2019-08-09T21:12:20 [WARN/control] unable to connect to socket /system/var/run/lldpd.socket: Connection refused
2019-08-09T21:12:20 [INFO/main] old control socket is present, clean it
2019-08-09T21:12:20 [ DBG/control] cleanup control socket
2019-08-09T21:12:20 [ DBG/control] create control socket /system/var/run/lldpd.socket
2019-08-09T21:12:20 [ DBG/control] listen to control socket /system/var/run/lldpd.socket
2019-08-09T21:12:20 [ DBG/main] invoking lldpcli for default configuration locations
2019-08-09T21:12:20 [ DBG/main] invoke /system/bin/lldpcli -sdddd
2019-08-09T21:12:20 [ DBG/main] get OS/LSB release information
2019-08-09T21:12:20 [ DBG/main] invoke /system/bin/lldpcli -sdddd
2019-08-09T21:12:20 [ DBG/localchassis] grab OS release
2019-08-09T21:12:20 [ DBG/localchassis] could not open /etc/os-release
2019-08-09T21:12:20 [INFO/localchassis] could not open either /etc/os-release or /usr/lib/os-release
2019-08-09T21:12:20 [ DBG/localchassis] grab LSB release
2019-08-09T21:12:20 [INFO/localchassis] lsb_release information not available
2019-08-09T21:12:20 [ DBG/main] initialize privilege separation
2019-08-09T21:12:20 [INFO/privsep] no libcap support, running monitor as root
2019-08-09T21:12:20 [ DBG/privsep] dropping privileges
2019-08-09T21:12:20 [ DBG/privsep] received command 0
2019-08-09T21:12:20 [ DBG/privsep] monitor ready
2019-08-09T21:12:20 [ DBG/main] get an ioctl socket
2019-08-09T21:12:20 [ DBG/main] set system capabilities
2019-08-09T21:12:20 [ DBG/main] initialize protocols
2019-08-09T21:12:20 [INFO/main] protocol LLDP enabled
2019-08-09T21:12:20 [INFO/main] protocol CDPv1 disabled
2019-08-09T21:12:20 [INFO/main] protocol CDPv2 disabled
2019-08-09T21:12:20 [INFO/main] protocol SONMP disabled
2019-08-09T21:12:20 [INFO/main] protocol EDP disabled
2019-08-09T21:12:20 [INFO/main] protocol FDP disabled
2019-08-09T21:12:20 [ DBG/main] start main loop
2019-08-09T21:12:20 [ DBG/event] initialize libevent
2019-08-09T21:12:20 [INFO/event] libevent 2.2.0-alpha-dev initialized with epoll method
2019-08-09T21:12:20 [ DBG/event] register loop timer
2019-08-09T21:12:20 [ DBG/event] register Unix socket
2019-08-09T21:12:20 [ DBG/event] monitor the monitor process
2019-08-09T21:12:20 [ DBG/event] register signals
2019-08-09T21:12:20 [ DBG/loop] start new loop
2019-08-09T21:12:20 [ DBG/loop] update information for local ports
2019-08-09T21:12:20 [ DBG/localchassis] update information for local ports
2019-08-09T21:12:20 [ DBG/netlink] initialize netlink subsystem
2019-08-09T21:12:20 [ DBG/netlink] listening on interface changes
2019-08-09T21:12:20 [ DBG/netlink] opening netlink socket
2019-08-09T21:12:20 [ DBG/netlink] sending netlink message
2019-08-09T21:12:20 [ DBG/netlink] received address information
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 2 for iface 1
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 3 for iface 1
2019-08-09T21:12:20 [ DBG/netlink] new address 127.0.0.1%1
2019-08-09T21:12:20 [ DBG/netlink] received address information
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 2 for iface 2
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 4 for iface 2
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 3 for iface 2
2019-08-09T21:12:20 [ DBG/netlink] new address 172.20.84.122%2
2019-08-09T21:12:20 [ DBG/netlink] received address information
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 6 for iface 1
2019-08-09T21:12:20 [ DBG/netlink] new address ::1%1
2019-08-09T21:12:20 [ DBG/netlink] received address information
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 6 for iface 2
2019-08-09T21:12:20 [ DBG/netlink] new address 2400:da00:c0c3:2a1:72f8:e7ff:fe50:7a%2
2019-08-09T21:12:20 [ DBG/netlink] received address information
2019-08-09T21:12:20 [ DBG/netlink] unhandled address attribute type 6 for iface 2
2019-08-09T21:12:20 [ DBG/netlink] new address fe80::72f8:e7ff:fe50:7a%2
2019-08-09T21:12:20 [ DBG/netlink] received done message
2019-08-09T21:12:20 [ DBG/netlink] sending netlink message
2019-08-09T21:12:20 [ DBG/netlink] received link information
2019-08-09T21:12:20 [ DBG/netlink] skip non Ethernet interface at index 1
2019-08-09T21:12:20 [ DBG/netlink] received link information
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 13 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 16 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 17 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 27 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 6 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 14 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 2 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 7 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 23 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] unhandled link attribute type 26 for iface eth0
2019-08-09T21:12:20 [ DBG/netlink] parsed link 2 (eth0, flags: 69699)
2019-08-09T21:12:20 [ DBG/netlink] interface eth0 is new
2019-08-09T21:12:20 [ DBG/netlink] received link information
2019-08-09T21:12:20 [ DBG/netlink] skip non Ethernet interface at index 3
2019-08-09T21:12:20 [ DBG/netlink] received link information
2019-08-09T21:12:20 [ DBG/netlink] skip non Ethernet interface at index 4
2019-08-09T21:12:20 [ DBG/netlink] received done message
2019-08-09T21:12:20 [ DBG/event] subscribe to interface changes from socket 11
2019-08-09T21:12:20 [ DBG/interfaces] driver for eth0 is rk29 vmac
2019-08-09T21:12:20 [ DBG/interfaces] eth0 is a physical interface
2019-08-09T21:12:20 [ DBG/interfaces] eth0 is an acceptable ethernet device
2019-08-09T21:12:20 [ DBG/alloc] allocate a new local port (eth0)
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_port
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of lldpd_port
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/event] initialize events for eth0
2019-08-09T21:12:20 [ DBG/interfaces] initialize ethernet device eth0
2019-08-09T21:12:20 [ DBG/privsep] received command 4
2019-08-09T21:12:20 [ DBG/lldpctl] cannot find configuration file/directory /system/etc/lldpd.conf
2019-08-09T21:12:20 [ DBG/lldpctl] cannot find configuration file/directory /system/etc/lldpd.d
2019-08-09T21:12:20 [ DBG/lldpctl] connect to lldpd
2019-08-09T21:12:20 [ DBG/lldpctl] argument 00: resume
2019-08-09T21:12:20 [ DBG/lldpctl] process argument 00: resume
2019-08-09T21:12:20 [ DBG/lldpctl] process argument 01: <CR>
2019-08-09T21:12:20 [ DBG/control] send a message through control socket
2019-08-09T21:12:20 [ DBG/control] connect to control socket /system/var/run/lldpd.socket
2019-08-09T21:12:20 [ DBG/privsep] set BPF filter for eth0
2019-08-09T21:12:20 [ DBG/privsep] received command 5
2019-08-09T21:12:20 [ DBG/privsep] received command 5
2019-08-09T21:12:20 [ DBG/privsep] received command 5
2019-08-09T21:12:20 [ DBG/interfaces] interface eth0 initialized (fd=13)
2019-08-09T21:12:20 [ DBG/interfaces] use MAC address for eth0
2019-08-09T21:12:20 [ DBG/interfaces] using ifname in description for eth0
2019-08-09T21:12:20 [ DBG/alloc] cleanup management addresses for chassis (unknown)
2019-08-09T21:12:20 [ DBG/alloc] allocate a new management address (family: 1)
2019-08-09T21:12:20 [ DBG/interfaces] add management address 172.20.84.122
2019-08-09T21:12:20 [ DBG/alloc] allocate a new management address (family: 2)
2019-08-09T21:12:20 [ DBG/interfaces] add management address 2400:da00:c0c3:2a1:72f8:e7ff:fe50:7a
2019-08-09T21:12:20 [ DBG/interfaces] ask ethtool for the appropriate MAC/PHY for eth0
2019-08-09T21:12:20 [ DBG/interfaces] got ethtool results for eth0 with GSET
2019-08-09T21:12:20 [ DBG/localchassis] cleanup all ports
2019-08-09T21:12:20 [ DBG/alloc] cleanup remote port on eth0
2019-08-09T21:12:20 [ DBG/event] schedule next cleanup
2019-08-09T21:12:20 [ DBG/event] next cleanup in 120 seconds
2019-08-09T21:12:20 [ DBG/localchassis] cleanup all chassis
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_port
2019-08-09T21:12:20 [ DBG/marshal] start serialization of fixed string
2019-08-09T21:12:20 [ DBG/marshal] start serialization of null string
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/localchassis] change detected for port eth0, resetting its timer
2019-08-09T21:12:20 [ DBG/event] schedule sending PDU on eth0
2019-08-09T21:12:20 [ DBG/loop] update information for local chassis
2019-08-09T21:12:20 [ DBG/localchassis] update information for local chassis
2019-08-09T21:12:20 [ DBG/privsep] received command 2
2019-08-09T21:12:20 [ DBG/localchassis] advertise system version
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/localchassis] DMI request for file /sys/class/dmi/id/product_version
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/localchassis] cannot get DMI file /sys/class/dmi/id/product_version
2019-08-09T21:12:20 [ DBG/localchassis] DMI request for file /sys/class/dmi/id/bios_version
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/localchassis] cannot get DMI file /sys/class/dmi/id/bios_version
2019-08-09T21:12:20 [ DBG/localchassis] DMI request for file /sys/class/dmi/id/product_serial
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/localchassis] cannot get DMI file /sys/class/dmi/id/product_serial
2019-08-09T21:12:20 [ DBG/localchassis] DMI request for file /sys/class/dmi/id/sys_vendor
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/localchassis] cannot get DMI file /sys/class/dmi/id/sys_vendor
2019-08-09T21:12:20 [ DBG/localchassis] DMI request for file /sys/class/dmi/id/product_name
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/localchassis] cannot get DMI file /sys/class/dmi/id/product_name
2019-08-09T21:12:20 [ DBG/localchassis] DMI request for file /sys/class/dmi/id/chassis_asset_tag
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/localchassis] cannot get DMI file /sys/class/dmi/id/chassis_asset_tag
2019-08-09T21:12:20 [ DBG/loop] start new loop
2019-08-09T21:12:20 [ DBG/loop] update information for local ports
2019-08-09T21:12:20 [ DBG/localchassis] update information for local ports
2019-08-09T21:12:20 [ DBG/interfaces] eth0 is a physical interface
2019-08-09T21:12:20 [ DBG/interfaces] eth0 is an acceptable ethernet device
2019-08-09T21:12:20 [ DBG/interfaces] use MAC address for eth0
2019-08-09T21:12:20 [ DBG/interfaces] using ifname in description for eth0
2019-08-09T21:12:20 [ DBG/alloc] cleanup management addresses for chassis localhost
2019-08-09T21:12:20 [ DBG/alloc] allocate a new management address (family: 1)
2019-08-09T21:12:20 [ DBG/interfaces] add management address 172.20.84.122
2019-08-09T21:12:20 [ DBG/alloc] allocate a new management address (family: 2)
2019-08-09T21:12:20 [ DBG/interfaces] add management address 2400:da00:c0c3:2a1:72f8:e7ff:fe50:7a
2019-08-09T21:12:20 [ DBG/interfaces] ask ethtool for the appropriate MAC/PHY for eth0
2019-08-09T21:12:20 [ DBG/interfaces] got ethtool results for eth0 with GSET
2019-08-09T21:12:20 [ DBG/localchassis] cleanup all ports
2019-08-09T21:12:20 [ DBG/alloc] cleanup remote port on eth0
2019-08-09T21:12:20 [ DBG/event] schedule next cleanup
2019-08-09T21:12:20 [ DBG/event] next cleanup in 120 seconds
2019-08-09T21:12:20 [ DBG/localchassis] cleanup all chassis
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_port
2019-08-09T21:12:20 [ DBG/marshal] start serialization of fixed string
2019-08-09T21:12:20 [ DBG/marshal] start serialization of null string
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:20 [ DBG/localchassis] no change detected for port eth0
2019-08-09T21:12:20 [ DBG/loop] update information for local chassis
2019-08-09T21:12:20 [ DBG/localchassis] update information for local chassis
2019-08-09T21:12:20 [ DBG/privsep] received command 2
2019-08-09T21:12:20 [ DBG/localchassis] advertise system version
2019-08-09T21:12:20 [ DBG/privsep] received command 3
2019-08-09T21:12:20 [ DBG/control] accept a new connection
2019-08-09T21:12:20 [ DBG/event] new client accepted
2019-08-09T21:12:20 [ DBG/event] trigger sending PDU for port eth0
2019-08-09T21:12:20 [ DBG/control] receive data on Unix socket
2019-08-09T21:12:20 [ DBG/rpc] handle client request
2019-08-09T21:12:20 [ DBG/rpc] client requested configuration
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_config
2019-08-09T21:12:20 [ DBG/marshal] start serialization of null string
2019-08-09T21:12:20 [ DBG/control] receive a message through control socket
2019-08-09T21:12:20 [ DBG/control] receive a message through control socket
2019-08-09T21:12:20 [ DBG/control] receive a message through control socket
2019-08-09T21:12:20 [ DBG/control] receive a message through control socket
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of lldpd_config
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of null string
2019-08-09T21:12:20 [ DBG/control] send a message through control socket
2019-08-09T21:12:20 [ DBG/marshal] start serialization of lldpd_config
2019-08-09T21:12:20 [ DBG/marshal] start serialization of null string
2019-08-09T21:12:20 [ DBG/control] receive data on Unix socket
2019-08-09T21:12:20 [ DBG/rpc] handle client request
2019-08-09T21:12:20 [ DBG/rpc] client request a change in configuration
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of lldpd_config
2019-08-09T21:12:20 [ DBG/marshal] start unserialization of null string
2019-08-09T21:12:20 [ DBG/rpc] client asked to resume lldpd
2019-08-09T21:12:20 [ DBG/alloc] general configuration cleanup
2019-08-09T21:12:20 [ DBG/event] trigger sending PDU for port eth0
2019-08-09T21:12:20 [ DBG/send] send PDU on eth0
2019-08-09T21:12:20 [ DBG/send] fallback to protocol LLDP for eth0
2019-08-09T21:12:20 [ DBG/lldp] send LLDP PDU to eth0
2019-08-09T21:12:20 [ DBG/interfaces] send PDU to ethernet device eth0 (fd=13)
2019-08-09T21:12:20 [ DBG/control] receive a message through control socket
2019-08-09T21:12:20 [ DBG/control] receive a message through control socket
2019-08-09T21:12:20 [INFO/lldpctl] lldpd should resume operations
2019-08-09T21:12:20 [ DBG/alloc] general configuration cleanup
2019-08-09T21:12:20 [ DBG/event] client has been disconnected
2019-08-09T21:12:20 [ DBG/event] received something for eth0
2019-08-09T21:12:20 [ DBG/receive] receive a frame on eth0
2019-08-09T21:12:20 [ DBG/interfaces] receive PDU from ethernet device eth0
2019-08-09T21:12:20 [ DBG/receive] decode received frame on eth0
2019-08-09T21:12:20 [ DBG/decode] decode a received frame on eth0
2019-08-09T21:12:20 [ DBG/decode] guessed protocol is LLDP (from MAC address)
2019-08-09T21:12:20 [ DBG/decode] using decode function for LLDP protocol
2019-08-09T21:12:20 [ DBG/lldp] receive LLDP PDU on eth0
2019-08-09T21:12:20 [ DBG/decode] search for the same MSAP
2019-08-09T21:12:20 [ DBG/decode] MSAP is unknown, search for the chassis
2019-08-09T21:12:20 [ DBG/decode] unknown chassis, add it to the list
2019-08-09T21:12:20 [ DBG/decode] 2 different systems are known
2019-08-09T21:12:20 [ DBG/decode] 1 neighbors for eth0
2019-08-09T21:12:20 [ DBG/decode] send notifications for changes on eth0
2019-08-09T21:12:20 [ DBG/control] notify clients of neighbor changes
2019-08-09T21:12:20 [ DBG/smartfilter] apply smart filter results on all ports
2019-08-09T21:12:20 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:20 [ DBG/smartfilter] eth0: in filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:20 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:20 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:20 [ DBG/smartfilter] eth0: out filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:20 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:20 [ DBG/event] schedule next cleanup
2019-08-09T21:12:20 [ DBG/event] next cleanup in 120 seconds
2019-08-09T21:12:21 [ DBG/event] received something for eth0
2019-08-09T21:12:21 [ DBG/receive] receive a frame on eth0
2019-08-09T21:12:21 [ DBG/interfaces] receive PDU from ethernet device eth0
2019-08-09T21:12:21 [ DBG/receive] decode received frame on eth0
2019-08-09T21:12:21 [ DBG/decode] decode a received frame on eth0
2019-08-09T21:12:21 [ DBG/decode] duplicate frame, no need to decode
2019-08-09T21:12:21 [ DBG/smartfilter] apply smart filter results on all ports
2019-08-09T21:12:21 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:21 [ DBG/smartfilter] eth0: in filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:21 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:21 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:21 [ DBG/smartfilter] eth0: out filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:21 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:21 [ DBG/event] schedule next cleanup
2019-08-09T21:12:21 [ DBG/event] next cleanup in 120 seconds
2019-08-09T21:12:22 [ DBG/event] received something for eth0
2019-08-09T21:12:22 [ DBG/receive] receive a frame on eth0
2019-08-09T21:12:22 [ DBG/interfaces] receive PDU from ethernet device eth0
2019-08-09T21:12:22 [ DBG/receive] decode received frame on eth0
2019-08-09T21:12:22 [ DBG/decode] decode a received frame on eth0
2019-08-09T21:12:22 [ DBG/decode] duplicate frame, no need to decode
2019-08-09T21:12:22 [ DBG/smartfilter] apply smart filter results on all ports
2019-08-09T21:12:22 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:22 [ DBG/smartfilter] eth0: in filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:22 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:22 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:22 [ DBG/smartfilter] eth0: out filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:22 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:22 [ DBG/event] schedule next cleanup
2019-08-09T21:12:22 [ DBG/event] next cleanup in 120 seconds
2019-08-09T21:12:22 [ DBG/netlink] received address information
2019-08-09T21:12:22 [ DBG/netlink] unhandled address attribute type 6 for iface 2
2019-08-09T21:12:22 [ DBG/netlink] updated address 2400:da00:c0c3:2a1:72f8:e7ff:fe50:7a%2
2019-08-09T21:12:22 [ DBG/event] received notification change, schedule an update of all interfaces in one second
2019-08-09T21:12:23 [ DBG/event] triggering update of all interfaces
2019-08-09T21:12:23 [ DBG/localchassis] update information for local ports
2019-08-09T21:12:23 [ DBG/interfaces] eth0 is a physical interface
2019-08-09T21:12:23 [ DBG/interfaces] eth0 is an acceptable ethernet device
2019-08-09T21:12:23 [ DBG/interfaces] use MAC address for eth0
2019-08-09T21:12:23 [ DBG/interfaces] using ifname in description for eth0
2019-08-09T21:12:23 [ DBG/alloc] cleanup management addresses for chassis localhost
2019-08-09T21:12:23 [ DBG/alloc] allocate a new management address (family: 1)
2019-08-09T21:12:23 [ DBG/interfaces] add management address 172.20.84.122
2019-08-09T21:12:23 [ DBG/alloc] allocate a new management address (family: 2)
2019-08-09T21:12:23 [ DBG/interfaces] add management address 2400:da00:c0c3:2a1:72f8:e7ff:fe50:7a
2019-08-09T21:12:23 [ DBG/interfaces] ask ethtool for the appropriate MAC/PHY for eth0
2019-08-09T21:12:23 [ DBG/interfaces] got ethtool results for eth0 with GSET
2019-08-09T21:12:23 [ DBG/localchassis] cleanup all ports
2019-08-09T21:12:23 [ DBG/alloc] cleanup remote port on eth0
2019-08-09T21:12:23 [ DBG/event] schedule next cleanup
2019-08-09T21:12:23 [ DBG/event] next cleanup in 119 seconds
2019-08-09T21:12:23 [ DBG/localchassis] cleanup all chassis
2019-08-09T21:12:23 [ DBG/marshal] start serialization of lldpd_port
2019-08-09T21:12:23 [ DBG/marshal] start serialization of fixed string
2019-08-09T21:12:23 [ DBG/marshal] start serialization of null string
2019-08-09T21:12:23 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:23 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:23 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:12:23 [ DBG/localchassis] no change detected for port eth0
2019-08-09T21:12:50 [ DBG/event] trigger sending PDU for port eth0
2019-08-09T21:12:50 [ DBG/send] send PDU on eth0
2019-08-09T21:12:50 [ DBG/send] send PDU on eth0 with protocol LLDP
2019-08-09T21:12:50 [ DBG/lldp] send LLDP PDU to eth0
2019-08-09T21:12:50 [ DBG/interfaces] send PDU to ethernet device eth0 (fd=13)
2019-08-09T21:12:52 [ DBG/event] received something for eth0
2019-08-09T21:12:52 [ DBG/receive] receive a frame on eth0
2019-08-09T21:12:52 [ DBG/interfaces] receive PDU from ethernet device eth0
2019-08-09T21:12:52 [ DBG/receive] decode received frame on eth0
2019-08-09T21:12:52 [ DBG/decode] decode a received frame on eth0
2019-08-09T21:12:52 [ DBG/decode] duplicate frame, no need to decode
2019-08-09T21:12:52 [ DBG/smartfilter] apply smart filter results on all ports
2019-08-09T21:12:52 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:52 [ DBG/smartfilter] eth0: in filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:52 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:52 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:12:52 [ DBG/smartfilter] eth0: out filter: 1 visible neighbors (out of 1)
2019-08-09T21:12:52 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:12:52 [ DBG/event] schedule next cleanup
2019-08-09T21:12:52 [ DBG/event] next cleanup in 120 seconds
2019-08-09T21:13:20 [ DBG/event] trigger sending PDU for port eth0
2019-08-09T21:13:20 [ DBG/send] send PDU on eth0
2019-08-09T21:13:20 [ DBG/send] send PDU on eth0 with protocol LLDP
2019-08-09T21:13:20 [ DBG/lldp] send LLDP PDU to eth0
2019-08-09T21:13:20 [ DBG/interfaces] send PDU to ethernet device eth0 (fd=13)
2019-08-09T21:13:22 [ DBG/event] received something for eth0
2019-08-09T21:13:22 [ DBG/receive] receive a frame on eth0
2019-08-09T21:13:22 [ DBG/interfaces] receive PDU from ethernet device eth0
2019-08-09T21:13:22 [ DBG/receive] decode received frame on eth0
2019-08-09T21:13:22 [ DBG/decode] decode a received frame on eth0
2019-08-09T21:13:22 [ DBG/decode] duplicate frame, no need to decode
2019-08-09T21:13:22 [ DBG/smartfilter] apply smart filter results on all ports
2019-08-09T21:13:22 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:13:22 [ DBG/smartfilter] eth0: in filter: 1 visible neighbors (out of 1)
2019-08-09T21:13:22 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:13:22 [ DBG/smartfilter] apply smart filter for port eth0
2019-08-09T21:13:22 [ DBG/smartfilter] eth0: out filter: 1 visible neighbors (out of 1)
2019-08-09T21:13:22 [ DBG/smartfilter] eth0: protocols: LLDP
2019-08-09T21:13:22 [ DBG/event] schedule next cleanup
2019-08-09T21:13:22 [ DBG/event] next cleanup in 120 seconds
2019-08-09T21:13:50 [ DBG/event] trigger sending PDU for port eth0

2.Then follow your orders, execution command returns immediately without any information being output.

1|root@rk3188:/ # lldpctl -d -f keyvalue show neighbors details | grep policy
1|root@rk3188:/ #

but lldpd output the following information

2019-08-09T21:32:11 [ DBG/control] accept a new connection
2019-08-09T21:32:11 [ DBG/event] new client accepted
2019-08-09T21:32:11 [ DBG/control] receive data on Unix socket
2019-08-09T21:32:11 [ DBG/rpc] handle client request
2019-08-09T21:32:11 [ DBG/rpc] client request the list of interfaces
2019-08-09T21:32:11 [ DBG/marshal] start serialization of lldpd_interface_list
2019-08-09T21:32:11 [ DBG/marshal] start serialization of lldpd_interface
2019-08-09T21:32:11 [ DBG/marshal] start serialization of null string
2019-08-09T21:32:11 [ DBG/event] client has been disconnected
2019-08-09T21:32:20 [ DBG/loop] start new loop
2019-08-09T21:32:20 [ DBG/loop] update information for local ports
2019-08-09T21:32:20 [ DBG/localchassis] update information for local ports
2019-08-09T21:32:20 [ DBG/interfaces] eth0 is a physical interface
2019-08-09T21:32:20 [ DBG/interfaces] eth0 is an acceptable ethernet device
2019-08-09T21:32:20 [ DBG/interfaces] use MAC address for eth0
2019-08-09T21:32:20 [ DBG/interfaces] using ifname in description for eth0
2019-08-09T21:32:20 [ DBG/alloc] cleanup management addresses for chassis localhost
2019-08-09T21:32:20 [ DBG/alloc] allocate a new management address (family: 1)
2019-08-09T21:32:20 [ DBG/interfaces] add management address 172.20.84.122
2019-08-09T21:32:20 [ DBG/alloc] allocate a new management address (family: 2)
2019-08-09T21:32:20 [ DBG/interfaces] add management address 2400:da00:c0c3:2a1:72f8:e7ff:fe50:7a
2019-08-09T21:32:20 [ DBG/interfaces] ask ethtool for the appropriate MAC/PHY for eth0
2019-08-09T21:32:20 [ DBG/interfaces] got ethtool results for eth0 with GSET
2019-08-09T21:32:20 [ DBG/localchassis] cleanup all ports
2019-08-09T21:32:20 [ DBG/alloc] cleanup remote port on eth0
2019-08-09T21:32:20 [ DBG/event] schedule next cleanup
2019-08-09T21:32:20 [ DBG/event] next cleanup in 92 seconds
2019-08-09T21:32:20 [ DBG/localchassis] cleanup all chassis
2019-08-09T21:32:20 [ DBG/marshal] start serialization of lldpd_port
2019-08-09T21:32:20 [ DBG/marshal] start serialization of fixed string
2019-08-09T21:32:20 [ DBG/marshal] start serialization of null string
2019-08-09T21:32:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:32:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:32:20 [ DBG/marshal] start serialization of lldpd_med_loc
2019-08-09T21:32:20 [ DBG/localchassis] no change detected for port eth0
2019-08-09T21:32:20 [ DBG/loop] update information for local chassis
2019-08-09T21:32:20 [ DBG/localchassis] update information for local chassis
2019-08-09T21:32:20 [ DBG/privsep] received command 2
2019-08-09T21:32:20 [ DBG/localchassis] advertise system version
2019-08-09T21:32:20 [ DBG/privsep] received command 3
2019-08-09T21:32:21 [ DBG/event] trigger sending PDU for port eth0

In addition, the lldpd configuration information is as follows

root@rk3188:/ # lldpcli show configuration

Global configuration:
Configuration:
Transmit delay: 30
Transmit hold: 4
Maximum number of neighbors: 32
Receive mode: no
Pattern for management addresses: (none)
Interface pattern: (none)
Permanent interface pattern: (none)
Interface pattern for chassis ID: (none)
Override chassis ID with: (none)
Override description with: (none)
Override platform with: Linux
Override system name with: (none)
Advertise version: yes
Update interface descriptions: no
Promiscuous mode on managed interfaces: no
Disable LLDP-MED inventory: no
LLDP-MED fast start mechanism: yes
LLDP-MED fast start interval: 1
Source MAC for LLDP frames on bond slaves: local
Port ID TLV subtype for LLDP frames: unknown
Agent type: unknown

Please give me more detailed instructions, Thanks a lot!

@vincentbernat
Copy link
Member

Did you use conf med policy application voice vlan 4088 priority voice on the neighbor?

@weilixin
Copy link
Author

Did you use conf med policy application voice vlan 4088 priority voice on the neighbor?

yes, I have tried this command before

@weilixin
Copy link
Author

Actually, I don't understand a lot about the implementation of voice vlan. Can you introduce the process?
(1)I don't know exactly how lldp gets TAG ID yet.
(2)Voice vlan IP address how to get?
(3)How does the device configure outgoing packets to carry TAG ids?

Above, hope to get your help, thank you very much!

@vincentbernat
Copy link
Member

LLDP is just providing a piece of information. You can advertise the VLAN number to a neighbor with the configure med policy command and, from the neighbor, you can retrieve it with show neigh details. It seems you are expecting something more, but there is nothing more.

@weilixin
Copy link
Author

weilixin commented Aug 12, 2019

image

show neigh details is as above, but there is no voice vlan information.

image

Thank you for your help all the time!

@vincentbernat
Copy link
Member

What you are highlighting is a regular VLAN (a TLV sent as part of 802.1AB, Dot1). It seems your remote equipment is not sending the LLDP-MED policy you are expecting. Is it configured to?

@weilixin
Copy link
Author

Hello, Vincent

I have some new discoveries, by comparing network packet capture data with SNOM devices (SNOM is a device that can send voice data through voice VLAN), we found that there is no media part in the data received by our rk3188 devices. The capture file has been uploaded, I don't know what causes the lack of information. please take a look at it. Thank you.

RK3188 capture info:
rk3188_tcpdump.pcap
image

SNOM capture info:
snom_trace.pcap
image
image

@vincentbernat
Copy link
Member

Did you try with different values for -M? The other side may choose to send additional TLVs depending on this value.

@weilixin
Copy link
Author

According to commands help doc:

-M class Enable emission of LLDP-MED frame. 'class' should be one of:
1 Generic Endpoint (Class I)
2 Media Endpoint (Class II)
3 Communication Device Endpoints (Class III)
4 Network Connectivity Device

I've tried the following commands, received TLVs from the other side remains unchanged.

lldpd -ddddd -M 2
or
lldpd -ddddd -M 3

[lldpcli] # configure med policy application voice

Do I understand your meaning correctly? Is it used in this way?

thanks a lot!

@vincentbernat
Copy link
Member

If you can get a capture of what the SNOM device is sending to get back the LLDP-MED TLV, we could compare with what lldpd is sending.

@weilixin
Copy link
Author

OK, that's a good idea.
I looked at the packet capture file carefully, as if my device (172.20.84.122) hadn't sent lldp-related data to the switch.

image

@vincentbernat
Copy link
Member

And if lldpd is not running, do you receive the appropriate TLV? You may have to link down/link up to let the other side knows there is a new device.

@weilixin
Copy link
Author

(1)If lldpd isn't started, the device doesn't receive lldp data sent by the switch.
(2)switch eth0 up/down, TLVs received remain unchanged.
(3)My device rk3188 didn't send LLDP request, how to confirm this problem?

@vincentbernat
Copy link
Member

If there is no specific configuration for the port where the SNOM device is, I don't have a clue on why it would get a LLDP frame with LLDP-MED TLVs.

@weilixin
Copy link
Author

snom_all.pcap.LOG

Hello, Vincent

I have captured all the data packets between the SNOM device and the switch, please help me to look at some of the existing problems.

First, the TAG ID we need to get from the switch is 1085, and the IP address of voice VLAN is 172.20.85.10.

image

(1) The first lldp packet (No.547) comes from the switch, and there is no LLDP-MED TLVs information in it.
(2) Snom's first lldp broadcast packet (No.1270)already has the target TAG ID 1085. I can't find out how this 1085 was obtained.
image

(3) Snom's second lldp broadcast packet also carries the IP address (172.20.85.10.) of vlan. I don't know how to get this IP address.
image

@vincentbernat
Copy link
Member

From your capture, I don't see anything related to LLDP-MED from the H3C switch. To be honest, I don't even know who should send the network policy TLV. From your capture, it seems it's the phone that should send it. I don't know either where the 1085 VLAN comes from. Maybe it's a configuration parameter from the phone? Or maybe it did remember the value from a previous boot? As for the IP address, the device gets it from a DHCP request on VLAN 1085 (frame 1302).

@weilixin
Copy link
Author

weilixin commented Aug 19, 2019

Hello, Vincent
We let the device revert to factory Settings to make sure the cache is cleared, and then re-capture the package.
I found that snom's first package had LLDP-MED TVLs information that met the TR-41 Committee's requirements, but there was no 1085 switch configuration in it.
image

For the time being, we don't consider how 1085 was acquired. Would you please help us to see how to carry lldp-med information like snom's Frame No.316?

https://wiki.wireshark.org/LinkLayerDiscoveryProtocol
image

Thanks a lot!

@weilixin
Copy link
Author

weilixin commented Aug 19, 2019

Please ignore the above. I have known how to insert lldp-med TVLs information.

lldpcli configure ports eth0 med policy application voice vlan 1085 priority voice dscp 46

The following information is carried by the RK3188 packet:
image

In addition, compare the snom packet and how to configure some other missing information, such as: Extended Power-via-MDI, Hardware Revision, Firmware Revision, Serial Number, Manufacturer Name, Model Name, Asset ID.
image

@vincentbernat
Copy link
Member

To set tagged to yes, you have to add tagged to your command-line. For inventory, lldpd queries DMI which is usually not present on anything else than x86. We could query the device tree if I knew where the information was.

@weilixin
Copy link
Author

Hello, Vincent:

Please help me, how to configuration to disable MDI-PSE. Thanks very much!
image

change the values capable to not capable.

@vincentbernat
Copy link
Member

It's currently not possible. You can patch the source. Search for LLDP_MED_CAP_MDI_PSE.

@weilixin
Copy link
Author

It's currently not possible. You can patch the source. Search for LLDP_MED_CAP_MDI_PSE.

image
patch source like this, thanks!

image
After starting LLDPD, will the Voice VLAN ID be resolved and there is a way to get it? thanks!

@vincentbernat
Copy link
Member

You get it with lldpcli show neighbors details.

@weilixin
Copy link
Author

You get it with lldpcli show neighbors details.

great!Could you please tell me the exact source location of the corresponding code executed by the above command? thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants