Accessing individual cameras connected to a built-in PoE HikVision NVR switch

domelsnake

Young grasshopper
Joined
Aug 28, 2015
Messages
78
Reaction score
1
Hi guys,

There is another way to connect to the cameras connected to built-in PoE switch by connecting one of the PoE interfaces of NVR to the same switch/router as NVR's LAN interface is connected to (please see attached diagram).

Each NVR PoE interfaces is expecting to see a different IP address connected to it.

Interface 1: 192.168.254.2
Interface 2: 192.168.254.3
Interface 3: 192.168.254.4
Interface 4: 192.168.254.5
Interface 5: 192.168.254.6
Interface 6: 192.168.254.7
Interface 7: 192.168.254.8
Interface 8: 192.168.254.9

Depends on which interface is connected to the router this IP address has to be assigned to the PC as a secondary IP address:

Local Area Connection --> Properties --> Internet Protocol Version 4 (TCP/IPv4) --> Advanced --> IP Settings --> Add (subnet mask will have to match subnet mask configured on NVR for built in PoE switch - most likely 255.255.255.0 - /24)


HikVision.png
 

normel

Getting the hang of it
Joined
Dec 1, 2014
Messages
288
Reaction score
22
Thanks. Unfortunately we are not able to connect the camera's from outside the LAN right ?
 

domelsnake

Young grasshopper
Joined
Aug 28, 2015
Messages
78
Reaction score
1
Hi normel,

When you say "from outside the LAN" what exactly do you mean? Internet/DMZ/Another LAN?

Do you have some simple diagram of your network topology to understand?
 

hiky

Getting the hang of it
Joined
Nov 28, 2015
Messages
342
Reaction score
43
Location
Hampshire - South central Uk, right at the bottom
Yeah i would appreciate another look at this please domelsnake

I can access the cameras locally ( On site ) in the manner you describe but i would like to access the cameras directly from off site outside of the cameras local lan...from the internet according to your drawing

I have added a second Ip address on my Pc ( outside of the cameras local lan ) i used the cameras Ip as the additional address on my Pc

but if i type in the cameras Ip address on my Pc i get page not found, i have connected a lan cable from a spare camera Lan port on the NVR to the router

Perhaps i am missing the point as i am not the sharpest Lan expert in the land or perhaps i am typing into my address bar an incorrect url ... my assumption was just the cameras Ip address was needed

i must be missing something here or miss reading due to my lack of knowledge

perhaps the url should be the NVR`s ip addy and then the cameras Ip address ?? lack of knowledge on my part is stopping me at present from going further
 

domelsnake

Young grasshopper
Joined
Aug 28, 2015
Messages
78
Reaction score
1
Hi hiky,

The secondary IP address assigned to you PC has to be exactly the same as expected on the PoE interface where the second connection is made to your LAN (you can log in to your NVR and check which IP is expected on which interface). For example my NVR default PoE subnet was 192.168.254.0/24.

192.168.254.1 is a default gateway configured on NVR and 192.168.254.2-9 are the IPs expected on my 8x physical interfaces of the NVR.

So for example if you have made the second connection to you LAN of interface no 1 of your NVR the IP address assigned to your PC will have to be 192.168.254.2 as this is the IP expected on interface no1.

Try if you can ping default gateway of 192.168.254.1 from your PC (Start-->in search programs and files type "cmd" without "" and hit enter-->in black window type "ping 192.168.254.1" without "" and hit enter).

If you have a reply from your default gateway try to ping individual cameras if not there must be something miss configured.

If you have a reply by pinging individual cameras confirm the web port on which the connection to the cameras is expected.

Is this your home network or perhaps office one?

Do you have a layer 3 switches in your network by any chance?


I would say if you can access the cameras by connecting laptop into your NVR you should be able to connect from your PC using the same interafce and IP by making a second connection from your NVR to the same switch/router as LAN interface of the NVR is connected to.
 

hiky

Getting the hang of it
Joined
Nov 28, 2015
Messages
342
Reaction score
43
Location
Hampshire - South central Uk, right at the bottom
Thanks domelsnake, i have added the secondary physical connection ( 192.168.00.02) fictitious to my Pc as a secondary ip address

I have pinged the ip address ( 192.168.00.2 ) and have 4 packets sent 4 replies no loss, so it would appear i can access the physical ip

however using Firefox if i type the physical connection ip addy ( 192.168.00.2 ) into the address bar i get "unable to connect" ??

however if i type 192.168.00.3-4-5 i get connection timed out so i am must be close

is the url correct ?? 192.168.00.2 is there not another part to the full url to the camera such as 192.168.00.2/login/doc/page ??

ps
both ends on home networks

my NVR and cameras are

NVR 192.168.0.16
sub 255.255...

cameras
cam 1 connected 192.168.###.2
physical connection 192.168.###.3

my apologies for not getting me head round this properly
 
Last edited by a moderator:

Korgoth

Pulling my weight
Joined
Aug 28, 2015
Messages
103
Reaction score
160
Why wont you use "virtual host" function from NVR? This way you can access each camera connected to PoE "switch" from outside, just type IP address of NVR and port 65001, 65002 etc.
For exaple
192.0.0.64:65001 for camera 1
192.0.0.64:65002 for camera 2
192.0.0.64:65003 for camera 3

b.JPGa.JPG
 
Last edited by a moderator:

normel

Getting the hang of it
Joined
Dec 1, 2014
Messages
288
Reaction score
22
If your trying that outside of your lan network.it wont open unless you havr opened the ports 65001 65002 etc..
 

hiky

Getting the hang of it
Joined
Nov 28, 2015
Messages
342
Reaction score
43
Location
Hampshire - South central Uk, right at the bottom
i was just about to type that normel... i will need to go open the ports from the router

for security i do not allow remote access to routers i mess with... i would end up braking something, so a site visit should finally resolve access
 

domelsnake

Young grasshopper
Joined
Aug 28, 2015
Messages
78
Reaction score
1
Hi hiky,

Ping to 192.168.0.2 (not too sure why you keep typing 192.168.00.2) from the PC the ip is assigned to, doesn't prove too much. You just doing a loop - it the same when you ping 127.0.0.1.

Try to ping 192.168.0.1 which I presume is the default gateway for all your cameras connected to PoE switch.

If that doesn't work - and it probably doesn't as you can not ping any of your cameras - there is a problem with connectivity somewhere.

Not too sure how your network is configured.

If you have just a one switch/router/firewall where all the devices are connected to and there is no customized port configuration it just should work.

Can you specify what is your LAN subnet and what is the subnet allocated for your NVR? - don't worry this is private ip addressing not accessible externally and it overlaps with other users.

Not too sure what does this mean:

my NVR and cameras are

NVR 192.168.0.16
sub 255.255...

cameras
cam 1 connected 192.168.###.2
physical connection 192.168.###.3
 

hiky

Getting the hang of it
Joined
Nov 28, 2015
Messages
342
Reaction score
43
Location
Hampshire - South central Uk, right at the bottom
I am not sure what to do now then guys

I have been on site and opened the port in the router for camera1, (TCP/UDP incoming outgoing) with VH enabled via the web interface the hyperlinked address for cam1 is 192.168.0.16:65001

if i use the web interface to access this by simply clicking it i get `unable to connect` reported from firefox

i am trying to access the cameras settings from outside of its Lan from my own Pc off site using the web interface

the cameras Ip address range
192.168.254.2-5

cam1 is 192.168.254.2
NVR is 192.168.0.16
POE Nic is 192.168.254.1
ipv4 default gateway is 192.168.0.1
subnet where my home office or where the NVR is ?? both are 255.255.255.0

For the life of me i cannot seem to access the camera OR get the nvr to send an email and it is definitely set up correctly using a gmail addy, i have tried 2 step password generation and single step low security within googles own settings, i have even tried an outlook account but emails simply refuse to work

Is there something wrong with the latest firmware V3.4.0.150929 ??
 
Last edited by a moderator:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
cam1 is 192.168.254.2
Set cam1 default gateway to 192.168.254.1
It's probably using 192.168.0.1

That's a NATed address - the camera still needs a valid gateway to communicate outside it's net. 192.168.0.16:65001
 

hiky

Getting the hang of it
Joined
Nov 28, 2015
Messages
342
Reaction score
43
Location
Hampshire - South central Uk, right at the bottom
been there today alastair, and the default gateway for the camera was 192.168.0.1, changed it to 192.168.254.1 but still no VH access from remote location outside of the NVr`s Lan ??
 
Last edited by a moderator:

hiky

Getting the hang of it
Joined
Nov 28, 2015
Messages
342
Reaction score
43
Location
Hampshire - South central Uk, right at the bottom
For anyone still interested in accessing your Hik camera which is attached to a POE NVR running the latest firmware

in the end it turned out to be quite simple

enable Virtual host on the NVR using the web ui
go to cameras on the NVR web ui and look at the link for the camera you want to access
note the port number for the camera you want to access :)77777)
from a remote location ie outside of the local NVR lan use your preferred browser and type the external address of the NVR which you use to access the NVR`s web ui and the cameras port at the end
example ( 100.100.100.100:77777 )
tada
 
Joined
Jul 1, 2016
Messages
5
Reaction score
0
Hi guys, is there any way to use the virtual host to connect to the camera using port 8000 as want to access the camera using the VMS 4500 App on a phone/tablet as appose the the web Interface?

I remote access the camera via the app on my phone to playback any motion on our drive but access the NVR (that records continuously) what will record every car driving along the street if ever an incident occurred.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
To access the cameras directly, on any port, via their 192.168.254.x IP address, the following steps are required:

Activate Virtual Host on the NVR.
Change the Mode of the PoE channel in the NVR web GUI to 'Manual' instead of Plug and Play. Leave all other settings as-is. This is to stop the NVR changing the camera settings going forward.
Change the default gateway of the camera to be the IP address of the NVR PoE interface. This is usually 192.168.254.1, the NVR will have set it to the same as the NVR LAN interface default gateway, usually 192.168.1.1
On your LAN gateway, usually your router, add a static route along the lines of :
"For network 192.168.254.0/24 (or subnet mask 255.255.255.0) route all packets via NVR_LAN_interface_IP_address with some metric such as 2".
Check you can access the cameras directly from the LAN on their 192.168.254.x address.
 

montecrypto

IPCT Contributor
Joined
Apr 20, 2016
Messages
104
Reaction score
304
"Activate virtual host" should not be needed. NVR by default routes traffic between the subnet it is connected to and the camera/poe subnet.

Step1: for each camera set NVR POE IP (192.168.254.1) as a default gateway
Step2: on your desktop add a static route for the POE subnet, using this command:
route add -net 192.168.254.0 netmask 255.255.255.0 gw <NVR-IP-ADDRESS>
(that is for Linux. Windows syntax may slightly differ)

update: virtual host is actually needed and must be turned on
 
Last edited by a moderator:

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,963
Reaction score
6,794
Location
Scotland
"Activate virtual host" should not be needed. NVR by default routes traffic between the subnet it is connected to and the camera/poe subnet.
Sorry to disagree - but that's not so. Either in standard Linux, or what's in the NVR.
Check out the value of
/proc/sys/net/ipv4/ip_forward
when there is no virtual host, or if virtual host is not active.
By default in the Linux kernel it is 0
With no virtual host, it needs to be forced, in start.sh for example, like so:
echo 1 > /proc/sys/net/ipv4/ip_forward
 
Top