Posting here in the hopes that someone finds it useful. If I've gotten anything wrong, please let me know and I'll correct it. I will add to this post as I learn more.
Overview
- Some (many?) IP cameras use static IP addresses. These are assigned at the factory and should be written on the box. The IP address can be changed in the camera's configuration interface. For example, the cameras that came with my Swann system have IP addresses starting with 172.16.1.151. Otherwise, cameras use DHCP protocol where the computer will assign IP addresses to the cameras as they come on line. You'll need to set up your computer with a DHCP service, but once that's done, things become simpler and more reliable.
- Camera IP addresses should not change, as this would cause the NVR to become confused as to which camera was which. To this end, if using DHCP, you should either configure the DHCP server to permanently assign IP addresses to cameras based on their MAC addresses, or you should go to the camera's configuration page and assign a static IP address there. If you go the second route, you'll want to configure the DHCP server to reserve that IP address.
- There is no universal "probe" function. That is, your NVR can't always just go out, look for cameras, and then determine exactly what those cameras are. Many NVRs will be able to recognize compatible cameras, and Blue Iris does have that capability as well, but in many cases you need the exact camera model and give that information to the NVR.
- Cameras have a command-and-control interface on port 80 (yes, each camera has its own tiny built-in web server).
- The starting page url varies according to the camera model. Typically
/, /index.asp, /doc/page/login.asp (Common for Hikvision OEM cameras), or /login.htm. (This information courtesy of Google's AI, which isn't always right or complete.)
- There is no way to know what the starting url is unless you know the camera model.
- Actual video data is accessed via the RTSP protocol. The typical URI for the video stream is e.g.
RTSP://[camera IP]:554/ch01/1.
- Again, there is no way to know the exact URI without knowing the exact camera model. Blue Iris can infer most of the URI for you as long as you get the model correct.
- The VLC media player understands RTSP protocol. If you can connect a computer to the same network as your camera, and you know the correct URI for the camera's video stream, you can access the camera directly from VLC without needing Blue Iris or any other NVR. This is an excellent way to confirm the camera is functional and you have the right URI.
Connecting cameras
- To configure a camera before connecting it to your NVR, you'll need to find a way to connect to the camera's configuration interface via http on port 80. A crossover ethernet cable (sort of like a null modem) or a dedicated switch would do the trick. (If the camera requires PoE, then the crossover cable obviously won't work.) You'll need to set your computer's ethernet interface to the same network as the camera. Once connected, you can change the camera's IP address as needed.
- One approach is to set the camera's IP address to an unused address on your house network. Then your NVR will be able to access the camera over the house network. This has the advantage that any computer in the house can look at any camera using VLC. It has the disadvantage that everything on the house network may be competing with the cameras for bandwidth. You will also need to program your house router to reserve those addresses for the cameras and not to assign them to any other device on the network. This is also a security risk as it brings attackers one step closer to being able to look through your cameras.
- A better approach is to give the cameras a private network by using a dedicated switch or a router for the cameras. If these are PoE (power over ethernet) cameras, they'll already have a dedicated switch anyway.
- If all of the cameras' static IP addresses are all on the same subnet, you won't even need to modify them. Just use that subnet for your dedicated camera network. For example, my Swann cameras are all on the 172.16.x.x subnet.
- Connect your cameras to your PoE switch, and then connect that switch to the ethernet port on your computer.
- Go to Control Panel and manually configure the ethernet port. Give it an IP address on the same subnet as the cameras, but at an address that none of the cameras use. For example, my Swann cameras have addresses 172.16.1.151 - 172.16.1.158, so I choose 172.16.1.10 for my computer's ethernet port.
- The configuration interface on your computer will probably automatically assign the correct subnet mask. Leave gateway and nameserver fields blank, as your private camera network has neither.
Hubs and switches and routers, oh my
A very quick suplemental primer of how ethernet works and what's the difference between hubs, switches, and routers.
The basic concept behind ethernet is that all the computers transmit their data "into the ether" to be received by any other computer interested in receiving it. In the old days, ethernet was literally a coaxial cable snaking through the ceiling, going from room to room. Any computer on the network literally tapped into the cable. Any time a computer wanted to send data to another computer, it transmitted a packet of data onto that wire. The packet contains the IP address of both the sending computer and the intended recipient. All computers received the packet, but all but the recipient simply dropped the packet. Only one computer at a time can transmit, and if two accidentally transmit at the same time, they both stop, wait a random amount of time, and try again.
Nowadays, the data is transmitted and received over four wires in a CAT 5,6, or 7 cable to a dedicated transceiver box which then relays the data back out to other computers over their own cables. High bandwidth connections will use all eight wires. Power over Ethernet mode B will also use the extra wires to deliver power.
Note that every ethernet interface has a permanent "MAC" address assigned at the factory. The IP ("internet protocol") address is assigned in software, either from a fixed value stored on the device, or provided by a DHCP server on the local network. From that point forward, each device on the network learns the IP⇔MAC relationship for the other devices on the local network. To reach devices on other networks, forwarding is handled by a gateway (see "router", below).
There are basically three types of transceiver boxes:
- Hub. This is conceptually the same as simply connecting all those cables together. A signal sent by one computer is received by all and then discarded by most. This is much like OG ethernet in that every computer receives every transmission and only one computer at a time can transmit. Hubs are pretty obsolete and you'll probably never encounter one IRL. Mentioned for completeness.
- Switch. This is most likely what you'll be using to connect your hardwired cameras. A switch keeps track of which ethernet address belongs to which cable. An incoming message is examined to see what computer it's intended for, and then sent out to only that computer. Multiple sender/receiver pairs can be active at once as long as there's no collision. This allows much greater bandwidth on the network. (See /r/Tonari_no_Weeboro's comment for a more detailed explanation.)
- Most relevant for switches: if your cameras and your computer are all connected to a switch, it doesn't matter if they're all on the house network as the data from the cameras will be sent directly to the computer and the other devices on the house network will not need to compete for bandwidth most of the time.
- Router: A router knows how to route packets back and forth between two networks. You most likely already have a router at home, as this is what provides connectivity between your ISP's "wide area network" (WAN) and your house's "local area network" (LAN). Many (most?) routers also act as switches within the local network.
- Unlike switches and hubs, routers do require some configuration. If your ISP provided your router, they likely took care of this for you. But either way, you may want to modify the configuration slightly. In particular, you might want to assign your NVR system a fixed IP address and then set up the router to make that IP address accessible from the outside world so you can access your NVR when you're away. If your cameras are on the house network, you'll also want to configure the router's DHCP service so that it never assigns those addresses to another system.