IP Technology

From CCTV Information
Revision as of 21:23, 7 November 2010 by Gb003162 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Introduction

It used to be that CCTV images were always transferred over coaxial cable, for various reasons: range, bandwidth, ease of installation, low attenuation, and so on. However, there is a trend which is emerging to integrate CCTV images into (or over) existing digital networks which are there to provide data services. The reasons for this trend would appear, on the face of it, to be unarguable: most organisations have large data networks already; there is often spare capacity (although the network manager may disagree with that statement); twisted pair cable extends everywhere; it is simple to install and maintain; it makes maximum use of (or ‘leverages’) an expensive asset. There are downsides to the integration of data and images on a single infrastructure, usually to do with two things: the effect on data patterns caused by streaming video, and the problems of reliability and resilience in a network where 100% uptime is usually an impossibility.

This chapter acts as a simple guide to networking which hopefully will cover a lot of what you wanted to know about networking. This is not an in-depth technical guide: there are already too many of those around. Rather, it looks at an overview of networking from the data perspective, and then deals with the issues of adding CCTV to the infrastructure.

The first part looks at what a network is and how simple networks operate. This leads on to check out protocols, and in particular, the OSI 7 – layer model. Then TCP/IP, IP addresses and gateways are dealt with. Local Area Networks are looked at: how they work, and what to look out for when CCTV is added. Ethernet will be described, the world’s most popular LAN, and the difference between hubs and switches will be examined. Later, the Internet is described: where it came from and how it works; what domain names are, and how a name, and its location, are looked up through a service called the DNS. Then routers are explained - how do they do their job? What happens if they stop working? What’s a router-switch? The next part of the chapter looks at the circuits used to connect equipment together – copper, wireless and optical fibre. Lastly, how networks are accessed is described, and security issues are dealt with reference to Virtual Private Networks and Firewalls.

Networks

Over the years, many different definitions have emerged to cover the word Network. ‘A group of PCs connected together’ might be one; ‘a fully interconnected system of hardware with redundant circuits to provide resilience’ might be another. In actual fact, a network is something as simple as two desktop computers sharing a single printer, to something as large as the internet. What drives a network is the word ‘interconnectivity’.

Image9.1.png
Diagram 9.1 Interconnectivity

Can one PC send data to another PC and vice versa, irrespective of how they are actually connected together? Can a computer in, say, England, download information from another computer in China? Will the two computers be compatible? Should we need to know? The answers to these questions are yes, yes, yes and no, in that order. The fact that a computer made by one manufacturer can ‘talk’ to a computer made by a different manufacturer somewhere else in the world isn’t something just to do with the fact that both might use Microsoft operating systems: there’s a bit more to it than that. Buried deep in the heart of the PC is a set of ‘protocols’ which take care of any incompatibilities between different computers. It isn’t necessary to know that they’re there, but it might be helpful to explain a little about protocols and how they work before continuing.

Types of communications

Image9.2.png
Diagram 9.2 Types of communications

Whenever you write a letter, you observe a protocol: ‘Dear Sir’ ends with ‘yours faithfully’; ‘Dear Ms Smith’ ends ‘yours sincerely’ and so on. We do it without thinking: it’s what we were probably taught at school. Similarly, when we ring someone, we have a protocol for identifying who is at the other end of the line, and how long we speak for before finding out whether the other party has understood. We also know what to do if we have misheard or misunderstood what was said – a sort of error detection and correction routine using the word ‘Pardon?’ or ‘Sorry, I missed that, say again’ What do we do if we answer the phone, and find someone speaking a language we don’t understand? We might be able to speak a few words of the foreign language, but if we can’t, then there is no point in trying to communicate.

What we need in the computer field is a kind of ‘lingua franca’ or a common language which is used by every computer so that any computer can communicate with any other. That doesn’t mean that if you go to a Japanese web site and download some data that you will necessarily understand what it says – it will still be in Japanese characters, but your computer will have had no problem understanding what you asked it to do, and no problem in understanding how to ask the computer in Japan for the information either. This is because all computers work to an internationally agreed set of ‘protocols’.

Back in the 1970s, there was no need for protocols: all computers were made by IBM. By the 1980s, many other manufacturers had entered the market, using different internal operating systems, and it became very clear that international communications were here to stay. New email packages became available; for example Outlook, Outlook Express, Eudora Light, Eudora Professional, MailPlus, Pegasus, Lotus Notes, and others. So to enable anyone anywhere to send email to any other computer anywhere, irrespective of whether, for example, one PC used Outlook to generate an email, and another used Lotus Notes to do the same job, some sort of protocol was needed to carry out ‘conversion’ work between two dissimilar elements of software or hardware. The International Standards Organisation (ISO) got involved, and came up with the Open Systems Interconnection 7-layer Model as the best way of solving the problem. The code for this is embedded into the computer operating system, and works quietly in the background.

Open systems interconnection

One of the simplest ways of understanding the Open Systems Interconnection model is to relate it to a set of envelopes – several envelopes fit inside one another, until only the largest is visible. The largest one hides all the others, and is the only one visible to the eye. Before we see how it works, let’s ask another question. If you want to be absolutely sure that any postal packet you send to another person actually gets there, what would you do? You ought not to drop it into a post box, even though the Royal Mail has a good track record of delivery: you would send it recorded delivery or registered post. That way you can be sure that the addressee has got it. Networks use the same idea: if you want to send, say, an email to somebody, and be sure that (a) it’s arrived, (b) it’s not been damaged in transit and (c) the whole email has been delivered, and no part is missing, then your computer would automatically use a system for recorded delivery – this is called TCP, or Transmission Control Protocol. You don’t actually see this happening: your PC takes the appropriate action immediately you decide to send an email.

Let’s use an example. We’ll send an email to [email protected] This email has an attachment which consists of a Word document of 100 pages of text. The computer we will use has Lotus Notes as its email package (or ‘client’, as it is usually called) and it is connected to an internal Local Area Network, or LAN. When we click on ‘create mail’, and fill in the various boxes with subject, addressee, text, attachment, and so on, the OSI model is already working away on this information. The email itself is placed inside an ‘envelope’ with the type of email package – Lotus Notes – on the front. This in turn is placed inside another ‘envelope’ with a label on the front to indicate that the contents are, in fact, electronic mail. This label says ‘SMTP’ – Simple Mail Transfer Protocol. This envelope in turn is placed inside another, which says ‘TCP’ on the front. This is the instruction for the recipient to acknowledge safe receipt. Since this envelope isn’t big enough to hold the email and the 100 pages of text (a TCP envelope will only hold about 300 words, or roughly the equivalent of a single A4 page of text) the computer automatically generates enough TCP envelopes for the whole message, and gives each envelope a sequence number. So, for example, the first envelope would have a sequence number of ‘1 of 100’, the second would be ‘2 of 100’ and so on. In this way, the recipient’s computer knows how many envelopes it is supposed to receive, and it can therefore ask for retransmission of any missing ones.

Each TCP envelope is then placed inside another envelope with the source and destination addresses on it. Since networks don’t actually use email addresses to send information, the destination address – [email protected] - has to be changed into an address format which can be used. This is called the Internet Protocol address, or IP address. This is automatically done by the computer. Finally, the IP envelopes are put inside another set of envelopes which are addressed to a device which will send the full message into the internet where it will be routed to [email protected] This device is usually called a ‘gateway’ – in actual fact it will physically be a router. Think of it as your post room, where incoming and outgoing mail is sorted for delivery.

Assuming the data successfully arrives at the ‘post room’ at Tavcom, it will be forwarded to the PC designated to handle enquiries. At this point, envelopes begin to be opened. The ‘IP’ envelope is opened to see whether it has been delivered to the right address, and to see where it has come from. If that is OK, then the TCP envelopes are opened one by one to check if they have arrived in the right sequence and with their contents intact. If so, then the envelopes are passed to the computer’s internal ‘mail room’ where SMTP opens them and uses the information to convert what it has received (Lotus Notes) into the email package of the computer at [email protected] – this is Microsoft Outlook. Only when all this has been correctly done, and any missing envelopes chased up and checked, will the recipient be advised that an email has arrived.

OSI model

So let’s translate all this into the OSI model. Layers 7, 6 and 5 are to do with the type of email package (Lotus) and whether it is indeed an email (SMTP). Layer 4 makes sure that TCP is used for ‘recorded delivery’ Layer 3 contains ‘to’ and ‘from’ IP addresses, and Layer 2 has the address of your ‘post room’ or ‘Gateway’. Layer 1 defines how, and at what speed, the data is sent from your PC to the ‘Gateway’ over the LAN. To use the correct technical term, when data arrives at Layer 3, the IP layer, it is loaded into an envelope which is formally known as a ‘Packet’, an ‘IP Packet’ or an ‘IP Datagram’.

Image9.4.png
Diagram 9.4 The layers of the OSI

However, there is a problem with this analogy with respect to the transmission of CCTV images. These must be sent and received in real time, so to acknowledge receipt of each packet of video information would introduce an unacceptable delay from end to end. So there must be a way of sending information without the need for all the checking and acknowledging which is an essential part of TCP. The answer is to use an alternative protocol, called UDP (User Datagram Protocol). This is sometimes called ‘Fire and Forget’, and is the equivalent of the postal analogy where letters are simply posted to their addressees without the need for acknowledgements. Many IP cameras today have a user-selectable option for TCP or UDP to improve the end-to-end delay characteristics of a network.

This article is an extract from chapter 9 of 'The Principles & Practice of CCTV' which is recognised as the benchmark for CCTV installation in the UK.