Saturday, 31 August 2013

Wireless Application Protocol




Wireless Application Protocol (WAP) is the worldwide standard for providing Internet communications and advanced services on digital mobile devices, such as handheld phones, pagers, and other wireless devices. This protocol is an open, global specification that enables users of these digital devices to securely access and interact with Internet, intranet, and extranet applications and services.



Many phones and PDAs currently have multimedia capabilities that include:
  • Retrieving e-mail
  • Accessing data from company databases
  • Executing stock trading
  • Paying bills
  • Making travel reservations
  • Online requests for maps and driving directions
  • Running other exciting applications


The WAP Forum was founded in June 1997, by Ericsson, Motorola, Nokia, and Phone.com. It has drafted a global wireless specification for all wireless networks. The forum contributed to various industry groups, such as wireless service providers, handset manufacturers, infrastructure providers, and software developers.  WAP version 2 brings together open Internet standards and mobile networking as it adds optimized support for TCP and HTTP, Extended Hypertext Markup Language (XHTML), and Transport Layer Security.


The WAP environment

wireless devices lack the traditional desktop GUI like the Web browser. Other fundamental
limitations for handheld, wireless devices include:



  • Less powerful CPUs
  • Less memory
  • Restricted power consumption
  • Smaller displays
  • Different input devices (for example, phone keypad and voice input)


Wireless data networks present many communications challenges compared to wired networks. For example, the wireless communication environment is constrained because wireless links have:
  • Less bandwidth
  • More latency
  • Less connection stability
  • Less predictable availability


As a result, protocols that provide wireless applicability must be tolerant of these types of problems


Key elements of the WAP specifications


WAP defines an open standard architecture and a set of protocols to implement wireless Internet access.

  • Definition of the WAP programming model
  • The Extended Hypertext Markup Language Mobile Profile (XHTMLMP).
  • The Wireless Markup Language (WML).
  • A lightweight protocol stack 
  • A framework for wireless telephony


WAP Architecture



The WAP architecture illustrated in Figure


  • The WAP client (the handheld device or WAP terminal)
  • The application server







This programming model is the Web programming model with some extensions and enhancements to match the characteristics of the wireless clients. This programming model adds two enhancements to the Web programming model:


  • Push
  • Wireless Telephony Support (WTA)


Feature and performance-enhancing proxies


The WAP model recommends the use of proxies to optimize the connection between the wireless clients and the Web






A variety of functions are then provided by the WAP proxy, including:


Protocol gateway

Translates requests from a wireless protocol stack (for example, the WAP 1.x stack—WSP, WTP, WTLS, and WDP) to the WWW protocols (HTTP and TCP/IP). Also can perform DNS lookups for the URLs requested by the client.

Content encoders and decoders

Translates WAP content for better utilization of the underlying link, reducing the bandwidth use by different compression techniques.

User Agent Profile Manager


Used mainly to communicate the client’s device capabilities and personal preferences to the server
applications.



Caching proxy


Caching frequently accessed resources, a caching proxy can improve network utilization




Overall Architecture





 

Wireless Application Protocol

Here's what happens when you access a Web site using a WAP-enabled device:
  • You turn on the device and open the minibrowser.
  • The device sends out a radio signal, searching for service.
  • A connection is made with your service provider.
  • You select a Web site that you wish to view.
  • A request is sent to a gateway server using WAP.
  • The gateway server retrieves the information via HTTP from the Web site.
  • The gateway server encodes the HTTP data as WML.
  • The WML-encoded data is sent to your device.
  • You see the wireless Internet version of the Web page you selected.
To create wireless Internet content, a Web site creates special text-only or low-graphics versions of the site. The data is sent in HTTP form by a Web server to a WAP gateway. This system includes the WAP encoder, script compiler and protocol adapters to convert the HTTP information to WML. The gateway then sends the converted data to the WAP client on your wireless device.
What happens between the gateway and the client relies on features of different parts of the WAP protocol stack. Let's take a look at each part of the stack:
  • WAE - The Wireless Application Environment holds the tools that wireless Internet content developers use. These include WML and WMLScript, which is a scripting language used in conjunction with WML. It functions much like Javascript.
  • WSP - The Wireless Session Protocol determines whether a session between the device and the network will be connection-oriented or connectionless. What this is basically talking about is whether or not the device needs to talk back and forth with the network during a session. In a connection-oriented session, data is passed both ways between the device and the network; WSP then sends the packet to the Wireless Transaction Protocol layer (see below). If the session is connectionless, commonly used when information is being broadcast or streamed from the network to the device, then WSP redirects the packet to the Wireless
    Datagram Protocol layer.
  • WTP - The Wireless Transaction Protocol acts like a traffic cop, keeping the data flowing in a logical and smooth manner. It also determines how to classify each transaction request: Reliable two-way Reliable one-way Unreliable one-way The WSP and WTP layers correspond to Hypertext Transfer Protocol (HTTP) in the TCP/IP protocol suite.
  • WTLS - Wireless Transport Layer Security provides many of the same security features found in the Transport Layer Security (TLS) part of TCP/IP. It checks data integrity, provides encryption and performs client and server authentication.
  • WDP - The Wireless Datagram Protocol works in conjunction with the network carrier layer (see below). WDP makes it easy to adapt WAP to a variety of bearers because all that needs to change is the information maintained at this level.
  • Network carriers - Also called bearers, these can be any of the existing technologies that wireless providers use, as long as information is provided at the WDP level to interface WAP with the bearer.


Once the information is received by the WAP client, it is passed to the minibrowser. This is a tiny application built into the wireless device that provides the interface between the user and the wireless Internet.



Wireless(WAP) Application Development

Wireless Markup Language

WAP uses Wireless Markup Language (WML), which includes the Handheld Device Markup Language (HDML) developed by Phone.com.

WML can also trace its roots to eXtensible Markup Language (XML). A markup language is a way of adding information to your content that tells the device receiving the content what to do with it. The best known markup language is Hypertext Markup Language (HTML). Unlike HTML, WML is considered a meta language. Basically, this means that in addition to providing predefined tags, WML lets you design your own markup language components. WAP also allows the use of standard Internet protocols such as UDP, IP and XML.

There are three main reasons why wireless Internet needs the Wireless Application Protocol:
  • Transfer speed
  • Size and readability
  • Navigation
Most cell phones and Web-enabled PDAs have data transfer rates of 14.4 Kbps or less. Compare this to a typical 56 Kbps modem, a cable modem or a DSL connection. Most Web pages today are full of graphics that would take an unbearably long time to download at 14.4 Kbps. Wireless Internet content is typically text-based in order to solve this problem.

The relatively small size of the LCD on a cell phone or PDA presents another challenge. Most Web pages are designed for a resolution of 640x480 pixels, which is fine if you are reading on a desktop or a laptop. The page simply does not fit on a wireless device's display, which might be 150x150 pixels. Also, the majority of wireless devices use monochrome screens. Pages are harder to read when font and background colors become similar shades of gray.













Basics of Computer Hardware

 

Information Representation:

 Internal Electronic circuits(Transistor) works like our electrical circuit in our home as below. 

 

 

 

 

 

In the below transistor illustration, there is no power supply pass through into this transistor, which means it is in OFF state.  if we switch on the power supply then it will be ON state

 

 

 

 

 

 

 

 

Computer needs transistor for below operations

 

 

 

 Human decimal system uses below number system to identify numbers

 

 

  Computer used below BINARY system to recognize numbers

 

 

 

 

 

 

 







The reason why computer scientist groups all the bits as a byte (8 bit) is to avoid false start and finish problem during storage representation of data in memory.  So solution is grouping bits as a byte like below.


  How computer stores Colors, images, Audio and video

 

  Computer stores everything as a numbers inside of its memory

 

 

 

  Computer represents TEXT data in ASCII or UNICODE format which is universal standards

 

 

 

 

 

Computation of Computer

 

  Logic gates are used to perform calculations in computer through CPU...All the logic gates are formed based on the alignments of transistors.

 

 

 

 

 

 

 

 

 

 

 

 

Below is Adder Logic gates to add two bits

 

 

 

 

 

 Carry bit problem

Carry bit problem in BINARY addition

 

 

  




Carry bit problem in DECIMAL addition

 

 

Logic gates handle Carry bit problem as below

 

 

 

Below logic gate circuits joint together to perform large numbers calculation

 

 

 Lot of logic gates circuit are formed to perform below works in computer CPU

 

 

 

 

 Microprocessor executes program from memory with FETCH commands as below

 

 

 

 

 

 

 

 

 

 

 

 

 

Computer Programming

 

Below instructions are human readable program but computer only understands Machine language.

 

 

 

 Programmer only writes program with Mnemonic keyword, but computer decodes these Mnemonic word as Microprocessor execute code to process instructions

 

 Even today computer programs are sequence of bits and bytes and stored in computer memory for execution.  In early days, programmer had to insert these sequence of bits into memory to execute simple program.  As it was very tedious process, computer scientist invented High Level programming language.





 

 

 

 Operation system is set of programs and library which helps user interact with computer through keyboard, mouse and Screen.  This will stand in between hardware and users' programs to facilitate user to execute their instructions without any difficulties.

 

 

 

 

 

 

 

 

Tuesday, 27 August 2013

TCP/IP Networking For Developers


 


TCP/IP architectural model



The TCP/IP protocol suite is so named for two of its most important protocols: Transmission Control Protocol (TCP) and Internet Protocol (IP). A less used name for it is the Internet Protocol Suite, which is the phrase used in official Internet standards documents. In this book, we use the more common, shorter term, TCP/IP, to refer to the entire protocol suite.


The main design goal of TCP/IP was to build an interconnection of networks, referred to as an  internetwork, or internet, that provided universal communication services over heterogeneous physical networks. The clear benefit of such an internetwork is the enabling of communication between hosts on different networks, perhaps separated by a large geographical area.

The words internetwork and internet are simply a contraction of the phrase interconnected network. However, when written with a capital “I”, the Internet refers to the worldwide set of interconnected networks. Therefore, the Internet is an internet, but the reverse does not apply. The Internet is sometimes called the connected Internet.











TCP/IP protocol layers And Applications



TCP/IP is modeled in layers. This layered representation leads to the term protocol stack, which refers to the stack of layers in the protocol suite. It can be used for positioning (but not for functionally comparing) the TCP/IP protocol suite against others, such as Systems Network Architecture (SNA) and the Open System Interconnection (OSI) model.


















Application layer



The application layer is provided by the program that uses TCP/IP for communication. An application is a user process cooperating with another process usually on a different host (there is also a benefit to application communication within a single host). Examples of applications include Telnet and the File Transfer Protocol (FTP). The interface between the application and transport layers is defined by port numbers and sockets



Applications:

The highest-level protocols within the TCP/IP protocol stack are application
protocols. They communicate with applications on other internet hosts and are
the user-visible interface to the TCP/IP protocol suite.



  • Telnet for interactive terminal access to remote internet hosts
  • File Transfer Protocol (FTP) for high-speed disk-to-disk file transfers
  • Simple Mail Transfer Protocol (SMTP) as an internet mailing system




Transport layer


The transport layer provides the end-to-end data transfer by delivering data from an application to its remote peer. Multiple applications can be supported simultaneously. The most-used transport layer protocol is the Transmission Control Protocol (TCP), which provides connection-oriented reliable data delivery, duplicate data suppression, congestion control, and flow control


Another transport layer protocol is the User Datagram Protocol (see 4.2, “User Datagram Protocol (UDP)” on page 146). It provides connectionless, unreliable
best-effort service. As a result, applications using UDP as the transport protocol have to provide their own end-to-end integrity, flow control, and congestion
control, if desired. Usually, UDP is used by applications that need a fast transport mechanism and can tolerate the loss of some data.



Applications:

They use either UDP or TCP as a transport mechanism. Remember that UDP
is unreliable and offers no flow-control, so in this case, the application has to provide its own error recovery, flow control, and congestion controlfunctionality. It is often easier to build applications on top of TCP because it is a reliable stream, connection-oriented, congestion-friendly, flow control-enabled protocol. As a result, most application protocols will use TCP, but there are applications built on UDP to achieve better performance through increased protocol efficiencies.




Internetwork layer


The internetwork layer, also called the internet layer or the network layer, provides the “virtual network” image of an internet (this layer shields the higher
levels from the physical network architecture below it). Internet Protocol (IP) is the most important protocol in this layer. It is a connectionless protocol that does not assume reliability from lower layers. IP does not provide reliability, flow control, or error recovery. These functions must be provided at a
higher level.


IP provides a routing function that attempts to deliver transmitted messages to their destination. A message unit in an IP network is called an IP datagram. This is the basic unit of information transmitted across TCP/IP networks. Other internetwork-layer protocols are IP, ICMP, IGMP, ARP, and RARP.




Network interface layer


The network interface layer, also called the link layer or the data-link layer, is the interface to the actual network hardware. This interface may or may not
provide reliable delivery, and may be packet or stream oriented. In fact, TCP/IP does not specify any protocol here, but can use almost any network interface
available, which illustrates the flexibility of the IP layer. Examples are IEEE 802.2, X.25 (which is reliable in itself), ATM, FDDI, and even SNA




Networking Basics








































































































Name Resolution
























































































This command will show all the DNS caching information











Windows HOST file configuration




The short answer is that the Hosts file is like an address book. When you type an address like www.yahoo.com into your browser, the Hosts file is consulted to see if you have the IP address, or "telephone number," for that site. If you do, then your computer will "call it" and the site will open. If not, your computer will ask your ISP's (internet service provider) computer for the phone number before it can "call" that site. Most of the time, you do not have addresses in your "address book," because you have not put any there. Therefore, most of the time your computer asks for the IP address from your ISP to find sites.

If you put ad server names into your Hosts file with your own computer's IP address, your computer will never be able to contact the ad server. It will try to, but it will be simply calling itself and get a "busy signal" of sorts. Your computer will then give up calling the ad server and no ads will be loaded, nor will any tracking take place. Your choices for blocking sites are not just limited to blocking ad servers. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.



































DNS Record Type


To Get Name Server info.






To get the Email Server Details









To get the IPv6 server Address info.







Wildcard DNS Record Type











Review of DNS Trace via WireShark














IP Routing











































































































































































Port Connectivity


























Test the PORT Connectivity of TCP






























To get which process is listening at which PORT of current  working host




















To change the Firewall settings of working host




































Network Capture





Free Application to trace network traffic at Network Interface of working host









Free Application to trace HTTP traffic on your host