PanelSimulator Academy

Networking for Security, lesson 1 of 12

What a network is

Cameras, door controllers, intercoms and recorders are all small computers now, and they talk to each other over the building's network. This lesson shows what a network is made of and how one message gets from one device to another. Everything later in the course builds on this picture.

About 13 minutes. No earlier lesson needed.

Watch a message travel

Pick a situation, then play or step through it.

unplugged Camera 192.168.1.10 Doorcontroller 192.168.1.30 Recorder 192.168.1.20 Workstation 192.168.1.40 Switch one light per cable the packet now on the wire

The everyday picture

Think of the internal mail in a large office. Every desk has a number. When you want to send something, you put it in an envelope, write the desk number of the person it is for, add your own desk number so they can reply, and drop it in the tray.

The mail room in the middle does not open the envelope. It reads the number on the front and carries the envelope to the right desk. If you have a long report, you split it across several envelopes and number them, and the person at the other end puts the pages back in order.

A network is that mail service, running thousands of times a second. The desks are devices, the desk numbers are addresses, the envelopes are packets, and the mail room is a box called a switch.

The parts of a network

A network is two or more devices joined so that they can exchange messages. Four kinds of part make that possible.

  • DevicesAnything that sends or receives messages: a camera, a door controller, a recorder, a laptop. The trade also calls them hosts or endpoints.
  • LinksWhat carries the messages between boxes. Usually a copper network cable, sometimes glass fiber, sometimes radio.
  • SwitchA box with many sockets. Every device in one area plugs into it, and it passes each message to the socket where the destination lives.
  • RouterThe box that joins one network to another, for example your building to the internet. Lesson 4 covers it.

Notice the shape in the drawing above. Devices are not chained one to the next. Each has its own cable back to the switch, like spokes on a wheel. The trade calls this a star. Its great advantage is that one bad cable takes down one device and leaves the rest alone.

Security systems used to have their own private wiring. Each analog camera had its own coaxial cable back to a recorder. Today most devices share the same kind of network the office computers use. That saves cable and makes the system far more flexible. It also means the security technician has to understand the network, because half of all "the camera is down" calls turn out to be network faults.

DeviceWhat it sendsHow much
CameraA video stream to the recorderLarge and constant, day and night
Door controllerCard reads, door events, and it receives updates to its listTiny, a few messages when something happens
Intercom stationVoice and video during a callModerate, but only during the call
Recorder or serverVideo and events to people watchingLarge when someone is viewing
WorkstationRequests: show me this camera, unlock that doorSmall going out, large coming back

Keep this table in mind. Cameras are the heavy users. A door controller could run for a week on the traffic one camera creates in a second.

Check yourself

In a star network, the cable to one camera is cut. What happens to the other cameras on the same switch?

Messages travel in packets

A device never sends a whole video or a whole file in one piece. It chops the data into small chunks and wraps each one in a packet. A packet is the envelope from the mail room picture. It has two parts:

  • The header. The writing on the outside: the address it is going to, the address it came from, and a few notes about what is inside.
  • The payload. The contents. On ordinary building networks a packet carries up to about 1,500 bytes, which is roughly one page of plain text.

Small packets have a practical purpose. Many devices share the same cables and switches, and short packets let everyone take turns. If one packet is damaged on the way, only that packet is sent again and not the whole message.

Here is a worked sum. A single frame of video from a camera might be 60,000 bytes. Divide by 1,500 and you get 40 packets for that one picture. At 15 pictures a second, that camera sends about 600 packets every second. This is normal, and a switch handles it without effort.

Rules, clients and servers

Two devices can only understand each other if they agree on how messages are laid out. An agreed set of rules is called a protocol. You will meet many protocol names in this trade. You do not need to memorize them now. Just recognize that each name means "a set of rules for one job".

Word you will hearWhat it means in plain terms
EthernetThe rules for sending packets over the cables and switches inside a building
IPInternet Protocol. The rules for addresses, so that a packet can cross from one network to another
TCPA careful way to send: every packet is checked off and resent if lost. Used for card events, settings and web pages
UDPA fast way to send: no checking off. Used where a late packet is useless anyway, as in live video and voice
LANLocal area network. The network inside one building or site
WANWide area network. The links between sites, including the internet

Most conversations have two roles. The client asks and the server answers. When you open a camera's settings page from a laptop, the laptop is the client and the camera is the server. When the same camera sends video to a recorder, people often call the recorder the server. The names describe who is asking in that one conversation. They do not describe how big the box is.

One more idea will save you confusion later. A switch only cares about getting packets across the local network. It does not know or care that a packet holds video. This separation into layers is why the same switch can carry cameras, phones and office computers at once. It is also why a network fault and a camera fault can look the same from the monitoring desk.

Is it on the network?

Not every wire in a security system is a network cable. Many devices are plain electrical circuits. Others speak an older, simpler language over their own pair of wires. Knowing which is which tells you which tools and which lessons apply.

Does this device send network packets?

Decide for each one, then read why.

Three examples

Simple: the smallest network

A shop has four cameras and a small recorder with four camera sockets on the back. Each camera has one cable straight to the recorder. This is already a network. The recorder has a small switch built in, and it gives each camera an address by itself. Nothing else in the shop is involved, which is why these kits are so easy to install.

Medium: video that stutters at nine

An office has sixteen cameras plugged into the same switches as the staff computers. Every weekday around nine in the morning the live video stutters for a few minutes. At night it is perfect.

The cause is sharing. The link between two switches carries both the cameras and everyone's morning downloads, and for a few minutes there is more traffic than the link can take. Packets queue and some are dropped. Nothing is broken. The fix is a design decision: give the cameras a faster link or their own path. Lessons 7 and 8 show how.

Advanced: the door that keeps working

A company has two buildings. The access control server is in building A. One morning the link between the buildings fails. Staff in building B find that their cards still open the doors, but the security desk in building A shows every door in B as offline.

Both facts come from good design. Each door controller keeps its own copy of the list and decides locally, as the Access Control lesson "Controllers and panels" explained. The network only carries updates and reports. While the link is down, a card cancelled in A still works in B, and events in B wait in the controller's memory until the link returns. A designer has to know which jobs need the network every second and which only need it eventually.

From the field

  • Look at the lights first. Every network socket has a small link light. No light means no working cable path, and no amount of software will fix that.
  • Ask who owns the network. On many sites the switches belong to the customer's information technology staff. Meet them early. You will need sockets, addresses and their goodwill.
  • Draw the path. For any device that misbehaves, sketch every box and cable between it and the thing it talks to. The fault is on that line somewhere.
  • Label both ends of every cable with the same name. Six months later the person tracing a dead camera may be you.
  • Remember what still works without the network. A well designed door keeps deciding locally. A camera with a memory card can keep recording. Know which of your devices can do this before the network fails.

Common mistakes

  • Treating the network as someone else's problem, then losing a day to a fault a link light would have shown in a minute.
  • Chaining small switches one after another until nobody knows the path a packet takes.
  • Assuming that because cards still work, the network must be fine, or that because video is down, the camera must be dead.
  • Plugging security devices into any free socket without telling the people who run the network.
  • Using the word "server" for a box instead of a role, and then arguing about which device is which.

Summary

  • A network is devices, links, and switches that pass messages between them. Routers join networks together.
  • Each device has its own cable to a switch, in a star. One bad cable affects one device.
  • Data travels in small packets, each with a destination address, a source address and a payload.
  • A protocol is an agreed set of rules. A client asks and a server answers.
  • Cameras create most of the traffic. Door controllers create very little and should keep working when the network does not.

Exercises

Answer each one yourself first, then open the answer.

Exercise 1. Name the two addresses written in every packet's header, and say why the second one is needed.

Show answer
The destination address and the source address. The source is there so that the receiving device knows where to send its reply.

Exercise 2. One video frame is 90,000 bytes and each packet carries 1,500 bytes. How many packets does the frame need? At 10 frames a second, how many packets a second is that?

Show answer
90,000 divided by 1,500 is 60 packets for one frame. Ten frames a second makes 600 packets a second.

Exercise 3. You open a camera's settings page from your laptop. Which device is the client and which is the server?

Show answer
The laptop is the client, because it asks for the page. The camera is the server, because it answers. The roles belong to the conversation, not to the size of the device.

Exercise 4 (think, don't memorize). A customer says, "The network went down for an hour last night and the system was useless." Which parts of a well designed security system should have kept working during that hour, and which could not have?

Show answer
Doors should have kept opening for valid cards, because each controller holds its own list. Locks, exit buttons and anything hard wired would be unaffected. Cameras with memory cards could have kept recording locally. What cannot work is anything that needs the path: live video at the desk, recording on a central recorder, alarms reaching the monitoring screen, and changes such as cancelling a card. If the doors themselves stopped, the design depended on the network more than it should.