Wednesday 17 October 2018

what is vpn and how it works

Short Bytes: VPN is a technology used to setup a private network over the internet to share the resources of a corporate intranet with remote users and other office locations of the company.  People can also use VPN to access their home network.
Virtual Private Network, or VPN, is a personal network created over the internet The devices connected to a VPN can have a continuous communication, regardless of any physical or digital barriers in the mid-way.
A VPN is like your private lounge on the internet where you can hang out without interference from other people. It allows you access your home network or the corporate network of your company even if you’re in some other corner of the world.

Two Types of VPNs

Mainly, VPNs are of two kinds, namely, Remote Access VPN and Site-to-Site VPN. The second kind site-to-site virtual private networks have further sub-types.

Remote Access VPN

When we talk about Remote Access VPN, we are talking about giving someone access to an existing private network over the internet. The private network can be a network setup by some corporate organization equipped with database and network hardware related to the organization or any of their project.
Because of remote access VPN, there is no need for an employee to connect to his company’s network directly. He can do so with the help of necessary VPN client software and credentials given by the firm.
Remote Access VPNs aren’t the buzzwords for the corporate sector only. Home users can also leverage them. For instance, you can setup a virtual private network at your home and use the credentials to access it from somewhere else. This way, the websites you visit will see the IP address of your home network rather than your actual IP address.
Moreover, most of the VPN services you see in the market are an example of remote access VPN. These services mainly help people eliminate geographical restrictions on the internet. These limitations are probably there because of government-led blocking, or if a website or service is not accessible in a particular region.

Site-to-Site VPN

The word ‘site’ in this case refers to the physical location where a private network exists. It is also known as LAN-to-LAN or Router-to-Router VPN. In this type, two or more private networks in different parts of the world are connected to each other over the network, all serving as one single virtual private network on the internet. Now, there are two sub-kinds of site-to-site virtual private networks.

Intranet Site-to-Site VPN:

We call it intranet site-to-site VPN when different private networks of a single organization are clubbed together over the internet. The can be used to share resources across various office locations of the company. One other possible way would be laying separate cable across different office locations, but that won’t be feasible and might incur high costs.

Extranet Site-to-Site VPN:

There can be a need to connect the corporate networks belonging to different organizations. They might be collaborating on a project involving resources from both the organizations. Such virtual private networks created are known as extranet site-to-site VPNs.

How does a VPN work?

The working of VPN is not a terrible deal to understand, though it is. But, before that, you need to get an idea of the protocols, or set of rules in laymen terms, used by VPN in providing a secure personal network.
SSL (Secured Socket Layer): It uses a 3-way handshake method for assuring proper authentication between the client and server machines. The authentication process is based on cryptography where certificates, behaving as cryptographic keys already stored on the client and server sides, are used for initiating the connection.
IPSec (IP Security): This protocol can work in transport mode or tunneling mode so that it can do its job of securing the VPN connection. The two modes differ in the sense that the transport mode only encrypts the Payload in the data, i.e. only the message present in the data. The tunneling mode encrypts the entire data to be transmitted.
PPTP (Point-To-Point Transfer Protocol):It connects a user located at some remote location with a private server in a VPN network, and also uses the tunneling mode for its operations. Low maintenance and simple working make PPTP a widely adopted VPN protocol. Further credit goes to the inbuilt support provided by Microsoft Windows.
L2TP (Layer Two Tunnelling Protocol): It facilitates the tunneling of data between two geographical sites over the VPN network, often used in combination with the IPSec protocol which further aids to the security layer of the communication.
So, you have a rough idea about the various protocols used in a VPN. We shall proceed further and see how it works. When you connect to a public network, for example, free WiFi networks at airports, you can assume that all your data is flowing through a big tunnel along with the data of other users.
So, anyone who wants to spy on you can easily sniff your data packets from the network. When VPN comes into the scene, it provides you a secret tunnel inside that big tunnel. And all your data is transformed into garbage values so that no one can recognize it.

How does DTH work?

OK dear friend you'll find this interesting ...
Satellites are about 36,686 kms above earth's sea level at Geo- Synchronized (which follows the axial rotation of earth) orbit 
Now, as earth complete s its one rotation in 24 hours simultaneously the satellite also moves with it and complete its revolution around earth in 24 hours as well ,being dedicated telebroadcasting ones they can now transmit the signal and which is received by dish antenna kept on our terrace making it a DTH Direct to Home.

For simplicity imagine the phenomenon of Sunflower following the movement of Sun . In our case earth's motion is followed by the satellites.

I hope this brings some clarity to you.

Image http://www.radio-electronics.com/

How GPS System Works?

What is GPS?

GPS or Global Positioning System is a satellite navigation system that furnishes location and time information in all climate conditions to the user. GPS is used for navigation in planes, ships, cars and trucks also. The system gives critical abilities to military and civilian users around the globe. GPS provides continuous real time, 3-dimensional positioning, navigation and timing worldwide.

How does GPS System Work?

The GPS system consists of three segments:
1) The space segment: the GPS satellites
2) The control system, operated by the U.S. military,
 3) The user segment, which includes both military and civilian users and their GPS equipment.

Space Segment:

The space segment is the number of satellites in the constellation. It comprises of 29 satellites circling the earth every 12 hours at 12,000 miles in altitude. The function of the space segment is utilized to route/navigation signals and to store and retransmit the route/navigation message sent by the control segment. These transmissions are controlled by highly stable atomic clocks on the satellites. The GPS Space Segment is formed by a satellite constellation with enough satellites to ensure that the users will have, at least, 4 simultaneous satellites in view from any point at the Earth surface at any time.

GPSControl Segment:

The control segment comprises of a master control station and five monitor stations outfitted with atomic clocks that are spread around the globe. The five monitor stations monitor the GPS satellite signals and then send that qualified information to the master control station where abnormalities are revised and sent back to the GPS satellites through ground antennas. Control segment also referred as monitor station.

User Segment:

The user segment comprises of the GPS receiver, which receives the signals from the GPS satellites and determine how far away it is from each satellite. Mainly this segment is used for the U.S military, missile guidance systems, civilian applications for GPS in almost every field. Most of the civilian uses this from survey to transportation to natural resources and from there to agriculture purpose and mapping too.
User segment
User segment

How GPS Determines a Position:

The working/operation of Global positioning system is based on the ‘trilateration’ mathematical principle. The position is determined from the distance measurements to satellites. From the figure, the four satellites are used to determine the position of the receiver on the earth. The target location is confirmed by the 4th satellite. And three satellites are used to trace the location place. A fourth satellite is used to confirm the target location of each of those space vehicles. Global positioning system consists of satellite, control station and monitor station and receiver. The GPS receiver takes the information from the satellite and uses the method of triangulation to determine a user’s exact position.
GPS Circuit

Data travel in computer

Representing Data

We have all seen computers do seemingly miraculous things with all kinds of sounds, pictures, graphics, numbers, and text. It seems that we can build a replica of parts of our world inside the computer. You might think that this amazing machine is also amazingly complicated - it really is not. In fact, all of the wonderful multi-media that we see on modern computers is all constructed from simple ON/OFF switches - millions of them - but really nothing much more complicated than a switch. The trick is to take all of the real-world sound, picture, number etc data that we want in the computer and convert it into the kind of data that can be represented in switches, as shown in Figure 1.
Figure 1: Representing Real-World Data In The Computer

Computers Are Electronic Machines. The computer uses electricity, not mechanical parts, for its data processing and storage. Electricity is plentiful, moves very fast through wires, and electrical parts fail less much less frequently than mechanical parts. The computer does have some mechanical parts, like its disk drive (which are often the sources for computer failures), but the internal data processing and storage is electronic, which is fast and reliable (as long as the computer is plugged in).
Electricity can flow through switches: if the switch is closed, the electricity flows; if the switch is open, the electricity does not flow. To process real-world data in the computer, we need a way to represent the data in switches. Computers do this representation using abinary coding system.


Binary and Switches. Binary is a mathematical number system: a way of counting. We have all learned to count using ten digits: 0-9. One probable reason is that we have ten fingers to represent numbers. The computer has switches to represent data and switches have only two states: ON and OFF. Binary has two digits to do the counting: 0 and 1 - a natural fit to the two states of a switch (0 = OFF, 1 = ON).
As you can read about in the part of this course on the history of computers, the evolution of how switches were built made computers faster, cheaper, and smaller. Originally, a switch was a vacuum tube, about the size of a human thumb. In the 1950's the transistor was invented (and won its inventors a Noble Prize). It allowed a switch to be the size of a human finger nail. The development of integrated circuits in the 1960s allowed millions of transistors to be fabricated on a silicon chip - which allowed millions of switches on something the size of a finger nail.


Bits and Bytes One binary digit (0 or 1) is referred to as a bit, which is short for binary digit. Thus, one bit can be implemented by one switch, as shown in Figure 2. 
Figure 2
.
In the following table, we see that bits can be grouped together into larger chunks to represent data.
0
1 bit
1
1 bit
0110
4 bits
01101011
8 bits
For several reasons which we do not go into here, computer designers use eight bit chunks called bytes as the basic unit of data. A byte is implemented with eight switches as shown in Figure 3.
Figure 3: Implementing a Byte
Computer manufacturers express the capacity of memory and storage in terms of the number of bytes it can hold. The number of bytes can be expressed as kilobytes. Kilo represents 2 to the tenth power, or 1024. Kilobyte is abbreviated KB, or simply K. (Sometimes K is used casually to mean 1000, as in "I earned $30K last year.") A kilobyte is 1024 bytes. Thus, the memory of a 640K computer can store 640x1024, or 655,360 bytes. Memory capacity may also be expressed in terms of megabytes (1024x1024 bytes). One megabyte, abbreviated MB, means, roughly, one million bytes. With storage devices, manufacturers sometimes express memory amounts in terms of gigabytes (abbreviated GB); a gigabyte is roughly a billion bytes. Memory in older personal computers may hold only 640K bytes; in newer machines, memory may hold anywhere from 1MB to 32MB and more. Mainframe memories can hold gigabytes. Modern hard disks hold gigabytes.

Representing Data In Bytes

Here is an important thing to keep in mind:
    A single byte can represent many different kinds of data. What data it actually represents depends on how the computer uses the byte.
For instance, the byte:
01000011
can represent the integer 67, the character 'C', the 67th decibel level for a part of a sound, the 67th level of darkness for a dot in a picture, an instruction to the computer like "move to memory", and other kinds of data too.

Integers. Integer numbers are represented by counting in binary.
Think for a minute how we count in decimal. We start with 0 and every new thing we count, we go to the next decimal digit. When we reach the end of the decimal digits (9), we use two digits to count by putting a digit in the "tens place" and then starting over again using our 10 digits. Thus, the decimal number 10 is a 1 in the "tens place" and a zero in the "ones place". Eleven is a 1 in the "tens place" and a 1 in the "ones place". And so on. If we need three digits, like 158, we use a third digit in the "hundred's place".
We do a similar thing to count in binary - except now we only have two digits: 0 and 1. So we start with 0, then 1, then we run out of digits, so we need to use two digits to keep counting. We do this by putting a 1 in the "two's place" and then using our two digits. Thus two is 10 binary: a 1 in the "two's place" and a 0 is the "one's place". Three is 11: a 1 in the "two's place" and a 1 in the "one's place". We ran out of digits again! Thus, four is 100: a one in the "four's place" a 0 in the "two's place" a 0 in the "one's place".
What "places" we use depends on the counting system. In our decimal system, which we call Base 10, we use powers of 10. Ten to the zero power is 1, so the counting starts in the "one's place". Ten to the one power is 10, so the counting continues in the "ten's place". Ten to the second power (10 squared) is 100, so we continue in the "hundred's place". And so on. Binary is Base 2. Thus, the "places" are two to the zero power ("one's place"), two to the one power ("two's place"), two to the second power ("four's place"), two to the third power ("eight's place"), and so on.
When you look at a byte, the rightmost bit is the "one's place". The next bit is the "two's place". The next the "four's place", The next the "eight's place" and so on. So, when we said that the byte:
01000011
represents the decimal integer 67, we got that by adding up a 1 in the "ones place" and 1 in the "two's place" and a 1 in the "64's place" (two to the 6 power is 64). Add them up 1+2+64= 67. The largest integer that can represented in one byte is:
11111111
which is 128+64+32+16+8+4+2+1 = 255. Thus, the largest decimal integer you can store in one byte is 255. Computers use several bytes together to store larger integers.
The following table shows some binary counting:
Numbers, as known in the decimal-system
Same numbers in binary system
0
0
1
1
2
10
3
11
4
100
5
101
6
110
7
111
8
1000
For some optional exercises and more detail on binary numbers, try the exercises at http://www.learnbinary.com (follow the tab links along the top of the banner.).

Characters. The computer also uses a single byte to represent a single character. But just what particular set of bits is equivalent to which character? In theory we could each make up our own definitions, declaring certain bit patterns to represent certain characters. Needless to say, this would be about as practical as each person speaking his or her own special language. Since we need to communicate with the computer and with each other, it is appropriate that we use a common scheme for data representation. That is, there must be agreement on which groups of bits represent which characters.
The code called ASCII (pronounced "AS-key"), which stands for American Standard Code for Information Interchange, uses 7 bits for each character. Since there are exactly 128 unique combinations of 7 bits, this 7-bit code can represent only characters. A more common version is ASCII-8, also called extended ASCII, which uses 8 bits per character and can represent 256 different characters. For example, the letter A is represented by 01000001. The ASCII representation has been adopted as a standard by the U.S. government and is found in a variety of computers, particularly minicomputers and microcomputers. The following table shows part of the ASCII-8 code. Note that the byte:
01000011
does represent the character 'C'.
Character
Bit pattern
Byte
number
 
Character
Bit pattern
Byte
number
A
01000001
65
 
¼
10111100 
 188
B
01000010
66
 
.
00101110 
 46
C
01000011
67
 
:
00111010
 58
a
01100001
97
 
$
00100100 
 36
b
01100010
98
 
\
01011100
 92
o
01101111
111
 
~
01111110
 126
p
 01110000
112
 
1
00110001
49
q
 01110001
 113
 
2
00110010
50
r
 01110010
 114
 
9
00111001
57
x
 01111000
120
 
©
 10101001
 169
y
 01111001
 121
 
>
00111110
 62
z
 01111010
 122
 
 �
 10001001
 137

If you are really interested, the entire ASCII-8 table is here.
Thus, when you type a 'C' on the keyboard, circuitry on the keyboard and in the computer converts the 'C' to the byte:
01000011
and stores the letter in the computer's memory as well as instructing the monitor to display it. Figure 4 shows converting to ASCII and Figure 5 shows the byte going through the computer's processor to memory.
Figure 4: Character As a ByteFigure 5: Character Byte Stored In Memory
If the person typed the word "CAB", it would be represented by the following three bytes in the computer's memory (think of it as three rows of eight switches in memory being ON or OFF):
01000011
C
01000001
A
01000010
B

Picture and Graphic Data. You have probably seen photographs that have been enlarged a lot, or shown close up - you can see that photographs are a big grid of colored dots. Computer graphic data like pictures, frames of a movie, drawings, or frames of an animation are represented by a grid of pixels. "Pixel" is short for picture element. In simple graphics (those without many colors), a byte can represent a single pixel. In a graphic representation called greyscale each pixel is a shade of grey from black at one extreme to white at the other. Since eight bytes can hold 256 different integers (0-255 as described a few paragraphs ago), a pixel in one byte can be one of 256 shades of grey (usually with 0 being white and 255 being black). Modern video games and colorful graphics use several bytes for each pixel (Nintendo 64 uses eight bytes = 64 bits for each pixel to get a huge array of possible colors). A scanned photograph or a computer drawing is thus stored as thousands of bytes - each byte, or collection of bytes, representing a pixel. This is shown in Figure 6.
We saw that computer manufacturers got together and agreed how characters will be represented (the ASCII code). For graphics, there are several similar standards or formats. Two common picture formats used on the Internet are JPEG and GIF. These, like ASCII, are agreed-upon common coding of pixels in bytes.
Figure 6: Graphics as a Collection of Pixel Bytes

Sound Data As Bytes. Sound occurs naturally as an analog wave, as shown in Figure 7.
Figure 7: Sound Data In Bytes
Most current electronic speakers, the means that we use to electronically reproduce sound, also produce analog waves. However, as we have seen, all data in the computer is digital and must be processed in bytes. The process of taking analog data, such as sound, and making it digital is called analog to digital conversion. Many music CD's from old original analog recordings on tapes were converted to digital to be placed on a CD (a CD is digital; it is just a collection of bits with a small hole burned in the CD representing a 1 and no hole representing a 0). Current music CD's have the analog to digital conversion done in the recording equipment itself, which produces better conversion.
To convert an analog wave into digital, converters use a process called sampling. They sample the height of the sound wave at regular intervals of time, often small fractions of a second. If one byte is used to hold a single sample of an analog wave, then the wave can be one of 256 different heights (0 being the lowest height and 255 being the highest). These heights represent the decibel level of the sound. Thus a spoken word might occupy several hundred bytes - each being a sample of the sound wave of the voice at a small fraction of a second. If these 100 bytes were sent to a computer's speaker, the spoken word would be reproduced.
Like ASCII for characters and GIF and JPEG for pictures, sound has several agreed-upon formats for representing samples in bytes. WAV is a common format on the Internet.

Program Data as Bytes. When you buy a piece of software on a CD or diskette, you are getting a collection of instructions that someone wrote to tell the computer to perform the task that the software is meant to do. Each instruction is a byte, or a small collection of bytes. If a computer used one byte for an instruction, it could have up to 256 instructions. Later we will look at what these instructions are, but for now, you should realize that a byte could also be a computer's instruction. The conversion of instructions to bytes is shown in Figure 8. The programming process allows humans to write instructions in an English-like way. A software program called a compiler then transforms the English-like text into the bytes for instructions that the computer understands. This is shown in Figure 9.
Like all other kinds of data, there are agreed-upon formats for computer instructions too. One reason that Macintosh computer programs do not run natively on PC-compatible (Intel-based) computers, is that Macintoshes and Intel PCs use different formats for coding instructions in bytes.
Figure 8: Instruction Data as a Byte


Figure 9

How Does The Computer Know What a Byte Represents?

We have seen that the byte:
01000011
can represent the integer 67, the character 'C', a pixel with darkness level 67, a sample of a sound with decibel level 67, or an instructions. There are other types of data that a byte can represent too. If that same byte can be all of those different types of data, how does the computer know what type it is? The answer is the context in which the computer uses the byte. If it sends the byte to a speaker, the 67th level of sound is produced. If it sends the byte to a monitor or printer, a pixel with the 67th level of darkness is produced, etc. More accurately, if the byte were coded with a standard coding technique, like ASCII for characters, GIF for pictures, and WAV for sounds, then when the computer sends the byte to a device, the data corresponding to that coding is produced by the device.

Barcode

What is a Barcode?

A barcode is a square or rectangular image consisting of a series of parallel black lines and white spaces of varying widths that can be read by a scanner. Barcodes are applied to products as a means of quick identification. They are used in retail stores as part of the purchase process, in warehouses to track inventory, and on invoices to assist in accounting, among many other uses.

Two Kinds of Barcodes

There are two general types of barcodes: 1-dimensional (1D) and 2-dimensional (2D).
1D barcodes are a series of lines used to store text information, such as product type, size, and color. They appear in the top part of universal product codes (UPCs) used on product packaging, to help track packages through the U.S. Postal Service, as well as in ISBN numbers on the back of books.
2D barcodes are more complex and can include more information than just text, such as the price, quantity, and even an image. For that reason, linear barcode scanners can’t read them, though smartphones and other image scanners will.
There are more than a dozen barcode variations, however, depending on the application.

Barcode History

The concept for the barcode was developed by Norman Joseph Woodland, who drew a series of lines in the sand to represent Morse code, and Bernard Silver. A patent was granted in 1966 and NCR became the first company to develop a commercial scanner to read barcode symbology. A pack of Wrigley’s gum was the first item ever scanned, at Marsh’s supermarket in Troy, Ohio, NCR’s hometown.

Business Benefits

Barcodes were developed to improve the speed of sales transactions, but there are other potential benefits to businesses, including: 
  • Better accuracy - Relying on a barcode to process data is far more accurate than relying on manually-entered data, which is prone to errors.
  • Data is immediately available - Because of the processing speed, information about inventory levels or sales is available in real time.
  • Reduced training requirements - Thanks to the simplicity of the barcode scanner, employees need little in the way of training in how to use it. Additionally, thanks to barcodes, there is much less for employees to have to learn and retain.
  • Improved inventory control - Being able to scan and track inventory yields a much more accurate count, as well as a better calculation of inventory turn. Companies can hold less inventory when they know how soon they will need it.
  • Low cost implementation- Generating barcodes is quick and easy, as is installing a barcode system. Potential savings can be realized almost immediately.