Monday, March 31, 2008

TCP/IP Layers

In the last TCP/IP overview, we focused on getting an absolute basic understanding of the way information is transmitted from and to machines connected to the internet. Now we're going to look at some of the higher layers of network protocol. If we stay with the basic Mail analogy, we're now moving from the [disassembling, packing, addressing, shipping, routing, receiving, unpacking and assembling] set of standards to standards which apply to the nature of our packaged objects.

The only problem with this model of understanding is that there really isn't any "wrapping" going on in the various levels of protocol encapsulation. IP and TCP headers are more like stamps and stickers than the package material itself. In the world of data transmission, there is no package itself except the data itself, sent as a burst of bytes, a sequence of zeros and ones.

Anyway, right now we're not so much interested in the TCP/IP stamps (headers) as we are on the application-level data that forms the tail of our packet of transmitted bytes.

Like TCP/IP, these higher level layers in our data-stream are protocols, standards by which computers communicate and interpret what's going in and out of them via the network(s). Let's just run through the most interesting of these higher layers and see if we have any energy to talk about them individually. Probably not...
  • HTTP: Hyper Text Transfer Protocol; this is the obvious standard protocol governing the dynamics of transmission across the world wide web
  • HTTPS: Secure HTTP
  • SSL - Secure Sockets Layer: takes advantage of encryption technologies to ensure safe transmission of data across a network
  • SMTP - Simple Mail Transfer Protocol: enables you to send email
  • MIME - Multi-purpose Internet Mail Extensions: Originally developed for multimedia email attachments, now standardizes the transmission of multimedia anywhere on WWW
  • POP - Post Office Protocol: Used for downloading mail onto your machine
  • IMAP - Internet Mail Access Protocol: Used to store and retrieve email
  • FTP - File Transfer Protocol: Enables file transfer from computer to computer
Like I imagined, I don't care to try to elaborate on each one of these protocols at this point in time. Each one may well take up an summary article at a later date. Sounds good to me.

The main thing is to realize that these protocols are executed and then parsed by higher level applications like web browsers, mail clients and ftp clients (on the client side) and the developed framework on the server-side. They form all the access and interface points that make up the fabric of web technologies and UI.

Resources
W3Schools

Internet Basics

The following is an adaptation of an overview of the internet I wrote for a class, may be somewhat helpful


WHAT IS THE INTERNET?

The Internet is an ever-growing network of "computers of all stripes--mainframes, minicomputers, powerful servers, the desktop PC, and any number of mobile devices" (Battelle, 6-7)--connected via physical and wireless infrastructures. The Internet supports the World Wide Web, a vast browser-accessible system of inter-linked websites.


A BRIEF HISTORY

The earliest forms of wide-area networks and the Internet emerged in the late 1960's; this early network connected the research facilities at MIT and UCLA. The first email application was developed in 1972 and quickly became the most popular Internet application. Throughout the 1970's and 80's, the Internet quickly grew as an "open architecture network environment" (ISOC REF) where computers and networks of computers could be arbitrarily added by virtually anyone at any time.


In 1989, Tim Berners-Lee invented a program called WorldWideWeb which created documents in hypertext to be stored on a server and accessed on the Internet through a web browser (which renders hypertext into electronic "pages"). Here, each web page could be linked to any other web page by means of a hyperlink (typically rendered as blue underlined text). The phrase "World Wide Web" quickly became synonymous with the growing system of linked hypertext pages that began to emerge in the early 1990's.


In 1994, Netscape released its 1.0 version of the first highly popular web browser, Netscape Navigator. In 1995, Microsoft launched its first version of Internet Explorer. The ensuing "browser war" between Microsoft and Netscape effectively brought the Internet into real public consciousness for the first time. Before long, millions of people were signing up with an internet service provider (or ISP) to gain access to this "new" phenomenon of the Internet's World Wide Web.


The massive and ongoing expansion of the Web quickly created a need for online applications that could "search" its contents for specific kinds of pages. The first search engine designed for the Web was the WWW Wanderer, created by Matthew Gray (at MIT) in 1993. By 1995, as the public began pouring onto the Web, several search engines became popular; these included AltaVista, Lycos and Excite. Currently, Google clearly dominates the world of search, controlling 51% of the global search market (Yahoo and MSN are the closest competitors, at 24% and 13% respectively).


During the past ten years, the World Wide Web has been bolstered by the development of many new web applications which allow individuals to upload, share and store information through and on the web. These applications include:

Blogging applications such as Blogger and WordPress

Instant Messaging (or IM) applications such as AIM and Google Talk

Social networking applications such as MySpace

Music-downloading applications such as iTunes and Napster

Video-sharing applications such as YouTube

Finally, what might the future of the Internet look like? A few things seem reasonably certain. First, the technology that makes up the Internet will continue to drive toward universality: free-wireless access will become standard for metropolitan areas around the globe, every electronic device will be tied into the Web, and new innovations will give us devices and device systems which will weave ever more deeply into the fabric of our daily lives. Second, the Web will continue to become the global marketplace. The search engine business is already pointed in that direction. For example, Google "would like to provide a platform that mediates supply and demand for pretty much the entire world economy" (Battelle, 247). Finally, it appears that the need for the "personal computer" will diminish as connectivity and remote storage capabilities rapidly increase in scope. PC's will be replaced by extremely cheap (if not free) connection consoles. In sum, the World Wide Web will increasingly be everywhere, virtually connecting eveyone to everyone and everything.

The Very Base: TCP/IP

The internet is basically the grand physical structure that connects all sorts of devices together into a grand network of networks, TCP/IP is the magic that makes makes the fact of computer-to-computer connection possible. Trying to imagine internet-based communication without TCP/IP is like trying to imagine sending a Wii to your grandmother in California without a single piece of information on the postal package.

TCP/IP stands for Transmission Control Protocol / Internet Protocol. In the internet protocol suite, TCP/IP represents the standards adopted by those smart internet engineers to get computers sending, routing and assembling data across an incredibly complex network in a reliable and consistent way. Think of it as the computer equivalent of the rules governing the physical transmission of goods via the USPS (you have to have a stamp, you have to have an address in a certain form, packages have to be a certain size, etc), except computers don't have minds, so the protocols exist as a standard set of applications and interfaces...

The Address: IP
IP is the most basic internet protocol (a "network protocol"), and it enables your computer to locate, send to and receive from other machines on the internet. How is this done, exactly? Well, from the transmission side, the an IP header is the last thing added to a packet (see TCP below), and this header includes the most basic addressing information necessary for data transmission across a network: the destination address of the machine to which you want to send data, and the address of your machine. Unlike TCP, IP does not check if a real connection exists between machines, and it does not include support for breaking down and serializing/ordering data packets. IP simply supports the most basic components of data navigation across a network. IP data is primarily interpreted by the IP router (see below).

Address verification/disassembly and assembly: TCP
The higher level transmission issues are handled by TCP, a "transport protocol". TCP includes baked-in support for establishing a real connection between applications on different machines (a three way handshake that initiates a "full duplex" communication between computers until it is terminated by either party). It also handles the complexities involved with breaking large data sets into small packets of data and sending them across a variegated network where the packets will likely not be received in the order sent. Thus, the TCP header will include information pertaining to the real connection between machines as well as information about individual packets. The TCP information is processed by applications on your computer and on the web server.

TCP also includes information about the sending and receiving ports involved in the transmission. More on ports at some other point perhaps.

Packet Routing: IP Routers
Like the USPS with its processing centers , you're going to have to have some kind of a third party involved in handling the packets sent from one machine to another; and that's the job of an IP Router (or network of routers) to which packages are actually sent and from which packages are finally received. Again like the USPS, routers identify sending and receiving machines by means of addresses. IP addresses consist of four numbers, separated by periods, each ranging from 0 to 255 (since each number must be represented in a single computer byte). On the world wide web (to be covered in another article), IP addresses are represented by domain names which are registered and actively translated into IP addresses by a Domain Name Server (DNS) process.

That's the absolute basics of the whole thing. Next time we'll look at the nature of the things you can put "in" (or on) those packages which is defined by further protocols.

Resources
The W3Schools Resource
A guy who seems to know a lot about this