Replies: 2 comments
-
devices that use LLDP update/advertise at various intervals. Sometimes I have to wait 30s for some switches/routers. I'm thinking you need to wait longer than 1 second? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't believe this is the problem. When I use the approach presented here in the documentation with separate docker container for lldpd I always get the correct result. Or when I log into the shell of a docker container, start the lldpd and immediately use lldpcli I always get the correct results immediately. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an C++ application that internally needs to fetch the lldp neighbors. I use lldpcli as as system command call via popen. Now the whole application runs dockerized and I do not manage to get it working. I understand that after starting the container I first need to start the daemon lldpd. But then lldpcli does not give reliable output.
A minimal sample Dockerfile:
Now I try
which gives no output.
Adding some time after lldpd helps:
I see the docker network environment.
Using the hosts network only sometimes shows a result, most of the time nothing:
Using the full options from the documentation does not change anything:
Very seldom I see the correct result (a certain switch I'm searching for) but mostly nothing.
If I just start a shell in the container and run lldpd there, the following calls to lldpcli always return the correct results, as does the approach with the separate Docker container for lldpd from the documentation.
But I still need to prepare my applications docker container such that it has lldpd running and later calls to lldpcli from my application deliver reliable results.
Any ideas what I could try?
Beta Was this translation helpful? Give feedback.
All reactions