Networking for Security, lesson 12 of 12
Finding network faults
"The camera is offline" can mean a dead power supply, a crushed cable, a wrong address or a setting changed last week. Guessing wastes hours. This last lesson gives you one method that works on every network fault, and the few simple tools that go with it.
Find the fault
The recorder reports that the camera is offline. You are at the security desk PC. Pick a case, then run tests in any order and work out what is wrong before you reveal it.
Tests you can run
The everyday picture
A table lamp will not light. You do not start by rewiring the house. You check that it is plugged in. You try the switch. You swap in a bulb that you know works. You plug the lamp into another outlet. Each check takes seconds, and each one cuts the list of suspects in half.
Notice three habits in that. You begin with the simplest and most physical thing. You change one thing at a time. And you use a part you already know is good, the working bulb, to test the rest.
Network faults yield to the same habits. The only difference is that the plug, the switch and the bulb have other names.
The method: bottom up
Every network conversation rests on a stack of things that must each be working. Check them from the bottom, in order, and stop at the first one that fails. There is no point studying addresses on a device with no power.
| Step | The question | How to check | Typical causes when it fails |
|---|---|---|---|
| 1. Power | Is the device on? | Its own lights. The PoE status page on the switch. | PoE budget used up, PoE turned off on the port, failed power supply |
| 2. Link | Is the cable connected at both ends and good? | The link light on the switch port. A cable tester. The speed the port has linked at. | Damaged cable, poor termination, a run over 328 feet, the wrong port |
| 3. Address | Does the device have the right IP address, mask and gateway? | The device's network page. The DHCP server's list. The maker's discovery tool. | Factory default address, a 169.254 address, a duplicate address, the wrong VLAN |
| 4. Reach | Can other devices exchange messages with it? | Ping, from the same subnet first, then from further away | Wrong gateway, a VLAN missing from a trunk, a firewall rule |
| 5. Service | Does the application itself work? | Open the device's web page. Check the recorder's own error message. | Wrong password, wrong port number, a clock that is far out, mismatched software |
Before you start, ask two questions that often solve the case outright. What changed? A fault that began on Tuesday usually has a cause that arrived on Tuesday. And how many are affected? One dead camera points at that camera, its cable or its port. Every camera on one switch points at the switch or its uplink. Every device on the site points at the core, the recorder or the power.
A handful of tools
- Your eyes Link lights tell you about power and cable before any software does. No light on a port means no working connection. On many switches the color or a second light also shows the speed and whether PoE is being delivered.
- A cable tester Checks that all eight wires run to the right pins. Better ones measure length and find how far along a break is. A simple PoE tester shows whether a port is supplying power.
- A laptop Your known-good bulb. Unplug the suspect device and plug the laptop into the same cable. If the laptop gets a link and an address, the cable, port and VLAN are fine and the fault is in the device.
- The switch's own pages A managed switch lists each port's link, speed, VLAN, PoE draw and error count, and the MAC addresses it has seen on each port. This is the best view of the network there is.
A few commands, typed at a computer's command prompt, do the rest. The names below are the Windows ones. Other systems have close equivalents.
ipconfigshows your own computer's IP address, mask and gateway. Start here, because a laptop on the wrong subnet makes every other test fail.pingfollowed by an address sends a small message and waits for the echo. It answers the question "can I reach that address, and how quickly?"arp -alists the IP addresses your computer has recently spoken to on its own subnet, each with its MAC address. Lesson 3 explained the two kinds of address. This command shows how they are paired.tracertfollowed by an address lists each router on the way there. It is useful when traffic must cross between subnets or sites.
Check yourself
A camera's switch port shows no link light. Which do you check next?
Reading a ping
Ping gives one of a few answers, and each points somewhere different.
| What you see | What it means | Where to look |
|---|---|---|
| Reply from the address, with a time in milliseconds | The device is on and reachable at that address | Higher up: the service, passwords, the recorder's settings |
| Request timed out | The message went out and nothing came back | Device off, wrong address, wrong VLAN, a missing gateway on the device, or a device set not to answer pings |
| Destination host unreachable | Your computer, or a router on the way, could not find any path to that address | On the same subnet, nothing is answering to that address at all. Across subnets, a routing problem. |
| Could not find host | You typed a name, and it could not be turned into an address | DNS, as lesson 5 described. Try the IP address instead. |
| Replies that come and go, or times that swing widely | The path exists but is unreliable | A marginal cable, a wireless link, an overloaded uplink or two devices sharing one address |
Two cautions. A failed ping is not proof that a device is dead, because some devices and firewalls are set to ignore pings. And a successful ping is not proof that the right device answered. If two devices have been given the same address, either may reply. Compare the MAC address shown by arp -a with the one printed on the device's label.
Ping also lets you split a path in half, as the tool at the top shows. If you can reach the camera switch but not the camera, the fault lies beyond that switch. One test has cleared most of the network.
Where would you look first?
Each line is a call from a customer. Choose the first step of the method you would check.
Six symptoms
Three examples
Simple: one new camera will not come up
An installer adds a ninth camera to a 16-port PoE switch. The port's link light stays dark. A laptop plugged into the same cable at the camera end gets a link at once, so the cable and the port are good. The switch's PoE page gives the answer: the eight existing cameras already use nearly all of the switch's power budget, and the switch has refused to power another. Power over Ethernet covered this limit. The fix is a switch with a larger budget, or moving two cameras to another switch.
Medium: the camera that works every other minute
A lobby camera drops out and returns, over and over. Its cable tests perfectly. A steady ping to its address shows replies, then timeouts, then replies. The technician runs arp -a twice, a minute apart, and sees two different MAC addresses for the same IP address.
Two devices are sharing one address. A new intercom had been given the same fixed address the week before. Each device answers some of the time, and the switches keep changing their minds about where that address lives. The intercom is given its own address, and both are written into the site's address list so it cannot happen again.
Advanced: gaps in the recording on Friday afternoons
A distribution center reports missing video from the dock cameras, mostly late on Fridays. Every camera is online whenever anyone looks. Nothing is dead, so step by step checking of one device finds nothing.
The two questions do the work. What is affected? Only the cameras on the dock switch. When? At the busiest hour. The technician opens the dock switch's status page and finds its uplink port has linked at 100 Mbps instead of 1,000. A forklift had damaged the cable months earlier, breaking one pair. The link survived at the lower speed, and twenty-four cameras at their daytime bitrate no longer fit, exactly as Bandwidth and video described. The port's error counter is climbing. A new uplink cable restores the gigabit link, and the gaps stop.
From the field
- Check your own laptop first. Run
ipconfigbefore anything else. Half of "the camera will not answer" turns out to be a laptop still set to another site's subnet. - Change one thing, then test. If you change three things and it works, you do not know which one fixed it, or whether the other two broke something else.
- Swap with known-good parts. A spare patch cord, a spare port and a spare camera turn guessing into proof.
- Restarting is a test, not a repair. If a restart cures it, write down that it did, because the fault will return and the pattern matters.
- Keep the records that make this easy. An address list, a port map and the signal and loss readings from installation day turn an hour's search into five minutes.
- Write down what you found. The next technician, who may be you, will meet the same fault.
Common mistakes
- Starting with software settings before checking power and the link light.
- Replacing the camera first, because it is the part you can see.
- Resetting a device to factory settings and wiping the evidence along with the configuration.
- Trusting a ping reply without checking which device sent it.
- Treating an intermittent fault as fixed because it is working at the moment you look.
- Fixing the fault and leaving without recording the cause.
Summary
- Ask what changed and how many devices are affected before touching anything.
- Work from the bottom: power, link, address, reach, service. Stop at the first that fails.
- Link lights, a cable tester, a laptop and the switch's status pages find most faults.
- Ping splits a path in half. Read its different failures, and remember that it can mislead.
- Change one thing at a time, prove it with known-good parts, and write down the cause.
Exercises
Answer each one yourself first, then open the answer.
Exercise 1. List the five steps of the method in order.
Show answer
Exercise 2. You ping a camera's name and see "could not find host". You ping its IP address and get replies. What is wrong, and what is not?
Show answer
Exercise 3. A new camera has a link light, but its address shows as 169.254.18.7. Which step has failed, and what are two likely causes?
Show answer
Exercise 4 (think, don't memorize). At eight on Monday morning, all twelve cameras in one wing of a school are offline. The other wings are fine. A colleague starts driving to the school with twelve spare cameras. What would you do instead?