Wednesday, 23 December 2015

Basic Network Terminology

Introduction
This Article will provide a basic overview of some common networking 
concepts - basic terminology, common protocols, and the 
responsibilities and characteristics of the different layers of networking.

Networking Glossary
Before we begin discussing networking with any depth, we must define
 some common terms that you will see throughout this guide, and in other
 guides and documentation regarding networking.
These terms will be expanded upon in the appropriate sections that follow:

                 ·          Connection: In networking, a connection refers to pieces of related information that are transfered through a network. This geneally infers that a connection is built before the data transfer (by following the procedures laid out in a protocol) and then is deconstructed at the at the end of the data transfer.

                 ·          PacketA packet is, generally speaking, the most basic unit that is  transfered over a network. When communicating over a network, packets are the envelopes that carry your data (in pieces) from one end point to the other. Packets have a header portion that contains information about the packet including the source and destination, timestamps, network hops, etc. The main portion of a packet contains the actual data being transfered. It is sometimes called the body or the payload.

                 ·          Network Interface:  A network interface can refer to any kind of software interface to networking hardware. For instance, if you have two network cards in your computer, you can control and configure each network interface associated with them individually. A network interface may be associated with a physical device, or it may be a representation of a virtual interface. The "loopback" device, which is a virtual interface to the local machine, is an example of this.

                 ·          LAN:  LAN stands for "local area network". It refers to a network or a portion of a network that is not publicly accessible to the greater internet. A home or office network is an example of a LAN.

                 ·          WANWAN stands for "wide area network". It means a network that is much more extensive than a LAN. While WAN is the relevant term to use to describe large, dispersed networks in general, it is usually meant to mean the internet, as a whole.


If an interface is said to be connected to the WAN, it is generally assumed that it is reachable through the internet.

                 ·          ProtocolA protocol is a set of rules and standards that basically define a language that devices can use to communicate. There are a great number of protocols in use extensively in networking, and they are often implemented in different layers.Some low level protocols are TCP, UDP, IP, and ICMP. Some familiar examples of application layer protocols, built on these lower protocols, are HTTP (for accessing web content), SSH, TLS/SSL, and FTP.

                 ·          Port: A port is an address on a single machine that can be tied to a specific piece of software. It is not a physical interface or location, but it allows your server to be able to communicate using more than one application.

                 ·          Firewall: A firewall is a program that decides whether traffic coming into a server or going out should be allowed. A firewall usually works by creating rules for which type of traffic is acceptable on which ports. Generally, firewalls block ports that are not used by a specific application on a server.

                 ·          NATNAT stands for network address translation. It is a way to translate requests that are incoming into a routing server to the relevant devices or servers that it knows about in the LAN. This is usually implemented in physical LANs as a way to route requests through one IP address to the necessary backend servers.

                 ·          VPNVPN stands for virtual private network. It is a means of connecting separate LANs through the internet, while maintaining privacy. This is used as a means of connecting remote systems as if they were on a local network, often for security reasons.

Network Layers
While networking is often discussed in terms of topology in a horizontal way, between hosts, its implementation is layered in a vertical fashion throughout a computer or network.
What this means is that there are multiple technologies and protocols that are built on top of each other in order for communication to function more easily. Each successive, higher layer abstracts the raw data a little bit more, and makes it simpler to use for applications and users.
It also allows you to leverage lower layers in new ways without having to invest the time and energy to develop the protocols and applications that handle those types of traffic.
The language that we use to talk about each of the layering scheme varies significantly depending on which model you use. Regardless of the model used to discuss the layers, the path of data is the same.         
As data is sent out of one machine, it begins at the top of the stack and filters downwards. At the lowest level, actual transmission to another machine takes place. At this point, the data travels back up through the layers of the other computer.
Each layer has the ability to add its own "wrapper" around the data that it receives from the adjacent layer, which will help the layers that come after decide what to do with the data when it is passed off.

OSI Model
Historically, one method of talking about the different layers of network communication is the OSI model. OSI stands for Open Systems Interconnect.
This model defines seven separate layers. The layers in this model are:
·         Application: The application layer is the layer that the users and user-applications most often interact with. Network communication is discussed in terms of availability of resources, partners to communicate with, and data synchronization.
·         Presentation: The presentation layer is responsible for mapping resources and creating context. It is used to translate lower level networking data into data that applications expect to see.
·         SessionThe session layer is a connection handler. It creates, maintains, and destroys connections between nodes in a persistent way.
·         TransportThe transport layer is responsible for handing the layers above it a reliable connection. In this context, reliable refers to the ability to verify that a piece of data was received intact at the other end of the connection.
This layer can resend information that has been dropped or corrupted and can acknowledge the receipt of data to remote computers.
·         NetworkThe network layer is used to route data between different nodes on the network. It uses addresses to be able to tell which computer to send information to. This layer can also break apart larger messages into smaller chunks to be reassembled on the opposite end.
·         Data Link: This layer is implemented as a method of establishing and maintaining reliable links between different nodes or devices on a network using existing physical connections.
·         Physical: The physical layer is responsible for handling the actual physical devices that are used to make a connection. This layer involves the bare software that manages physical connections as well as the hardware itself (like Ethernet).
As you can see, there are many different layers that can be discussed based on their proximity to bare hardware and the functionality that they provide.

TCP/IP Model
The TCP/IP model, more commonly known as the Internet protocol suite, is another layering model that is simpler and has been widely adopted. It defines the four separate layers, some of which overlap with the OSI model:
·         Application: In this model, the application layer is responsible for creating and transmitting user data between applications. The applications can be on remote systems, and should appear to operate as if locally to the end user.
The communication is said to take place between peers.
·         Transport: The transport layer is responsible for communication between processes. This level of networking utilizes ports to address different services. It can build up unreliable or reliable connections depending on the type of protocol used.
·         Internet: The internet layer is used to transport data from node to node in a network. This layer is aware of the endpoints of the connections, but does not worry about the actual connection needed to get from one place to another. IP addresses are defined in this layer as a way of reaching remote systems in an addressable manner.
·         LinkThe link layer implements the actual topology of the local network that allows the internet layer to present an addressable interface. It establishes connections between neighboring nodes to send data.
As you can see, the TCP/IP model, is a bit more abstract and fluid. This made it easier to implement and allowed it to become the dominant way that networking layers are categorized.

Interfaces
Interfaces are networking communication points for your computer. Each interface is associated with a physical or virtual networking device.

Protocols
Networking works by piggybacking a number of different protocols on top of each other. In this way, one piece of data can be transmitted using multiple protocols encapsulated within one another.
We will talk about some of the more common protocols that you may come across and attempt to explain the difference, as well as give context as to what part of the process they are involved with.
We will start with protocols implemented on the lower networking layers and work our way up to protocols with higher abstraction.

Media Access Control
Media access control is a communications protocol that is used to distinguish specific devices. Each device is supposed to get a unique MAC address during the manufacturing process that differentiates it from every other device on the internet.
Addressing hardware by the MAC address allows you to reference a device by a unique value even when the software on top may change the name for that specific device during operation.
Media access control is one of the only protocols from the link layer that you are likely to interact with on a regular basis.

IP
The IP protocol is one of the fundamental protocols that allow the internet to work. IP addresses are unique on each network and they allow machines to address each other across a network. It is implemented on the internet layer in the IP/TCP model.
    Networks can be linked together, but traffic must be routed when crossing network boundaries. This protocol assumes an unreliable network and multiple paths to the same destination that it can dynamically change between.  There are a number of different implementations of the protocol. The most common implementation today is IPv4, although IPv6 is growing in popularity as an alternative due to the scarcity of IPv4 addresses available and improvements in the protocols capabilities.

ICMP
ICMP stands for internet control message protocol. It is used to send messages between devices to indicate the availability or error conditions. These packets are used in a variety of network diagnostic tools, such as ping and traceroute.
Usually ICMP packets are transmitted when a packet of a different kind meets some kind of a problem. Basically, they are used as a feedback mechanism for network communications.

TCP
TCP stands for transmission control protocol. It is implemented in the transport layer of the IP/TCP model and is used to establish reliable connections.
TCP is one of the protocols that encapsulates data into packets. It then transfers these to the remote end of the connection using the methods available on the lower layers. On the other end, it can check for errors, request certain pieces to be resent, and reassemble the information into one logical piece to send to the application layer. The protocol builds up a connection prior to data transfer using a system called a three-way handshake. This is a way for the two ends of the communication to acknowledge the request and agree upon a method of ensuring data reliability.
    After the data has been sent, the connection is torn down using a similar four-way handshake. TCP is the protocol of choice for many of the most popular uses for the internet, including WWW, FTP, SSH, and email. It is safe to say that the internet we know today would not be here without TCP.

UDP
UDP stands for user datagram protocol. It is a popular companion protocol to TCP and is also implemented in the transport layer.
The fundamental difference between UDP and TCP is that UDP offers unreliable data transfer. It does not verify that data has been received on the other end of the connection. This might sound like a bad thing, and for many purposes, it is. However, it is also extremely important for some functions.
Because it is not required to wait for confirmation that the data was received and forced to resend data, UDP is much faster than TCP. It does not establish a connection with the remote host, it simply fires off the data to that host and doesn't care if it is accepted or not.
Because it is a simple transaction, it is useful for simple communications like querying for network resources. It also doesn't maintain a state, which makes it great for transmitting data from one machine to many real-time clients. This makes it ideal for VOIP, games, and other applications that cannot afford delays.

HTTP
HTTP stands for hypertext transfer protocol. It is a protocol defined in the application layer that forms the basis for communication on the web.
HTTP defines a number of functions that tell the remote system what you are requesting. For instance, GET, POST, and DELETE all interact with the requested data in a different way.

FTP
FTP stands for file transfer protocol. It is also in the application layer and provides a way of transferring complete files from one host to another.
It is inherently insecure, so it is not recommended for any externally facing network unless it is implemented as a public, download-only resource.

DNS
DNS stands for domain name system. It is an application layer protocol used to provide a human-friendly naming mechanism for internet resources. It is what ties a domain name to an IP address and allows you to access sites by name in your browser.

SSH
SSH stands for secure shell. It is an encrypted protocol implemented in the application layer that can be used to communicate with a remote server in a secure way. Many additional technologies are built around this protocol because of its end-to-end encryption and ubiquity.
There are many other protocols that we haven't covered that are equally important. However, this should give you a good overview of some of the fundamental technologies that make the internet and networking possible.

Conclusion
At this point, you should be familiar with some basic networking terminology and be able to understand how different components are able to communicate with each other. This should assist you in understanding other articles and the documentation of your system.

Tuesday, 22 December 2015

                        Bluetooth

Bluetooth technology is the global wireless standard enabling the Internet of Things (IoT).
Created in 1994, Bluetooth® technology was conceived as a wireless alternative to data cables by exchanging data using radio transmissions.  Bluetooth technology was created as an open standard to allow connectivity and collaboration between disparate products and industries.

Bluetooth allows high quality streaming

One of the most popular applications for Bluetooth historically has been wireless audio—headsets and hands-free connectivity in cars to wireless speakers and headphones that stream music from your phone or tablet. This uses a version of Bluetooth called BR/EDR (bit rate/enhanced data rate) that is optimized for sending a steady stream of high quality data (.

Bluetooth Smart allows creation of smaller sensors

With the advent of Bluetooth Smart (BLE or low energy), developers are now able to create small sensors that run off tiny coin-cell batteries for months, and in some cases, years. Many of these Bluetooth sensors use so little energy that developers are starting to find ways to use scavenged energy, like solar and kinetic, to power them—a potentially unlimited life from a power perspective. This allows you to find Bluetooth technology in billions of devices today, everything from phones to headsets to basketballs and socks—the use cases are limited only by a developer’s imagination.
BR/EDR and Bluetooth Smart are fundamentally different. Bluetooth Smart is not only low energy but, even more importantly, built on an entirely new development framework using Generic Attributes, or GATT. GATT is extremely flexible from a developer’s perspective and can be used for just about any scenario.  As a result, Bluetooth Smart not only connects devices together in an ultra-power efficient way, but also directly connects devices to applications on your smartphone, PC or tablet. It’s the low energy and GATT features which are at the heart of the current IoT boom. They are also at the heart of Bluetooth, making Bluetooth Smart the perfect fit for the IoT.

Bluetooth SIG works to ensure interoperability

Bluetooth technology is built upon a core specification and layered with different services.

Bluetooth Technology Basics

How does Bluetooth work?A Bluetooth device uses radio waves instead of wires or cables to connect to a phone or computer. A Bluetooth product, like a headset or watch, contains a tiny computer chip with a Bluetooth radio and software that makes it easy to connect. When two Bluetooth devices want to talk to each other, they need to pair. Communication between Bluetooth devices happens over short-range, ad hoc networks known as piconets. A piconet is a network of devices connected using Bluetooth technology. The network ranges from two to eight connected devices. When a network is established, one device takes the role of the master while all the other devices act as slaves. Piconets are established dynamically and automatically as Bluetooth devices enter and leave radio proximity. 
Are there different kinds of Bluetooth?There are actually several “kinds”—different versions of the core specification—of Bluetooth. The most common today are Bluetooth BR/EDR (basic rate/enhanced data rate) and Bluetooth Low Energy (low energy). You will generally find BR/EDR in things like speakers and headsets while you will see Bluetooth Smart in the newest products on the market like fitness bands, beacons—small transmitters that send data over Bluletooth—and smart home devices.
What can Bluetooth do?Bluetooth can wirelessly connect devices together. It can connect your headset to your phone, car or computer. It can connect your phone or computer to your speakers. Best of all? It can connect your lights, door locks, TV, shoes, basketballs, water bottles, toys—almost anything you can think of—to an app on your phone. Bluetooth takes it even further with connecting beacons to shoppers or travelers in airports or even attendees at sporting events. The future of Bluetooth is limited only to a developer’s imagination.
What makes Bluetooth better than other technologies?The short answer is because Bluetooth is everywhere, it operates on low power, it is easy to use and it doesn’t cost a lot to use. Let’s explore these a bit more.
  • Bluetooth is everywhere—you will find Bluetooth built into nearly every phone, laptop, desktop and tablet. This makes it so convenient to connect a keyboard, mouse, speakers or fitness band to your phone or computer. 
  • Bluetooth is low power—with the advent of Bluetooth Smart (BLE or Bluetooth low energy), developers were able to create smaller sensors that run off tiny coin-cell batteries for months, and in some cases, years. This is setting the stage for Bluetooth as a key component in the Internet of Things.
  • Bluetooth is easy to use—for consumers, it really can’t get any easier. You go to settings, turn on your Bluetooth, hit the pairing button and wait for it start communicating. That’s it. From a development standpoint, creating a Bluetooth product starts with the core specification and then you layer profiles and services onto it. There are several tools that the SIG has to help developers.
  • Bluetooth is low cost—you can add Bluetooth for a minimal cost. You will need to buy a module/system on chip (SoC)/etc. and pay an administrative fee to use the brand and license the technology. The administrative fee varies on the size of the company and there are programs to help startups. 

Saturday, 28 November 2015

A Deeper Dive into Fibre-Optic Communication.

Fibre-optic communication is a method of transmitting information from one place to another by sending pulses of light through an optical fibre. The light forms an electromagnetic carrier wave that is modulated to carry information. First developed in the 1970s, fibre-optic communication systems have revolutionized the telecommunications industry and have played a major role in the advent of the Information Age. Because of its advantages over electrical transmission, optical fibres have largely replaced copper wire communications in core networks in the developed world. Optical fibre is used by many telecommunications companies to transmit telephone signals, Internet communication, and cable television signals. Researchers at Bell Labs have reached internet speeds of over 100 petabit×kilometer per second using fibre-optic communication.

The process of communicating using fibre-optics involves the following basic steps: Creating the optical signal involving the use of a transmitter, relaying the signal along the fibre, ensuring that the signal does not become too distorted or weak, receiving the optical signal, and converting it into an electrical signal.

Modern fibre-optic communication systems generally include an optical transmitter to convert an electrical signal into an optical signal to send into the optical fibre, a cable containing bundles of multiple optical fibres that is routed through underground conduits and buildings, multiple kinds of amplifiers, and an optical receiver to recover the signal as an electrical signal. The information transmitted is typically digital information generated by computers, telephone systems, and cable television companies.

Transmitter:

The most commonly used optical transmitters are semiconductor devices such as light-emitting diodes (LEDs) and laser diodes. The difference between LEDs and laser diodes is that LEDs produce incoherent light, while laser diodes produce coherent light. For use in optical communications, semiconductor optical transmitters must be designed to be compact, efficient, and reliable, while operating in an optimal wavelength range, and directly modulated at high frequencies.

In its simplest form, a LED is a forward-biased p-n junction, emitting light through spontaneous emission, a phenomenon referred to as electroluminescence. The emitted light is incoherent with a relatively wide spectral width of 30-60 nm. LED light transmission is also inefficient, with only about 1% of input power, or about 100 microwatts, eventually converted into launched power which has been coupled into the optical fibre. However, due to their relatively simple design, LEDs are very useful for low-cost applications.

Today, LEDs have been largely superseded by VCSEL (Vertical Cavity Surface Emitting Laser) devices, which offer improved speed, power and spectral properties, at a similar cost. Common VCSEL devices couple well to multi-mode fibre.

A semiconductor laser emits light through stimulated emission rather than spontaneous emission, which results in high output power (~100 mW) as well as other benefits related to the nature of coherent light. The output of a laser is relatively directional, allowing high coupling efficiency (~50 %) into single-mode fibre. The narrow spectral width also allows for high bit rates since it reduces the effect of chromatic dispersion. Furthermore, semiconductor lasers can be modulated directly at high frequencies because of short recombination time.


A GBIC module (shown here with its cover removed), is an optical and electrical transceiver. The electrical connector is at top right, and the optical connectors are at bottom left.








 Receivers:

The main component of an optical receiver is a photodetector, which converts light into electricity using the photoelectric effect. The primary photodetectors for telecommunications are made from Indium gallium arsenide the photodetector is typically a semiconductor-based photodiode. Several types of photodiodes include p-n photodiodes, p-i-n photodiodes, and avalanche photodiodes. Metal-semiconductor-metal (MSM) photodetectors are also used due to their suitability for circuit integration in regenerators and wavelength-division multiplexers.

Optical-electrical converters are typically coupled with a Trans impedance amplifier and a limiting amplifier to produce a digital signal in the electrical domain from the incoming optical signal, which may be attenuated and distorted while passing through the channel. Further signal processing such as clock recovery from data (CDR) performed by a phase-locked loop may also be applied before the data is passed on.

Fibre cable types:

An optical fibre cable consists of a core, cladding, and a buffer (a protective outer coating), in which the cladding guides the light along the core by using the method of total internal reflection. The core and the cladding (which has a lower-refractive-index) are usually made of high-quality silica glass, although they can both be made of plastic as well. Connecting two optical fibres is done by fusion splicing or mechanical splicing and requires special skills and interconnection technology due to the microscopic precision required to align the fibre cores.

Two main types of optical fibre used in optic communications include multi-mode optical fibres and single-mode optical fibres. A multi-mode optical fibre has a larger core (≥ 50 micrometres), allowing less precise, cheaper transmitters and receivers to connect to it as well as cheaper connectors. However, a multi-mode fibre introduces multi-mode distortion, which often limits the bandwidth and length of the link. Furthermore, because of its higher dopant content, multi-mode fibres are usually expensive and exhibit higher attenuation. The core of a single-mode fibre is smaller (<10 micrometres) and requires more expensive components and interconnection methods, but allows much longer, higher-performance links.

In order to package fibre into a commercially viable product, it typically is protectively coated by using ultraviolet (UV), light-cured acrylate polymers, then terminated with optical fibre connectors, and finally assembled into a cable. After that, it can be laid in the ground and then run through the walls of a building and deployed aerially in a manner similar to copper cables. These fibres require less maintenance than common twisted pair wires, once they are deployed.

Specialized cables are used for long distance sub-sea data transmission, e.g. transatlantic communications cable. 2011–2013 cables operated by commercial enterprises typically have four strands of fibre and cross the Atlantic in 60-70 ms. Cost of each such cable was about $300M in 2011.

Another common practice is to bundle many fibre optic strands within long-distance power transmission cable. This exploits power transmission rights of way effectively, ensures a power company can own and control the fibre required to monitor its own devices and lines, is effectively immune to tampering, and simplifies the deployment of smart grid technology.



Multi-mode optical fibre in an underground service pit.










Amplifier:

The transmission distance of a fibre-optic communication system has traditionally been limited by fibre attenuation and by fibre distortion. By using opto-electronic repeaters, these problems have been eliminated. These repeaters convert the signal into an electrical signal, and then use a transmitter to send the signal again at a higher intensity than was received, thus counteracting the loss incurred in the previous segment. Because of the high complexity with modern wavelength-division multiplexed signals (including the fact that they had to be installed about once every 20 km), the cost of these repeaters is very high.
An alternative approach is to use an optical amplifier, which amplifies the optical signal directly without having to convert the signal into the electrical domain. It is made by doping a length of fibre with the rare-earth mineral erbium, and pumping it with light from a laser with a shorter wavelength than the communications signal (typically 980 nm). Amplifiers have largely replaced repeaters in new installations.

Wavelength-division multiplexing:

Wavelength-division multiplexing (WDM) is the practice of multiplying the available capacity of optical fibres through use of parallel channels, each channel on a dedicated wavelength of light. This requires a wavelength division multiplexer in the transmitting equipment and a de-multiplexer (essentially a spectrometer) in the receiving equipment. Arrayed wave-guide gratings are commonly used for multiplexing and de-multiplexing in WDM. Using WDM technology now commercially available, the bandwidth of a fibre can be divided into as many as 160 channels to support a combined bit rate in the range of 1.6 Tbit/s.