POE port from NVR switch ports to another switch - causing up down log entries.
-
Ok so this has zero to do with pfsense, just something that was bugging me this morning that I finally noticed just because I was logged into a switch in my av cabinet, and then looking at its log.
But figured I would mention it because there prob some fellow pfsense users that have poe cameras and a nvr and might be doing what I am doing to gain direct access to the cameras without going through the nvr.
So a few months back I finally got around to getting some cameras and a nvr.. I went with a lorex system, is this system a good system or a bad system, is there better - most likely. But this was a system that was budget I liked, and the cameras were listed as working in -22 degrees which I also wanted living where you get some snow and cold in the winter, etc..
All working good, I put the nvr lan port on a new vlan on my network connected to the sg300-10 switch I have in my av cabinet, plugged the cameras into the nvr poe ports on its back.. Hey look at that working - sweet.
I then noticed the cameras were on their own L2 behind the NVR.. While I could watch the video streams via the NVR, etc.. I wanted direct access to the camera video and gui.. Much easier to just pull up a video substream off the cameras with VLC on my PC, some apps on my TVs can easy add them via simple onvif url pointing at their IP, etc.
Simple enough I just fired up another vlan on pfsense, put a leg of into this L2 behind the nvr, some source natting and hey I could access the cameras directly.. Working great..
This morning I was looking at the switch in the av cab config to see if I could move some ports around as cleaning up the wiring etc. Noticed I was getting a ton of these
04-Oct-2024 08:21:18 :%LINK-I-Up: gi1 04-Oct-2024 08:21:16 :%LINK-W-Down: gi1 04-Oct-2024 08:19:13 :%LINK-I-Up: gi1 04-Oct-2024 08:19:11 :%LINK-W-Down: gi1 04-Oct-2024 08:17:09 :%LINK-I-Up: gi1 04-Oct-2024 08:17:06 :%LINK-W-Down: gi1
I tried changing the cable, switch ports both on the switch and the nvr poe port.. Same thing.. But I really wasn't noticing any issues with accessing the cameras - didn't seem to loose video while watching.. Got a constant ping going and was noticing a packet lost here or there.. But was working - other than the annoying logs every few minutes.
Then it dawned on me - oh those are poe ports on the back of the NVR, and its plugged into a non poe switch, which really shouldn't have poe coming into it.. I mean it shouldn't hurt it or anything, but I wondered if the nvr doing something with poe whatever was causing this..
Ok I will just put a dumb switch between the nvr port and my switch port, now my switch shouldn't see any poe stuff and port shouldn't go up down.. Maybe the dumb switch nvr side might go up down, but like I said the connection was working fine for its use it was the annoying logs that was bugging me. And the sg300 doesn't seem to have a way to just turn those off from logging for single port. Didn't really want to disable all logging of up down, etc.
But I had picked up a flex mini from unifi quite some time ago, played with it a bit and then it ended up on my shelf since really didn't have any use for it. Its really tiny, and it can be powered by poe.. What do you know the poe that nvr puts out, 802.3af will power that little switch.. So cable from the nvr poe port to flex mini poe in port 1.. Then cable from flex mini to my av cab switch.. What do you know.. No more log entries about interface going up down.. And look at that a constant ping of 1500 some pings to one of the cameras 0 packets lost..
So going on 45 minutes now with zero up/down log entries.. Now just need to put in some better length patch cables to pretty it up and all sorted, no more annoying log entries and a more stable connection.
Again nothing at all to do with pfsense, other than having pfsense as my router and vlan capable switches made doing what I did to get access to the cameras pretty simple.
-
@johnpoz Well it shouldn’t be necessary- Poe is power phased and should work like any standard link if the receiving end does not use the standard Ethernet link power to negotiate turning on the “real Poe” power.
So it might as well be link speed auto negotiation causing the problem.My first thought was a network loop detected by the NVR as I’m not quite sure how the pfsense switch actually handles BPDU’s.
Edit: ohh it’s not a pfsense built in switch but a regular switch aptly named very close to the net gate boxes
-
@keyser pfsense is upstream and has no switch ports..
pfsense -- sg300-28 --- sg300-10 -- nvr
The sg300-10 port connected to the poe port on the back of the nvr to put a leg into that L2 was the one going up down.. The actual nvr lan port was fine. But there was no possible way for there to be any sort of loop that is for sure. The sg300-10 was the one logging the up/down.
Yeah the poe didn't dawn on me for a bit.. And I tried turning off auto neg, turning off green ethernet, etc. etc.. tried all kinds of settings.
Is it poe related - no I am not 100% sure on that.. But I know if your going to connect another switch to poe port of an upstream switch, if possible should make sure poe is disabled on that port, etc. But with the nvr there is no way to do anything like that..
What I can say is no longer seeing any packet loss at all - which before there was some, that would go together with a up/down of the port even if very short 2 seconds, etc.. And there are no log entries for up down on that port connected to the nvr poe port with the little mini between the sg300-10 and the NVR poe port.. And the mini is being powered by the poe coming off the nvr port.
edit: so before I was seeing some minor packet loss
Packets: Sent = 386, Received = 383, Lost = 3 (0% loss)
Now after I put the mini between I don't see any
Packets: Sent = 1524, Received = 1524, Lost = 0 (0% loss)
-