Modify

Opened 4 years ago

Last modified 3 years ago

#17274 new defect

lldpd not work

Reported by: keyman0413@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: lldpd Cc:

Description

after i install lldpd , and config :
config lldpd config

option enable_cdp 1
option enable_fdp 1
option enable_sonmp 1
option enable_edp 1


option lldp_class 4
option lldp_location "2:FR:6:Commercial Rd:3:Roseville:19:4"

# if empty, the distribution description is sent
option lldp_description "OpenWrt System"

# interfaces to listen on
list interface "wan"
list interface "loopback"
list interface "lan"
list interface "eth0"
list interface "eth1"
list interface "eth0.1"
list interface "eth0.2"
list interface "br-lan"
list interface "br-wan"

<<<<<<<<<i list all the interface to try it,still not work.

from h3c switch cli, looks the openwrt lldpd not work:

#dis lldp status interface e1/0/25
Port 25 [Ethernet1/0/25]:
Port status of LLDP : Enable
Admin status : Tx_Rx
Trap flag : No
Polling interval : 0s
Number of neighbors: 0
Number of MED neighbors : 0
Number of CDP neighbors : 0
Number of sent optional TLV : 23
Number of received unknown TLV : 0

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by anonymous

I think I found what the problem is. The current way of running lldpd (created by the lldpd init script) is more or less:

lldpd -I loop -I br-lan -M 4

This result in
2014-09-30T14:25:29 [ DBG/interfaces] driver for eth0 is ag71xx
2014-09-30T14:25:29 [ DBG/interfaces] driver for eth1 is ag71xx
2014-09-30T14:25:29 [ DBG/interfaces] driver for br-lan is bridge
2014-09-30T14:25:29 [ DBG/interfaces] driver for wlan0 is ath9k
2014-09-30T14:25:29 [ DBG/interfaces] wlan0 is wireless
2014-09-30T14:25:29 [ DBG/interfaces] interface br-lan is a bridge
2014-09-30T14:25:29 [ DBG/interfaces] eth0 is a physical interface
2014-09-30T14:25:29 [ DBG/interfaces] eth1 is a physical interface
2014-09-30T14:25:29 [ DBG/interfaces] ifb0 is a physical interface
2014-09-30T14:25:29 [ DBG/interfaces] wlan0 is a physical interface
2014-09-30T14:25:29 [ DBG/interfaces] blacklist eth0
2014-09-30T14:25:29 [ DBG/interfaces] blacklist eth1
2014-09-30T14:25:29 [ DBG/interfaces] blacklist ifb0
2014-09-30T14:25:29 [ DBG/interfaces] blacklist wlan0

If I run instead:
lldpd -I eth0,wlan0

the result is:

2014-09-30T14:27:08 [ DBG/interfaces] driver for eth0 is ag71xx
2014-09-30T14:27:08 [ DBG/interfaces] driver for eth1 is ag71xx
2014-09-30T14:27:08 [ DBG/interfaces] driver for br-lan is bridge
2014-09-30T14:27:08 [ DBG/interfaces] driver for wlan0 is ath9k
2014-09-30T14:27:08 [ DBG/interfaces] wlan0 is wireless
2014-09-30T14:27:08 [ DBG/interfaces] interface br-lan is a bridge
2014-09-30T14:27:08 [ DBG/interfaces] eth0 is a physical interface
2014-09-30T14:27:08 [ DBG/interfaces] eth1 is a physical interface
2014-09-30T14:27:08 [ DBG/interfaces] ifb0 is a physical interface
2014-09-30T14:27:08 [ DBG/interfaces] wlan0 is a physical interface
2014-09-30T14:27:08 [ DBG/interfaces] blacklist eth1
2014-09-30T14:27:08 [ DBG/interfaces] blacklist ifb0
2014-09-30T14:27:08 [ DBG/interfaces] blacklist br-lan
2014-09-30T14:27:08 [ DBG/interfaces] eth0 is an acceptable ethernet device
2014-09-30T14:27:08 [ DBG/interfaces] use ifname and MAC address for eth0
2014-09-30T14:27:08 [ DBG/interfaces] wlan0 is an acceptable ethernet device
2014-09-30T14:27:08 [ DBG/interfaces] use ifname and MAC address for wlan0
2014-09-30T14:27:08 [ DBG/interfaces] add management address 217.133.60.98
2014-09-30T14:27:08 [ DBG/interfaces] add management address 2001:1418:192::1
2014-09-30T14:27:08 [ DBG/interfaces] ask ethtool for the appropriate MAC/PHY for eth0
2014-09-30T14:27:08 [ DBG/interfaces] ask ethtool for the appropriate MAC/PHY for wlan0
2014-09-30T14:27:08 [ DBG/interfaces] send PDU to ethernet device eth0 (fd=9)
2014-09-30T14:27:08 [ DBG/interfaces] send PDU to ethernet device wlan0 (fd=10)
2014-09-30T16:27:08 [INFO/lldpctl] lldpd should resume operations
2014-09-30T14:27:08 [ DBG/interfaces] receive PDU from ethernet device eth0
2014-09-30T14:27:09 [ DBG/interfaces] receive PDU from ethernet device eth0
2014-09-30T14:27:10 [ DBG/interfaces] receive PDU from ethernet device eth0

So (I may be wrong):
1) br-lan is discarded because it's a bridge
2) adding multiple interfaces must be done by a single -I and multiple interfaces separated by comma. A new -I will reset the list.

The issue must be solved in the rc script, I think, here:

for iface in $ifaces; do

local ifname=""

if network_get_device ifname "$iface"
[ -e "/sys/class/net/$iface" ]; then

append args "-I ${ifname:-$iface}"

fi

done

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.