When it comes to IP security, there are two basic protocols used in the world today, TCP/IP and UDP. Most, if not all, IP cameras use UDP protocols.
User Datagram Protocol (UDP)
UDP is a transport layer protocol for client/server network applications based on Internet Protocol (IP). UDP is commonly used for quickly sending and streaming audio and video. UDP allows you to transmit data packets and provides speed. UDP does not check to make that the other devices the data packet was transmitted to have received the data. This protocol spools out data really fast without verification and then moves on to the next task. In the case of an IP camera, this protocol will spool data, and keep feeding it in live fashion, but there is no guarantee or confirmation of delivery.
Transmission Control Protocol (TCP) or TCP/IP
TCP was developed in the US in the 1970s for ARPNET. It is commonly referred to as TCP/IP and is the most commonly used protocol on the Internet. TCP/IP was set up to make data transfer more scalable and reliable. This protocol sends out large amounts of data, and then every so often it sends out a message confirming delivery of sent data packets.
When TCP/IP sends a data packet, it waits for a response from the computer it’s sending the information to, and if the receiving computer confirms that it has received the previous packets of data the protocol will continue sending the data until it’s done with the entire task of transferring all of the data packets. If the computer on the receiving end sends back a message confirming that data packet 3 of 100 is missing, the protocol will resend data packet 3. TCP/IP also keeps your files and programs in order, complete and whole.
TCP is a lot like sending a registered letter via the post office. The letter (data) gets delivered and you receive a signed piece of paper (confirmation) that your letter has made it to the recipient. UDP on the other hand, is like sending out a large amount of cards out via regular mail during the holidays, the cards (data) may or may not get to the recipient, but you want to get the cards out as quickly as possible.
IP addresses are required for TCP/IP communication. IP addresses are a 32-bit numeric address written as four numbers separated by periods. The numbers are always between 0 and 255. IP addresses can be static or dynamic. Each computer must have an IP address in order to connect to the internet, and each IP data packet must have an address before it can be sent to another computer.
IP addresses must be unique on each network on a LAN or WAN. You do not want to choose your IP addresses randomly; you will want to follow a method. For example, if 192.168.1.1 is your base IP address on your LAN, then you will want to go up in a sequential order as you add devices.
Media Access Control Address (MAC)
A MAC address is just as important as an IP address. A MAC address refers to the physical address that is set up on the network interface card (NIC) or on each device. A MAC address is a unique number, similar to a social security number – a unique MAC address is assigned to every device, which allows you to quickly and easily locate devices on your network.
Other Parameters of TCP/IP Communication
Other parameters around TCP/IP are sub-net mask, default gateway, and DNS servers. Setting these up for a camera is going to be similar to setting them up on a computer. On a computer, if you were to hit your start button, go into the control panel, and then click “Networking”, about the 4th or 5th option down on your Windows Networking Connection Properties is something called Internet Protocol version 4, TCP/IP V4.
Click the properties on that and to the right of it a box will appear. You can see how you have your IP address, your sub-net mask, and your default gateway. That’s where you set everything up, and each computer and each camera needs to be independent and unique from each other.
A subnet mask is a 32-bit number that masks an IP address and allows the IP address to be subdivided into two parts (extended network address and a host address) for enhanced security. A subnet mask allows you to know how many routers you need to talk between networks.
There are 3 address classes for subnet masks: Class A, Class B and Class C.
Class C is the most widely used subnet mask. A Class C subnet allows you to have 255 possible combinations of IP addresses for the computers set up on your network to talk to each other, before you need a router. You can put 255 cameras or 255 devices on you network.
Class B allows you to scale up into a larger infrastructure system. It allows you to put 65,000 different IP addresses on one network to talk between each other, before you need a router.
Class A goes even further with the ability to put 17 million possible combinations of IP addresses before you need a router.
Dynamic Host Configuration Protocol (DHCP)
DHCP is a network protocol used to configure network devices, so they can communicate on an IP network. DHCP provides automatic assignment and central management of IP addresses. With DHCP, there’s no guesswork involved in choosing an IP address for each device, it’s done automatically, and a new IP address is automatically assigned if a device is moved and plugged into another place on the network.
Without DHCP, an IP address must be entered manually for each device, and a new IP address must be assigned when a computer or other device moves to a new location on the network. DHCP gets its own IP address for a device, and then the device is automatically on the LAN and you are communicating with it.
Ping characteristics are also important in relation to TCP/IP. To ‘ping’ something is to test the connectivity between two devices on your LAN. Connectivity is important to know. If you go to the start menu on your computer, and go into the command prompt and type ‘ping’ plus your IP address, you can see if the device is live and working.
If you were to type in ping, space, and then an IP address, like 192.168.2.10, you would see the following information; 0 data packets lost, which would indicate that you have connectivity between 2 devices. If you get a ‘timed out’ message several times in a row, listed one after the other, it means that the device is either not plugged in, it doesn’t have the right IP address, subnet, or gateway, or the pin out in your cable could be wrong. A cable tester is a great tool to ensure that the pin out is correct and you are getting connectivity down the cable.
Domain Name System (DNS) Characteristics