Showing posts with label Tutorials. Show all posts
Showing posts with label Tutorials. Show all posts

VNC Basics

Virtual Network Computing, or "VNC," is software used to connect remotely to a computer system. This allows a user to see and control one computer from multiple locations. Because this control is transmitted over the Internet, the computer can be viewed from anywhere in the world.

VNC software is fairly uncomplicated and easy to use. Many operating systems, including Microsoft Windows, already include simple VNC programs. These applications allow users to connect remotely and operate another computer loaded with the same software.

VNCs allow computers to become remotely sharable. This means that several different users, each in separate locations, can view a computer desktop at the same time. VNC software makes training, monitoring and troubleshooting easy by making remote access flexible.

VNC Interface

Most VNC systems are controlled from a simple graphic user interface. Once the software has been installed on a remote computer, it can be accessed from any location. A server constantly monitors inputs and outputs from one computer, and updates them to the second location.

The interface for most VNCs can operate from any operating system, such as Windows, Macintosh, or Unix. Because information is transmitted over the Internet, the system eliminates many of the traditional cross-platform problems. Just as a website can be viewed on many different operating systems, so can VNC control operate from many different computer types. While "VNC" is a generic term for this type of software, many brands of the software exist, with packages available for all major operating systems.

The connection used to interface data is protected by a password. This prevents unauthorized users from controlling a remote computer. Once the connection is established, information begins to be exchanged. Details on mouse location, keyboard entry, and screen updates are fed over the secure connection, keeping the computers synchronized.

VNC Uses

VNC software began as a way to monitor and troubleshoot systems remotely, and this feature remains a common use. Computer technicians can provide tech support using VNC without being physically present. If a user is having a problem installing software, for example, a support professional can connect to her computer, see the problem, and talk the user through the solution.

Use of VNC software has also expanded to other areas. Remote work has become an increasingly popular option. VNC allows workers to access and control software without being in the office. For instance, using VNC, a programmer in India can easily control a desktop computer in California, collaborating with colleagues and working on a project remotely.

Overview

VNC consists of two components. A server, which runs on the computer you want to remotely access, and a viewer, which runs on the computer you are sitting in front of. There are two important features of VNC:
  • The server and the viewer may be on different machines and on types of computer. The protocol which connects the server and viewer is simple, open, and platform independent.
  • No state is stored at the viewer. Breaking the viewer's connection to the server and then reconnecting will not result in any loss of data. Because the connection can be remade from somewhere else, you have easy mobility.
So to get started with VNC you need to run a server, and then connect to it with a viewer. First of all, you have to download and install the software on the platforms you want to use. The screenshots on this page refer to VNC Free Edition 4.1, but the general concepts apply to all versions of Free Edition and Enterprise Edition.

Networking

VNC software requires a TCP/IP connection between the server and the viewer. This is the standard networking protocol on LANs, WANs, broadband and dialup ISP. Each computer has a unique IP address and may also have a name in the DNS. You will need to know the IP address or name of the server when you connect a viewer to it.
Sometimes the IP address is fixed, and sometimes it is issued to you dynamically by your ISP. If it is allocated dynamically, you might consider using a third party DNS management service. Try typing "dynamic dns management service" into a google.

Running a Windows server

Installing the Windows server, WinVNC, should create a RealVNC group in your Start... menu. Run the VNC server.

If this is the first time you've used a VNC server on this machine you'll be prompted to set a password, which you'll need when you connect to the machine from a remote location. A small icon will appear in the system tray, and by right-clicking on this you can control most aspects of the server.

winvnc4_traymenu

The IP address of the computer running the VNC server can be found by hovering over the tray icon in the system tray. Unless this computer has a DNS name, you will need to specify this number to the viewer when you connect.

winvnc4_ipaddr

You can now go to another machine and connect a viewer to the server.

Running a Unix server

To X applications, a VNC server appears just like the standard X display you sit in front of, but without a physical screen attached. The applications don't know this, they just carry on running whether or not a viewer is connected. You can start a new VNC server on a Unix machine by typing:
 
vncserver

If you haven't run a VNC server before you will be prompted for a password, which you will need to use when connecting to this server. All your servers on the same Unix machine will use the same password, and you can change it at a later date using
 
vncpasswd

With a normal X system, the main X display of a workstation called ’snoopy’ is usually snoopy:0. You can also run as many VNC servers on a Unix machine as you like, and they will appear as snoopy:1, snoopy:2 etc, as if they were just additional displays. Normally vncserver will choose the first available display number and tell you what it is, but you can specify a display number if you always wish to use the same one:
vncserver :2

You can cause applications to use a VNC server rather than the normal X display them by setting the DISPLAY environment variable to the VNC server you want, or by starting the application with the -display option.

For example:
xterm -display snoopy:2 &
You can kill a Unix VNC server using, for example:
vncserver -kill :2

Full instructions for installing and running VNC server for Unix can be found in the RealVNC Site documentation.
Nothing will appear immediately as a result of starting a Unix VNC server. To see anything you need to connect a viewer to the server, see below.

Running a viewer

You can run the Windows viewer the RealVNC group on the Start... menu.
winvncviewer4_startmenu

In this case, you will be prompted for the host name (VNC server name) and display number:


winvncviewer4_display

Enter it and click OK, and you will be prompted for your password, after which you should see the remote display. If you are connecting to a Windows or Mac server, the display number will be 0 unless you have explicitly changed it, and can be omitted.

You can run the viewer on Unix and Windows by typing at the command line:
vncviewer snoopy:2

You need to specify the name of the VNC server and the number of the desktop. If, for example, you have started a server as display 2 on a machine called 'snoopy'. Remember that if you are connecting to a Windows or Mac server, the display number will be 0 unless you have explicitly changed it, and can be omitted.

If the machine running the server does not have a DNS entry, you probably won't be able to use the name and will have to replace snoopy with its IP address, for example something that looks like 123.456.78.9.

Using a web browser as a viewer

The VNC servers also contain a small web server. If you connect to this with a web browser, you can download the Java version of the viewer, and use this to view the server. You can then see your desktop from any Java-capable browser, unless you are using a proxy to connect to the web. The server listens for HTTP connections on port 5800+display number. So to view display 2 on machine 'snoopy', you would point your web browser at:

http://snoopy:5802/

The applet will prompt you for your password, and should then display the desktop.
 


IPv6 is the next generation protocol for Internet networking. IPv6 expands on the current Internet Protocol standard known as IPv4. Compared to IPv4, IPv6 offers better addressing, security and other features to support large worldwide networks.

In IPv6, IP addresses change from the current 32-bit standard and dotted decimal notation to a new 128-bit address system. IPv6 addresses remain backward compatible with IPv4 addresses. For example, the IPv4 address "192.168.100.32" may appear in IPv6 notation as "0000:0000:0000:0000:0000:0000:C0A8:6420" or "::C0A8:6420".

The most obvious benefit of IPv6 is the exponentially greater number of IP addresses it can support compared to IPv4. Many countries outside the U.S. suffer from a shortage of IP addresses today. Because IPv6 and IPv4 protocols coexist, those locales with an address shortage can easily deploy new IPv6 networks that work with the rest of the Internet. Experts believe it will take many more years before all networks fully change over to IPv6.

Other benefits of IPv6 are less obvious but equally important. The internals of the IPv6 protocol have been designed with scalability and extensibility in mind. This will allow many different kinds of devices besides PCs, like cell phones and home appliances, to more easily join the Internet in future.
An IP address is a logical address for a network adapter. The IP address uniquely identifies computers on a TCP/IP network.

An IP address can be private - for use on a local area network (LAN) - or public - for use on the Internet or other wide area network (WAN). IP addresses can be determined statically (assigned to a computer by a system administrator) or dynamically (assigned by another device on the network on demand).

Two IP addressing standards are in use today. The IPv4 standard is most familar to people and supported everywhere on the Internet, but the newer IPv6 standard is planned to replace it and starting to be deployed.

IPv4 addresses consist of four bytes (32 bits). Each byte of an IP address is known as an octet. Octets can take any value between 0 and 255. Various conventions exist for the numbering and use of IP addresses.

Common IP (IPv4) Addresses -
  • 10.0.0.1
  • 127.0.0.1
  • 192.168.0.1
  • 192.168.1.1
  • 192.168.2.1
FTP allows you to transfer files between two computers on the Internet. FTP is a simple network protocol based on Internet Protocol and also a term used when referring to the process of copying files when using FTP technology.

To transfer files with FTP, you use a program often called the "client." The FTP client program initiates a connection to a remote computer running FTP "server" software. After the connection is established, the client can choose to send and/or receive copies of files, singly or in groups.

To connect to an FTP server, a client requires a username and password as set by the administrator of the server. Many public FTP archives follow a special convention for that accepts a username of "anonymous."

Simple FTP clients are included with most network operating systems, but most of these clients (such as FTP.EXE on Windows) support a relatively unfriendly command-line interface. Many alternative freeware / shareware third-party FTP clients have been developed that support graphic user interfaces (GUIs) and additional convenience features. In any FTP interface, clients identify the FTP server either by its IP address (such as 192.168.0.1) or by its host name.

FTP supports two modes of data transfer: plain text (ASCII), and binary. You set the mode in the FTP client. A common error when using FTP is attempting to transfer a binary file (such as a program or music file) while in text mode, causing the transfered file to be unusable.

The IPv6 Address Space

The most obvious distinguishing feature of IPv6 is its use of much larger addresses. The size of an address in 

IPv6 is 128 bits, which is four times the larger than an IPv4 address. A 32-bit address space allows for 232 or 4,294,967,296 possible addresses. A 128-bit address space allows for 2128 or 340,282,366,920,938,463,463,374,607,431,768,211,456 (or 3.4´1038 or 340 undecillion) possible addresses.

In the late 1970s when the IPv4 address space was designed, it was unimaginable that it could be exhausted. 

However, due to changes in technology and an allocation practice that did not anticipate the recent explosion of hosts on the Internet, the IPv4 address space was consumed to the point that by 1992 it was clear a replacement would be necessary.

With IPv6, it is even harder to conceive that the IPv6 address space will be consumed. To help put this number in perspective, a 128-bit address space provides 655,570,793,348,866,943,898,599 (6.5´1023) addresses for every square meter of the Earth’s surface.

It is important to remember that the decision to make the IPv6 address 128 bits in length was not so that every square meter of the Earth could have 6.5´1023 addresses. Rather, the relatively large size of the IPv6 address is designed to be subdivided into hierarchical routing domains that reflect the topology of the modern-day Internet. The use of 128 bits allows for multiple levels of hierarchy and flexibility in designing hierarchical addressing and routing that is currently lacking on the IPv4-based Internet.

The IPv6 addressing architecture is described in RFC 4291.

 

IPv6 Address Syntax

IPv4 addresses are represented in dotted-decimal format. This 32-bit address is divided along 8-bit boundaries. Each set of 8 bits is converted to its decimal equivalent and separated by periods. For IPv6, the 128-bit address is divided along 16-bit boundaries, and each 16-bit block is converted to a 4-digit hexadecimal number and separated by colons. The resulting representation is called colon-hexadecimal.

The following is an IPv6 address in binary form:                                       
0010000000000001000011011011100000000000000000000010111100111011 0000001010101010000000001111111111111110001010001001110001011010

The 128-bit address is divided along 16-bit boundaries:
0010000000000001   0000110110111000   0000000000000000   0010111100111011   0000001010101010   0000000011111111   1111111000101000   1001110001011010   

Each 16-bit block is converted to hexadecimal and delimited with colons. The result is:
2001:0DB8:0000:2F3B:02AA:00FF:FE28:9C5A

IPv6 representation can be further simplified by removing the leading zeros within each 16-bit block. However, each block must have at least a single digit. With leading zero suppression, the address representation becomes:
2001:DB8:0:2F3B:2AA:FF:FE28:9C5A

Compressing Zeros

Some types of addresses contain long sequences of zeros. To further simplify the representation of IPv6 addresses, a contiguous sequence of 16-bit blocks set to 0 in the colon hexadecimal format can be compressed to “::”, known as double-colon.

For example, the link-local address of FE80:0:0:0:2AA:FF:FE9A:4CA2 can be compressed to FE80::2AA:FF:FE9A:4CA2. The multicast address FF02:0:0:0:0:0:0:2 can be compressed to FF02::2.

Zero compression can only be used to compress a single contiguous series of 16-bit blocks expressed in colon hexadecimal notation. You cannot use zero compression to include part of a 16-bit block. For example, you cannot express FF02:30:0:0:0:0:0:5 as FF02:3::5. The correct representation is FF02:30::5.

To determine how many 0 bits are represented by the “::”, you can count the number of blocks in the compressed address, subtract this number from 8, and then multiply the result by 16. For example, in the address FF02::2, there are two blocks (the “FF02” block and the “2” block.) The number of bits expressed by the “::” is 96 (96 = (8 – 2)´16).

Zero compression can only be used once in a given address. Otherwise, you could not determine the number of 0 bits represented by each instance of “::”.

IPv6 Prefixes

 

The prefix is the part of the address that indicates the bits that have fixed values or are the bits of the subnet prefix. Prefixes for IPv6 subnets, routes, and address ranges are expressed in the same way as Classless Inter-Domain Routing (CIDR) notation for IPv4. An IPv6 prefix is written in address/prefix-length notation. 

For example, 21DA:D3::/48 and 21DA:D3:0:2F3B::/64 are IPv6 address prefixes.

Note  IPv4 implementations commonly use a dotted decimal representation of the network prefix known as the subnet mask. A subnet mask is not used for IPv6. Only the prefix length notation is supported.

Types of IPv6 Addresses

 

There are three types of IPv6 addresses:

1.   Unicast
A unicast address identifies a single interface within the scope of the type of unicast address. With the appropriate unicast routing topology, packets addressed to a unicast address are delivered to a single interface.

2.   Multicast
A multicast address identifies multiple interfaces. With the appropriate multicast routing topology, packets addressed to a multicast address are delivered to all interfaces that are identified by the address. A multicast address is used for one-to-many communication, with delivery to multiple interfaces.

3.   Anycast
An anycast address identifies multiple interfaces. With the appropriate routing topology, packets addressed to an anycast address are delivered to a single interface, the nearest interface that is identified by the address. 

The “nearest” interface is defined as being closest in terms of routing distance. An anycast address is used for one-to-one-of-many communication, with delivery to a single interface.

In all cases, IPv6 addresses identify interfaces, not nodes. A node is identified by any unicast address assigned to one of its interfaces.

Note  RFC 4291 does not define a broadcast address. All types of IPv4 broadcast addressing are performed in IPv6 using multicast addresses. For example, the subnet and limited broadcast addresses from IPv4 are replaced with the link-local scope all-nodes multicast address of FF02::1.

Links and Subnets

Similar to IPv4, an IPv6 subnet prefix is assigned to a single link. Multiple subnet prefixes can be assigned to the same link. This technique is called multinetting.

IPv4
IPv6
Source and destination addresses are 32 bits (4 bytes) in length.
Source and destination addresses are 128 bits (16 bytes) in length. For more information, see “IPv6 Addressing.”
IPsec support is optional.
IPsec support is required. For more information, see “IPv6 Header.”
No identification of packet flow for QoS handling by routers is present within the IPv4 header.
Packet flow identification for QoS handling by routers is included in the IPv6 header using the Flow Label field. For more information, see “IPv6 Header.”
Fragmentation is done by both routers and the sending host.
Fragmentation is not done by routers, only by the sending host. For more information, see “IPv6 Header.”
Header includes a checksum.
Header does not include a checksum. For more information, see “IPv6 Header.”
Header includes options.
All optional data is moved to IPv6 extension headers. For more information, see “IPv6 Header.”
Address Resolution Protocol (ARP) uses broadcast ARP Request frames to resolve an IPv4 address to a link layer address.
ARP Request frames are replaced with multicast Neighbor Solicitation messages. For more information, see “Neighbor Discovery.”
Internet Group Management Protocol (IGMP) is used to manage local subnet group membership.
IGMP is replaced with Multicast Listener Discovery (MLD) messages. For more information, see “Multicast Listener Discovery.”
ICMP Router Discovery is used to determine the IPv4 address of the best default gateway and is optional.
ICMP Router Discovery is replaced with ICMPv6 Router Solicitation and Router Advertisement messages and is required. For more information, see “Neighbor Discovery.”
Broadcast addresses are used to send traffic to all nodes on a subnet.
There are no IPv6 broadcast addresses. Instead, a link-local scope all-nodes multicast address is used. For more information, see “Multicast IPv6 Addresses.”
Must be configured either manually or through DHCP.
Does not require manual configuration or DHCP. For more information, see “Address Autoconfiguration.”
Uses host address (A) resource records in the Domain Name System (DNS) to map host names to IPv4 addresses.
Uses host address (AAAA) resource records in the Domain Name System (DNS) to map host names to IPv6 addresses. For more information, see “IPv6 and DNS.”
Uses pointer (PTR) resource records in the IN-ADDR.ARPA DNS domain to map IPv4 addresses to host names.
Uses pointer (PTR) resource records in the IP6.ARPA DNS domain to map IPv6 addresses to host names. For more information, see “IPv6 and DNS.”
Must support a 576-byte packet size (possibly fragmented).
Must support a 1280-byte packet size (without fragmentation). For more information, see “IPv6 MTU.”

IPv6 Features

The following are the features of the IPv6 protocol:
·         New header format
·         Large address space
·         Efficient and hierarchical addressing and routing infrastructure
·         Stateless and stateful address configuration
·         Built-in security
·         Better support for prioritized delivery
·         New protocol for neighboring node interaction
·         Extensibility
The following sections discuss each of these new features in detail.

New Header Format

The IPv6 header has a new format that is designed to keep header overhead to a minimum. This is achieved by moving both non-essential fields and optional fields to extension headers that are placed after the IPv6 header. The streamlined IPv6 header is more efficiently processed at intermediate routers.
IPv4 headers and IPv6 headers are not interoperable. IPv6 is not a superset of functionality that is backward compatible with IPv4. A host or router must use an implementation of both IPv4 and IPv6 in order to recognize and process both header formats. The new IPv6 header is only twice as large as the IPv4 header, even though IPv6 addresses are four times as large as IPv4 addresses.

Large Address Space

IPv6 has 128-bit (16-byte) source and destination IP addresses. Although 128 bits can express over 3.4´1038 possible combinations, the large address space of IPv6 has been designed to allow for multiple levels of subnetting and address allocation from the Internet backbone to the individual subnets within an organization.
Even though only a small number of the possible addresses are currently allocated for use by hosts, there are plenty of addresses available for future use. With a much larger number of available addresses, address-conservation techniques, such as the deployment of NATs, are no longer necessary.

Efficient and Hierarchical Addressing and Routing Infrastructure

IPv6 global addresses used on the IPv6 portion of the Internet are designed to create an efficient, hierarchical, and summarizable routing infrastructure that is based on the common occurrence of multiple levels of Internet service providers. 

Stateless and Stateful Address Configuration

To simplify host configuration, IPv6 supports both stateful address configuration, such as address configuration in the presence of a DHCP server, and stateless address configuration (address configuration in the absence of a DHCP server). With stateless address configuration, hosts on a link automatically configure themselves with IPv6 addresses for the link (called link-local addresses) and with addresses derived from prefixes advertised by local routers. Even in the absence of a router, hosts on the same link can automatically configure themselves with link-local addresses and communicate without manual configuration.

Built-in Security

Support for IPsec is an IPv6 protocol suite requirement. This requirement provides a standards-based solution for network security needs and promotes interoperability between different IPv6 implementations.

Better Support for Prioritized Delivery

New fields in the IPv6 header define how traffic is handled and identified. Traffic identification using a Flow Label field in the IPv6 header allows routers to identify and provide special handling for packets belonging to a flow, a series of packets between a source and destination. Because the traffic is identified in the IPv6 header, support for prioritized delivery can be achieved even when the packet payload is encrypted with IPsec.

New Protocol for Neighboring Node Interaction

The Neighbor Discovery protocol for IPv6 is a series of Internet Control Message Protocol for IPv6 (ICMPv6) messages that manage the interaction of neighboring nodes (nodes on the same link). Neighbor Discovery replaces the broadcast-based Address Resolution Protocol (ARP), ICMPv4 Router Discovery, and ICMPv4 Redirect messages with efficient multicast and unicast Neighbor Discovery messages.

Extensibility

IPv6 can easily be extended for new features by adding extension headers after the IPv6 header. Unlike options in the IPv4 header, which can only support 40 bytes of options, the size of IPv6 extension headers is only constrained by the size of the IPv6 packet.