Wednesday, November 6, 2013

Transport layer

The transport layer is layer 4 of the OSI model. It falls right below the session layer and right above the network layer. As previously discussed, the session layer is responsible for creating, maintaining, and tearing down connections between applications on two systems. The transport layer performs a similar functionality, but on a larger level. Where the session layer works with two applications, the transport layer manages connections between two computers. When two computers need to communicate, they look to the transport layer to establish the connection.

There are two types of protocols that function at this level; connection-oriented protocols and connectionless protocols. Connection-oriented protocols are concerned with maintaining a persistent connection between the two systems. These protocols will undergo a process known as a handshake to establish parameters that guide the connection. During the handshake, the communicating computers will agree on how much information will be sent at a time, how integrity will be checked once the data is received, and how to detect if a packet was lost along the way. Connection-oriented protocols provide error-checking and are able to retransmit packets that were lost or damaged. Well known connection-oriented protocols include Transmission Control Protocol (TCP) and Secure Sockets Layer (SSL).

Connectionless protocols do not concern themselves with error-checking or agreeing on how much or at what rate to transfer data. These protocols will simply send the data without first trying to contact the recipient. The result is that the data may or may not reach its destination and the sending system has no way of confirming this. This sounds like a big deal, but there is much data that gets sent that is not crucial, and if a few packets occasionally do not make it to their destination it is not a big issue. Developers will often use a connectionless protocol because it carries significantly less overhead since there is no need to create and maintain a connection or provide error-checking. The most well known connectionless protocol is User Datagram Protocol (UDP).

Tuesday, October 29, 2013

Session Layer

The session layer is right below the presentation layer in the OSI model. The session layer's responsibilities are centered around allowing applications on different systems to communicate with one another. When an application on one system needs to speak to another, a session must be established. Once a session has been established, the applications are able to freely share data. The session layer provides the functionality of establishing, maintaining, and removing the session. Once the conversation is over, the session layer will remove the session and release any resources it was using. A similar analogy is making a phone call. If I want to speak with you I will call your phone to initiate a session. Once you answer the session is active. We can then talk back and forth. At the end of the conversation we hang up and the resources that were committed to our session are now released for others to use. This is known as dialog management.

When the session layer sets up the connection, there are three types of connection it may use. Each affects how data will flow from one machine to the other. These modes are:

  • Simplex - Communication takes place in one direction
  • Half-duplex - Communication takes place in both directions, but only one application can send information at a time
  • Full-duplex - Communication takes place in both directions, and both applications are able to send information simultaneously
It may seem like it would make the most sense to just always have a full-duplex connection because this would allow both applications to easily communicate, but this isn't the case. In computing we always have to be mindful of the resources we are consuming, so if we can manage with less it's best to do so. A simplex connection requires less overhead and is perfect for any operation where only one system needs to be able to send information. Similarly, half-duplex is great for if each system only needs to periodically update one another.

There is often times confusion about how the session layer is different from the transport layer. The transport layer is responsible for establishing and controlling connections between systems. This is very similar, but the difference is the level they work at. The transport layer is concerned with computer to computer communication, while the session layer is concerned with application to application communication.

Some protocols that function at this level include Structured Query Language (SQL), NetBIOS, and remote procedure call (RPC).

Monday, October 28, 2013

Presentation Layer

Layer 6 of the OSI model is the presentation layer. This layer works right below the application layer and is primarily responsible for putting data given to it by the application layer into a format that other computers using the OSI model can understand. It provides a common way for systems to display and use information despite what application the user may be using on their system. For instance, suppose that Jack creates a document on a Windows machine using Microsoft Word. He then wants to send this file to Jane who uses uses Open Office instead of Word. To achieve this, the application layer passes the file on to the presentation layer which decides the proper way to encode it; in this case, it chooses American Standard Code for Information Interchange. The message continues to move down through the other layers, across the wire, and up through the model on the end system. When the presentation layer on Jane's machine receives the message it looks at the headers placed by Jack's system. It sees that the information is in ASCII format and tells the application layer which decides what program is appropriate for opening this type of file.

The presentation layer is focused solely on the syntax and format of the data and pays no attention to the meaning of any of the data. It translates the format that an application uses to a standard format that is used when transferring information over a network. When a program saves a file, such as an image, a format must be specified, such as GIF, or JPEG. The presentation layer adds information to the file that tells the computer how to display the file and process it. This way if the file is later sent, the receiving computer will also have instructions on how to properly display the file.

The presentation layer is also responsible for compression and encryption of files. If a compressed or encrypted file is to be sent over a network, the presentation layer will write information about how it is compressed of encrypted to the header of the packet. Again, this tells the receiving system's presentation layer what process was used to compress or encrypt the file and it can pass that information on to the application layer. In the event that the receiving system doesn't know that compression algorithm or file format, the file will be displayed with an unassociated icon.

Sunday, October 27, 2013

Application Layer

The application layer is not the applications a user runs on their system. Rather, this layer is made up of protocols that support these applications. When a user is performing some action with an application and then wants to send this data as a message, application layer protocols are called on to package the data (using headers and footers) and pass the data on to the next layer (in this case, the presentation layer). The message will continue to move down the OSI model as each layer performs its duties on the message, until it eventually reaches the target system and moves in reverse through the model. When the target system's application layer receives the message, it looks at the headers and footers that were placed there by the user's application layer and processes the data in the correct manner.

As another example, say you want to mail a letter to your friend. You write the letter and hand it to me, the application layer. I take the message and put it in an envelope and pass it on to the other layers which will eventually add the address and name of the recipient. When the recipient receives the letter, she removes the envelope (strips off the headers and footers) and is presented with your message. This is similar to how the application layer functions.

Some protocols that function at this layer include Simple Mail Transfer Protocol (SMTP), Hypertext Transfer Protocol (HTTP), Line Printer Daemon (LPD), File Transfer Protocol (FTP), Telnet, and Trivial File Transfer Protocol (TFTP). Each of these has an application programming interface (API) that defines how they can be called by an application. When an application, such as a mail client, wants to send a message it will call on a protocol; in this case, SMTP. The API of SMTP says how the information must be presented to the protocol for it to do its job. After the mail client makes a call to the SMTP API, SMTP adds its information to the user's message and passes it on to the presentation layer.

OSI Model

The OSI model was developed by the ISO in an attempt to standardize the way in which systems communicate across networks. The hope was to create a standard protocol set which would allow the product of any vendor to be able to network with other vendor's products. While the protocol set did not catch on, the model did. At the time of the OSI model's creation, the TCP/IP protocol suite was already in place as a widely used networking protocol. While TCP/IP has it's own model which is still commonly used today when examining and understanding networking issues, the protocol suite has become an integral part of the OSI model.

The OSI model is made up of seven layers. Each layer represents a different step in communicating over a network. At each layer, there are a set of protocols that operate to achieve that layer's responsibility. The objective of the OSI model is to outline how the protocols at each layer need to function so that they can work with systems that may be developed by other vendors. This concept is known as an open network. An open network architecture is one that no vendor owns, and if implemented, it provides a standard way of operating. It is this open network design that lets a computer that uses an Intel processor communicate with another that uses AMD.

The seven layers of the OSI model, moving from the top to the bottom are: Application, Presentation, Session, Transport, Network, Data link, and Physical. Each layer has a different function when creating a
message to be sent over a network. When a system needs to create a message to send, it begins at the top of the model and works down. Each layer adds information to the message as it travels down the model. At each stop the message grows in size. When the receiving system gets the message, the message moves in reverse up the model. As it moves up the model, each layer removes the information that was added by it's counterpart layer on the other system. Once each layer removes the data that pertains to it, it passes the message on to the next layer. This process where layers and protocols communicate with their counterparts across systems is known as encapsulation. Encapsulation is based on the idea that a layer only needs to know how to do it's job and how to pass the message on to the next layer. The session layer is not concerned with how the physical layer is going to put the electrical signals onto the wire, and vice versa.

Each layer has different responsibilities and functions it performs, as well as a format it expects the message to be in. Each layer also has a connection point, or interface, that allows it to communicate with three other layers: 1) the layer above it, 2) the layer below it, and 3) the same layer on the target machine. A layer provides control functions by adding information to the message in the form of headers and footers on the data packet. This tells the corresponding layer on the target machine how the message is to be handled.

The benefit of encapsulating the responsibilities of these layers is it allows products from different vendors to work together within the single model in a predictable manner. If a vendor designs a protocol for the session layer that is based on the OSI model, other vendors, and consumers, can be certain it will function properly with other open system protocols.

Wednesday, October 23, 2013

Surveillance Devices

Visual recording devices can play an important part in physical security. Their presence can discourage would be attackers, provide the ability for one person or system to monitor multiple areas simultaneously, and provide a log of events for an area. A commonly used system is closed-circuit TV (CCTV).

CCTV systems are made up of cameras, transmitters, receivers, and monitors. The camera captures the data and transmits it to a receiver which then displays the data on a monitor. Today's systems surpass older models that only allowed one feed to be displayed on a monitor at a time. Today, a monitor can show feeds from multiple cameras so that a security guard can see more than one environment simultaneously. Data captured by the camera is also often recorded on a drive for record and later review. Most modern CCTV cameras today also use light-sensitive chips call charged-coupled devices. This chips are what convert the light received into electrical signals. What makes the chips advanced is that they include infrared light which is normally beyond the scope of human eyesight. This allows for more granularity and detail in the resulting image.

An important consideration for CCTV cameras is what type of lens will you need. There are two main types used: fixed focal length and zoom (varifocal). The focal length affects how objects are viewed on a horizontal and vertical basis. Short focal length lenses provide a wider-angle view, while long focal length lenses provide a more narrow view. This angle determines what size the images seen by the camera will be and how much of an area the camera can view. So if you want to be able to monitor a wide area at once, a short focal length lens is most appropriate. If the camera is installed in a smaller area, a long focal length lens is best. A fixed focal length lens comes in a size such as wide or narrow and is stationery. A zoom lens is adjustable, however, and can be used to view something closer and will refocus.

The next characteristic of lenses is depth of field. Depth of field refers to what portion of the image is in focus when shown on the monitor. Depth of field is affected by the size of the lens opening, the distance of the subject, and the focal length of the lens. The depth of field increases as the size of the lens opening increases, the subject distance increases, or the focal length decreases.

Lighting also plays an important role in CCTV. Cameras have an iris lens which controls how much light enters the camera. A manual iris lens has to be adjusted manually and is best suited for an environment with a steady light supply. An auto iris lens has the ability to self adjust as the environment light changes such as outside.

The last consideration is that of mounting. A fixed mounting is stationery and cannot move in response to security personnel commands, whereas a camera with PTZ capabilities provides pan, tilt, and zoom features.

As you can see, there are many considerations for installing a CCTV system. To get the best results, a thorough assessment of the environment and needs of the organization should be done. CCTV systems can become very expensive quickly so it is important to prioritize what features are needed where.

Fire Detection and Suppression

Fire can be one of the most damaging physical events. Damage to systems, buildings, and people can cost a company great deals and be a tragedy. Because of this it's very important that fire safety be taken seriously. It's also why regulations exist that ensure a minimum amount of protection against fire. This post will discuss the different technologies used for fire detection and suppression. Equally important is fire prevention which includes proper training and ensuring the correct supplies are accessible in case of emergency, though this will not be discussed.


Fire detection

Fire detection systems come in two base varieties, manual and automatic. Manual systems are the red pull boxes that many people are familiar with. These systems are activated by a person once a fire is detected. Automatic systems are able to sense heat or smoke in a variety of ways. When a fire is detected the system will sound an alarm before triggering a suppression system.

A common type of smoke detector uses a photoelectric device to test the air for smoke. In one variety, a beam of light originates at an emitter and ends at a receiver. The system monitors the intensity of the light and sounds an alarm if the light becomes obscured. Another variety draws in air surrounding the detector and tests the air quality with a photoelectric device.

Heat activated systems monitor the temperature of the environment and watch for noticeable changes. These systems can be set to sound an alarm if a certain temperature is reached (fixed temperature) or if the rate of change exceeds a predefined limit (rate-of-rise). Rate-of-rise systems can provide an earlier alarm than fixed temperature systems but can also be the source of more false alarms.

It is important that fire detection devices be installed in all the proper areas and not just in obvious places like offices and hallways. Many office buildings have dropped ceilings and raised floors where wiring is ran. There should be detection devices installed in both of these to ensure an early alert in case of an emergency. Additionally, smoke or heat can often gather in ventilation systems before being dispersed to the surrounding areas, so there should be detection devices installed in these areas as well.

Fire suppression

Not all fire is equal. There are four types of fire and each requires a certain type of suppression device. Use the wrong one, and you could end up making the fire bigger/stronger rather than extinguishing it. The table below summarizes the classes of fire and the appropriate suppression method.
Fire Class Type of Fire Elements of Fire Suppression Method
A Common combustible Wood products, paper, and laminates Water, foam
B Liquid Petroleum products and coolants Gas, CO₂, foam, dry powders
C Electrical Electrical equipment and wires Gas, CO₂, dry powders
D Combustible metals Magnesium, sodium, potassium Dry powder
Foams are mainly water-based and are designed to float on top of a fire and prevent any oxygen from flowing to it. Gas, such as halon or FM-200, mixes with the fire to extinguish it and is not harmful to computer equipment. Halon has been found to damage the atmosphere, however, and is no longer produced. CO₂ gas removes the oxygen from the air to suppress the fire. It is important that if CO₂ is used there be an adequate warning time before disbursement. Because it removes the oxygen from the air it could potentially endanger people's lives. CO₂ is often used in unmanned facilities for this reason. Dry powders include sodium or potassium bicarbonate, calcium carbonate, or monoammonium phosphate. The first three interrupt the combustion of a fire, and monoammonium phosphate melts at a low temperature and smothers the fire.

Water sprinkler systems are much simpler to install than any of the above systems but can cause damage to computer and electrical systems. It's important that an organization recognize which areas require which types of suppression systems. If water is to be used in an environment that contains electrical components, it's important that the electricity be shut off first. Systems can be configured to shut off all electrical equipment before water is released. There are four main types of water systems:

  • Wet pipe - Wet pipe systems always contain water within the pipe and are usually controlled by a temperature sensor. Disadvantages of these systems include that the water in the pipe may freeze, and damage to the pipe or nozzle could result in extensive water damage.
  • Dry pipe - Dry pipe systems employ a reservoir to hold the water before deployment, leaving the pipes empty. When a temperature sensor detects a fire, water will be released to fill the pipes. This type of system is best for cold climates where freezing temperatures are an issue.
  • Preaction - Preaction systems operate similarly to dry pipe systems but add an extra step. When empty, the pipes are filled with pressurized air. If pressure is lost, water will fill the pipes, but not be dispersed. There is a thermal-fusible link on the nozzle that must first melt away before the water can be released. The advantage of this system is it gives people more time to react to false alarms and small fires. It is much more effective to put out a small fire with a hand-held extinguisher than a full spray system.
  • Deluge - Deluge systems have their sprinkler heads turned all the way open so that greater amounts of water can be released at once. These types of systems are not usually used in data centers because of this.