Sunday, June 15, 2008

IP Addresses, Subnetting and Sub-subnetting

This page will give you a basic understanding of the structure of IP addresses and subnets as well as specific information about sub-subnetting at Cornell. We recommend that you read through the entire page; however, if you're familiar with these issues, use the table of contents to click ahead to the section you're most interested in.

Contents of this page:
What are IP addresses and how are they used?
IP Addressing Space
How does Sub-subnetting work?
Understanding Static vs. Dynamic Addressing
Changing the UNIX Operating System to Work with Sub-subnetting
Host registration

What Are IP Addresses and How Are They Used?

IP (Internet Protocol) addresses are used to identify hosts on the campus Internet, a Cornell network that ties into the Internet, a global network. If the computer is attached to Cornell's network, it needs an IP address to be recognized as part of the campus Internet.

IP addresses are constructed according to a set of specific rules so that hosts on any part of the Internet can communicate with each other. This document describes IP addresses only as they apply to Cornell's campus network. (If you want to know more about Internet addressing, refer to Internetworking with TCP/IP: Principles, Protocols, and Architecture by Douglas Comer, Prentice Hall).

An IP address consists of a 32-bit binary number, which is typically presented as four decimal numbers (one for each 8-bit byte) separated by decimal points. For example, 128.253.21.58.

Internet addresses at Cornell have three parts:

network address
subnet address
host address

When you configure a host for sub-subnetting, you are primarily concerned about the host address, but some understanding of the network address and subnet address is useful.

Network Address
Cornell has four addresses for its backbone networks. They are 128.253.0.0, 128.84.0.0, 132.236.0.0, and 140.251.0.0. The latter is used only by the Cornell University College. These addresses are assigned to Cornell. Cornell cannot change the first two parts of each address, but is free to use the last two parts in any way it chooses in order to identify Local Area Networks (subnets) and hosts that are connected to the campus Internet.

Subnet Address

The subnet address is the address given to your Local Area Network (LAN). Cornell's system provides for 254 LANs connected to each of the main networks. So, for example, if your LAN is identified on the network as 128.253.0.0, a possible subnet addresses (or LAN address) might be 128.253.21.0. The third number, 21, identifies the subnet.

Host Address

The host address is the address given to the workstation, other computer, or device that is connected to the LAN. Cornell's system provides for 256 host addresses on each LAN. So, for example, if your host is identified on the LAN as 128.253.21.0 a possible host address is 128.253.21.58. The last number, 58, identifies the host.

Not all 256 numbers are available as host addresses on any given LAN. Zero (0) and 255 are reserved for broadcast purposes. (Hosts are set up to "grab" any message marked with their own address or a broadcast address; for example, if your host address is 128.253.21.58 and it "sees" a message addressed to 128.253.21.255, it will grab the message. In this way, hosts can send messages to large groups without having to know each address on their LAN.)

One (1) is reserved for the gateway/router that sits between the LAN and next network level. The numbers 2-5 are reserved by CIT for diagnostic and management use.

IP Addressing Space

This addressing scheme has worked well for Cornell, but it has some limitations:
  • Each of Cornell's fiber backbones can have no more than 256 LANs attached to them.
  • Each LAN can have no more than 256 (249 if reserved addresses are taken into account) hosts. Most LANs are constructed with far fewer than the maximum number of hosts addresses available.
  • Ethernet LANs performance is reduced with a large number (100 or more) of connections. Performance is most affected by how people are using the LAN: a small number of heavy users can bog down the performance of any LAN. Therefore, the limitations on the number of host addresses hasn't been and isn't expected to be a problem for most LANs at Cornell.

To make room for additional subnet addresses, or LANs, CIT has used a system called sub-subnetting. With this system, up to four LANs can use one full subnet address, thus effectively quadrupling the number of subnet addresses available.

How Does Sub-Subnetting Work?
Subnetting


Each subnet address at Cornell is assigned a "subnet mask." A subnet mask defines how many bits are used for the network address and how many for the host address.

The subnet mask address is 255.255.255.0, and it currently is the same for all LANs. If you convert the subnet mask address to its binary form, it looks like this:

Subnet mask: 11111111 11111111 11111111 00000000

If you convert our example host address (128.253.21.58) to its binary form, it looks like this:


Host address: 10000000 11111101 00010101 00111010


Together they look like this:

Subnet mask: 11111111 11111111 11111111 00000000
Host address: 10000000 11111101 00010101 00111010


The subnet mask when shown this way, as an overlay on the host address, essentially tells the computer which part of the IP address is a network address and which part is a host address. Everything in the host address that corresponds to a 1 in the subnet mask is a network address and everything in the host address that corresponds to a 0 in the subnet mask is a host address.

Sub-subnetting


Many LANs at Cornell are sub-subnetted.


Sub-subnetting is based on the same concept as subnetting. With sub-subnetting, the mask will be 255.255.255.192. In binary form, this address looks like this:


Sub-subnet mask: 11111111 11111111 11111111 11000000


When you compare the sub-subnet mask to the example IP host address (128.253.21.58), they look like this:


Sub-subnet mask: 11111111 11111111 11111111 11000000
Host address: 10000000 11111101 00010101 00111010
Like the old subnet mask, the sub-subnet mask tells the computer which part of the IP address is the network address and which part is a host address. As explained above, everything in the host address that corresponds to a "1" in the sub-subnet mask is a network address and everything in the host address that corresponds to a 0 in the sub-subnet mask is a host address.
As you can see, there are now ones (1's) in the last byte of the sub-subnet mask. (This is the part, in the subnet mask, that was all zeros (0's) and that identified the host portion of an address.) The ones (1's) that appear in this byte of the sub-subnet mask identify the first two bits of the last byte of an IP address as part of the network portion of the address. The remaining zeros (0's) identify the host portion of the address. By increasing the number of bits assigned to network addressing, the number of possible network addresses increases and the number of possible host addresses for each LAN decreases.


Why is this important?


Gateways need to forward packets to other gateways to get them to the destination LAN. Each network interface card on the gateway is assigned an IP address and a sub-subnet mask. This enables the gateways to route packets from one LAN to another LAN. Once the packet arrives at a gateway that is attached to the destination LAN, the gateway then uses the two bits of the sub-subnet portion of the IP address (the first two bits of the last byte of the IP address) to decide to which sub-subnetted LAN to send the packet.


In order for this to work, each of the LANs connected to a given gateway must have a different set of host addresses. As you know, the host address you assign, for example 58, is translated into a binary address (00111010). Remember, even though you think of this as a host address, the sub-subnet mask forces the gateway to think of the first two bits as part of the network address. If two LANs attached to the same gateway each have hosts with an address of 58, the first two bits in the binary translation will be the same, and even though the hosts are physically on two separate LANs, the gateway won't know to which LAN to send a packet.


To make sure each LAN has a unique set of host addresses, network administrators can no longer assign host numbers from the entire range. Now, each administrator will be assigned a subset of the host addresses available. Within each subset, broadcast, gateway, and diagnostic addresses must be reserved. So, for example, Administrator X can have server addresses at 6 through 9 and workstation addresses at 10 through 63; Administrator Y can have server addresses at 70 through 73 and workstation addresses 74 through 126, etc. If your current host addresses fall outside the range assigned to your LAN, you need to reassign host addresses on your network.

Understanding Static vs. Dynamic Addressing
If you use static addressing on your network, this means you assign each host a permanent IP address. If you use dynamic addressing, the hosts use any available address within a range you specify. The information below explains some of the advantages and disadvantages of static and dynamic addressing.


Before you begin reconfiguring your applications, you should decide which scheme you plan to use: static, dynamic, or a combination. CIT recommends that you use static addressing; it helps you, as the network administrator, keep track of machines and figure out which one is causing problems. Some network applications require static addressing.


If you want to consider dynamic addressing because it is easier to set up, CIT advises that you limit the range for dynamically assigned addresses to start at 21, thus leaving 6-20 reserved for hosts that need fixed addresses because they will offer IP services. If you think you will have more than 15 IP server hosts, you should raise the start point for dynamically assigned addresses.

Changing the UNIX Operating System to Work with Sub-subnetting


Because UNIX has TCP/IP protocols built into the operating system, you can alter the configuration of the operating system itself instead of the applications that run on it. Follow these instructions:

  1. Go to the interface configuration command, called ifconfig, in your startup script. Most UNIX startup scripts are called /etc/rc/local. You will see a line that looks like this:ifconfig le0 $hostname netmask 255.255.255.0 broadcast 128.253.180.255 -trailers up
    Change the value of the netmask to 255.255.255.192.
  2. Note: ifconfig also accepts netmask values in hexadecimal notation. Therefore you may see 0xffffff00 as the value of the netmask. If this is the case, change the value to 0xffffffc0.
  3. Change the host portion of the broadcast address to one of the following values, depending on the sub-subnet your host is in:
  • If the host's IP address is between 1 and 64, use 63.
  • If the host's IP address is between 65 and 128, use 127.
  • If the host's IP address is between 129 and 192, use 191.
  • If the host's IP address is between 193 and 256, use 255.

If your IP address is between 1 and 64, on subnet 180, your ifconfig command would look like this: ifconfig le0 $hostname netmask 255.255.255.192 broadcast 128.253.180.63 -trailers up

4. If you use static routing, you need to change your default gateway. For example:
route add default 128.253.180.1 1

Host Registration
Network administrators are strongly encouraged to register all devices on their networks (desktop workstations, servers, printers, etc.) with the Network Operations Center (NOC). Visit the Network and Host Registration web site for more information.

IP Address Classes

The original IP addressing design was based on Address Classes.

In the original Internet routing scheme developed in the 1970s, sites were assigned addresses from one of three classes: Class A, Class B and Class C. The address classes differ in size and number. Class A addresses are the largest, but there are few of them. Class Cs are the smallest, but they are numerous. Classes D and E are also defined, but not used in normal operation.

To say that class-based IP addressing in still used would be true only in the loosest sense. Many addressing designs are still class-based, but an increasing number can only be explained using the more general concept of CIDR, which is backwards compatible with address classes.

Suffice it to say that at one point in time, you could request the Internet NIC to assign you a class A, B or C address. To get the larger class B addresses, you might have to supply some justification, but only the class A was really tough to get. In any case, NIC would set the network bits, or n-bits, to some unique value and inform the local network engineer. It would then be up to the engineer to assign each of his hosts an IP address starting with the assigned n-bits, followed by host bits, or h-bits, to make the address unique.

Internet routing used to work like this: A router receiving an IP packet extracted its Destination Address, which was classified (literally) by examining its first one to four bits. Once the address's class had been determined, it was broken down into network and host bits. Routers ignored the host bits, and only needed to match the network bits to find a route to the network. Once a packet reached its target network, its host field was examined for final delivery.

Summary of IP Address Classes

Class A - 0nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh
  • First bit 0; 7 network bits; 24 host bits
  • Initial byte: 0 - 127
  • 126 Class As exist (0 and 127 are reserved)
  • 16,777,214 hosts on each Class A

Class B - 10nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh

  • First two bits 10; 14 network bits; 16 host bits
  • Initial byte: 128 - 191
  • 16,384 Class Bs exist
  • 65,532 hosts on each Class B


Class C - 110nnnnn nnnnnnnn nnnnnnnn hhhhhhhh

  • First three bits 110; 21 network bits; 8 host bits
  • Initial byte: 192 - 223
  • 2,097,152 Class Cs exist
  • 254 hosts on each Class C


Class D - 1110mmmm mmmmmmmm mmmmmmmm mmmmmmmm

  • First four bits 1110; 28 multicast address bits
  • Initial byte: 224 - 247
  • Class Ds are multicast addresses - see RFC 1112


Class E - 1111rrrr rrrrrrrr rrrrrrrr rrrrrrrr

  • First four bits 1111; 28 reserved address bits
  • Initial byte: 248 - 255
  • Reserved for experimental use

Network Design Manual

IP 101: All About IP Addresses


By Chris Lewis The key to understanding IP, and all of the issues related to IP, is knowing what a routing table looks like and the effects each IP topic has on the entries in a routing table. To begin with, let's review the basics. IP addresses are 32 bit numbers, most commonly represented in dotted decimal notation (xxx.xxx.xxx.xxx). Each decimal number represents eight bits of binary data, and therefore can have a decimal value between 0 and 255. IP addresses most commonly come as class A, B, or C. It's the value of the first number of the IP address that determines the class to which a given IP address belongs. Class D addresses are used for multi-cast applications.


(For a full explanation of class D addresses, refer to "Diving Through the Layers" .) The range of values for these classes are given below.


Class Range Allocation

A 1-126 N.H.H.H



B 128-191 N.N.H.H

C 192-223 N.N.N.H

D 224-239 Not applicable


N=Network
H=Host

Note 1: 127.0.0.0 is a class A network, but is reserved for use as a loopback address (typically 127.0.0.1).

Note 2: The 0.0.0.0 network is reserved for use as the default route.

Note 3: Class D addresses are used by groups of hosts or routers that share a common characteristic: e.g. all OSPF devices respond to packets sent to address 224.0.0.2

Note 4: Class E addresses exist (240-248),

but are reserved for future use

The class of an address defines which portion of the address identifies the Network number and which portion identifies the Host, as illustrated above, as N and H.

So, without any subnetting (which we will come to a little later), a routing table will keep track of a) network numbers, b) the next hop router to use to get to that network, and c) the interface this next hop router is reachable through. A simple network with the corresponding routing table for a Cisco router is illustrated below.













C 199.2.2.0 directly connected Ethernet 0
C 10.0.0.0 directly connected Token-ring 1
C 152.8.0.0 directly connected Ethernet 1
I 200.1.1.0 via 152.8.1.2 Ethernet 1





Since Cisco doesn't give headings for these columns, you need to know what each column consists of. The first column of the routing table indicates how the network number was discovered. C stands for Connected and I indicates the network was learned from the IGRP routing protocol. For a full description of the routing table as it appears in a UNIX host and a Cisco router, refer to "Should RIP Rest In Peace" .



The important thing to realize is that while a routing table keeps track of network numbers, no one assigns a network number to any piece of equipment. Every interface of a router or host connected on the network must have an IP address and a subnet mask defined (many pieces of equipment will assign a default subnet mask if none is applied). From this IP address and subnet mask, the network number is derived by the IP stack and tracked in the routing table.



(This is the exact opposite of what happens in a NetWare network. In NetWare, you assign a network number to a server LAN card, which is used by all workstations on that wire. The workstations use MAC addresses as IPX node numbers.)



Routing tables can get very large. Internet backbone routers can have over 40,000 routes defined in them. In most corporate networks, the routing table is much smaller, as there are not so many subnets that need to be reached.



Many large routers, particulary internet routers, use a method called Classless Interdomain Routing (CIDR) to reduce the number of entries a router needs in its routing table. If we imagine, for instance, that all the Class C addresses that start with the value 194 are allocated for use in Europe, it would significantly reduce the number of entries in Internet routers in the US if there was only one entry for all these class C addresses, rather than a separate entry in the routing table for each one. CIDR works if (as in this example) all the networks with the first octet value of 194 are physically located in one area of the network.



IP addresses are used to deliver packets of data across a network and have what is termed end-to-end significance. This means that the source and destination IP address remains constant as the packet traverses a network. Each time a packet travels through a router, the router will reference it's routing table to see if it can match the network number of the destination IP address with an entry in its routing table. If a match is found, the packet is forwarded to the next hop router for the destination network in question (note that a router does not necessarily know the complete path from source to destination--it just knows the next hop router to go to). If a match is not f ound, one of two things happens. The packet may be forwarded to the router defined as the default gateway, or the packet may be dropped by the router. (In the language of TCP/IP, a gateway is a router.)



Packets are forwarded to a default router in the belief that the default router has more network information in its routing table and will therefore be able to route the packet correctly on to its final destination. This is typically used when connecting a LAN with PCs on it to the Internet. Each PC will have the router that connects the LAN to the Internet defined as its default gateway.



A default gateway is seen in a routing table of a host as follows: the default route 0.0.0.0 will be listed as the destination network, and the IP address of the default gateway will be listed as the next hop router.



If the source and destination IP addresses remain constant as the packet works its way through the network, how is the next hop router addressed? In a LAN environment this is handled by the MAC (Media Access Control) address, as illustrated below. The key point is that the MAC addresses will change every time a packet travels though a router, however, the IP addresses will remain constant.









PC1 Router E0 Router E1 PC2
MAC Address M1 M2 M3 M4
Software (IP) address 11 12 13 14
A packet sent from PC1 to PC2 will look like this at point A:
Destination Source Destination Source Data
MAC MAC IP IP
M2 M1 14 11 1001001
A packet sent from PC1 to PC2 will look like this at point B:
Destination Source Destination Source Data
MAC MAC IP IP
M4 M3 14 11 1001001

Introduction to TCP/IP

Introduction to TCP/IP

Summary: TCP and IP were developed by a Department of Defense (DOD) research project to connect a number different networks designed by different vendors into a network of networks (the "Internet"). It was initially successful because it delivered a few basic services that everyone needs (file transfer, electronic mail, remote logon) across a very large number of client and server systems. Several computers in a small department can use TCP/IP (along with other protocols) on a single LAN. The IP component provides routing from the department to the enterprise network, then to regional networks, and finally to the global Internet. On the battlefield a communications network will sustain damage, so the DOD designed TCP/IP to be robust and automatically recover from any node or phone line failure. This design allows the construction of very large networks with less central management. However, because of the automatic recovery, network problems can go undiagnosed and uncorrected for long periods of time.

As with all other communications protocol, TCP/IP is composed of layers:
  • IP - is responsible for moving packet of data from node to node. IP forwards each packet based on a four byte destination address (the IP number). The Internet authorities assign ranges of numbers to different organizations. The organizations assign groups of their numbers to departments. IP operates on gateway machines that move data from department to organization to region and then around the world.

  • TCP - is responsible for verifying the correct delivery of data from client to server. Data can be lost in the intermediate network. TCP adds support to detect errors or lost data and to trigger retransmission until the data is correctly and completely received.
    Sockets - is a name given to the package of subroutines that provide access to TCP/IP on most systems.

Network of Lowest Bidders

The Army puts out a bid on a computer and DEC wins the bid. The Air Force puts out a bid and IBM wins. The Navy bid is won by Unisys. Then the President decides to invade Grenada and the armed forces discover that their computers cannot talk to each other. The DOD must build a "network" out of systems each of which, by law, was delivered by the lowest bidder on a single contract.




The Internet Protocol was developed to create a Network of Networks (the "Internet"). Individual machines are first connected to a LAN (Ethernet or Token Ring). TCP/IP shares the LAN with other uses (a Novell file server, Windows for Workgroups peer systems). One device provides the TCP/IP connection between the LAN and the rest of the world.



To insure that all types of systems from all vendors can communicate, TCP/IP is absolutely standardized on the LAN. However, larger networks based on long distances and phone lines are more volatile. In the US, many large corporations would wish to reuse large internal networks based on IBM's SNA. In Europe, the national phone companies traditionally standardize on X.25. However, the sudden explosion of high speed microprocessors, fiber optics, and digital phone systems has created a burst of new options: ISDN, frame relay, FDDI, Asynchronous Transfer Mode (ATM). New technologies arise and become obsolete within a few years. With cable TV and phone companies competing to build the National Information Superhighway, no single standard can govern citywide, nationwide, or worldwide communications.



The original design of TCP/IP as a Network of Networks fits nicely within the current technological uncertainty. TCP/IP data can be sent across a LAN, or it can be carried within an internal corporate SNA network, or it can piggyback on the cable TV service. Furthermore, machines connected to any of these networks can communicate to any other network through gateways supplied by the network vendor.




Addresses


Each technology has its own convention for transmitting messages between two machines within the same network. On a LAN, messages are sent between machines by supplying the six byte unique identifier (the "MAC" address). In an SNA network, every machine has Logical Units with their own network address. DECNET, Appletalk, and Novell IPX all have a scheme for assigning numbers to each local network and to each workstation attached to the network.

On top of these local or vendor specific network addresses, TCP/IP assigns a unique number to every workstation in the world. This "IP number" is a four byte value that, by convention, is expressed by converting each byte into a decimal number (0 to 255) and separating the bytes with a period. For example, the PC Lube and Tune server is 130.132.59.234.



An organization begins by sending electronic mail to Hostmaster@INTERNIC.NET requesting assignment of a network number. It is still possible for almost anyone to get assignment of a number for a small "Class C" network in which the first three bytes identify the network and the last byte identifies the individual computer. The author followed this procedure and was assigned the numbers 192.35.91.* for a network of computers at his house. Larger organizations can get a "Class B" network where the first two bytes identify the network and the last two bytes identify each of up to 64 thousand individual workstations. Yale's Class B network is 130.132, so all computers with IP address 130.132.*.* are connected through Yale.



The organization then connects to the Internet through one of a dozen regional or specialized network suppliers. The network vendor is given the subscriber network number and adds it to the routing configuration in its own machines and those of the other major network suppliers.



There is no mathematical formula that translates the numbers 192.35.91 or 130.132 into "Yale University" or "New Haven, CT." The machines that manage large regional networks or the central Internet routers managed by the National Science Foundation can only locate these networks by looking each network number up in a table. There are potentially thousands of Class B networks, and millions of Class C networks, but computer memory costs are low, so the tables are reasonable. Customers that connect to the Internet, even customers as large as IBM, do not need to maintain any information on other networks. They send all external data to the regional carrier to which they subscribe, and the regional carrier maintains the tables and does the appropriate routing.



New Haven is in a border state, split 50-50 between the Yankees and the Red Sox. In this spirit, Yale recently switched its connection from the Middle Atlantic regional network to the New England carrier. When the switch occurred, tables in the other regional areas and in the national spine had to be updated, so that traffic for 130.132 was routed through Boston instead of New Jersey. The large network carriers handle the paperwork and can perform such a switch given sufficient notice. During a conversion period, the university was connected to both networks so that messages could arrive through either path.



Subnets


Although the individual subscribers do not need to tabulate network numbers or provide explicit routing, it is convenient for most Class B networks to be internally managed as a much smaller and simpler version of the larger network organizations. It is common to subdivide the two bytes available for internal assignment into a one byte department number and a one byte workstation ID.



The enterprise network is built using commercially available TCP/IP router boxes. Each router has small tables with 255 entries to translate the one byte department number into selection of a destination Ethernet connected to one of the routers. Messages to the PC Lube and Tune server (130.132.59.234) are sent through the national and New England regional networks based on the 130.132 part of the number. Arriving at Yale, the 59 department ID selects an Ethernet connector in the C& IS building. The 234 selects a particular workstation on that LAN. The Yale network must be updated as new Ethernets and departments are added, but it is not effected by changes outside the university or the movement of machines within the department.
A Uncertain Path


Every time a message arrives at an IP router, it makes an individual decision about where to send it next. There is concept of a session with a preselected path for all traffic. Consider a company with facilities in New York, Los Angeles, Chicago and Atlanta. It could build a network from four phone lines forming a loop (NY to Chicago to LA to Atlanta to NY). A message arriving at the NY router could go to LA via either Chicago or Atlanta. The reply could come back the other way.


How does the router make a decision between routes? There is no correct answer. Traffic could be routed by the "clockwise" algorithm (go NY to Atlanta, LA to Chicago). The routers could alternate, sending one message to Atlanta and the next to Chicago. More sophisticated routing measures traffic patterns and sends data through the least busy link.


If one phone line in this network breaks down, traffic can still reach its destination through a roundabout path. After losing the NY to Chicago line, data can be sent NY to Atlanta to LA to Chicago. This provides continued service though with degraded performance. This kind of recovery is the primary design feature of IP. The loss of the line is immediately detected by the routers in NY and Chicago, but somehow this information must be sent to the other nodes. Otherwise, LA could continue to send NY messages through Chicago, where they arrive at a "dead end." Each network adopts some Router Protocol which periodically updates the routing tables throughout the network with information about changes in route status.


If the size of the network grows, then the complexity of the routing updates will increase as will the cost of transmitting them. Building a single network that covers the entire US would be unreasonably complicated. Fortunately, the Internet is designed as a Network of Networks. This means that loops and redundancy are built into each regional carrier. The regional network handles its own problems and reroutes messages internally. Its Router Protocol updates the tables in its own routers, but no routing updates need to propagate from a regional carrier to the NSF spine or to the other regions (unless, of course, a subscriber switches permanently from one region to another).


Undiagnosed Problems


IBM designs its SNA networks to be centrally managed. If any error occurs, it is reported to the network authorities. By design, any error is a problem that should be corrected or repaired. IP networks, however, were designed to be robust. In battlefield conditions, the loss of a node or line is a normal circumstance. Casualties can be sorted out later on, but the network must stay up. So IP networks are robust. They automatically (and silently) reconfigure themselves when something goes wrong. If there is enough redundancy built into the system, then communication is maintained.


In 1975 when SNA was designed, such redundancy would be prohibitively expensive, or it might have been argued that only the Defense Department could afford it. Today, however, simple routers cost no more than a PC. However, the TCP/IP design that, "Errors are normal and can be largely ignored," produces problems of its own.


Data traffic is frequently organized around "hubs," much like airline traffic. One could imagine an IP router in Atlanta routing messages for smaller cities throughout the Southeast. The problem is that data arrives without a reservation. Airline companies experience the problem around major events, like the Super Bowl. Just before the game, everyone wants to fly into the city.

After the game, everyone wants to fly out. Imbalance occurs on the network when something new gets advertised. Adam Curry announced the server at "mtv.com" and his regional carrier was swamped with traffic the next day. The problem is that messages come in from the entire world over high speed lines, but they go out to mtv.com over what was then a slow speed phone line.


Occasionally a snow storm cancels flights and airports fill up with stranded passengers. Many go off to hotels in town. When data arrives at a congested router, there is no place to send the overflow. Excess packets are simply discarded. It becomes the responsibility of the sender to retry the data a few seconds later and to persist until it finally gets through. This recovery is provided by the TCP component of the Internet protocol.


TCP was designed to recover from node or line failures where the network propagates routing table changes to all router nodes. Since the update takes some time, TCP is slow to initiate recovery. The TCP algorithms are not tuned to optimally handle packet loss due to traffic congestion. Instead, the traditional Internet response to traffic problems has been to increase the speed of lines and equipment in order to say ahead of growth in demand.


TCP treats the data as a stream of bytes. It logically assigns a sequence number to each byte. The TCP packet has a header that says, in effect, "This packet starts with byte 379642 and contains 200 bytes of data." The receiver can detect missing or incorrectly sequenced packets. TCP acknowledges data that has been received and retransmits data that has been lost. The TCP design means that error recovery is done end-to-end between the Client and Server machine. There is no formal standard for tracking problems in the middle of the network, though each network has adopted some ad hoc tools.


Need to Know


There are three levels of TCP/IP knowledge. Those who administer a regional or national network must design a system of long distance phone lines, dedicated routing devices, and very large configuration files. They must know the IP numbers and physical locations of thousands of subscriber networks. They must also have a formal network monitor strategy to detect problems and respond quickly.


Each large company or university that subscribes to the Internet must have an intermediate level of network organization and expertise. A half dozen routers might be configured to connect several dozen departmental LANs in several buildings. All traffic outside the organization would typically be routed to a single connection to a regional network provider.


However, the end user can install TCP/IP on a personal computer without any knowledge of either the corporate or regional network. Three pieces of information are required:

  1. The IP address assigned to this personal computer
  2. The part of the IP address (the subnet mask) that distinguishes other machines on the same LAN (messages can be sent to them directly) from machines in other departments or elsewhere in the world (which are sent to a router machine)
  3. The IP address of the router machine that connects this LAN to the rest of the world.

In the case of the PCLT server, the IP address is 130.132.59.234. Since the first three bytes designate this department, a "subnet mask" is defined as 255.255.255.0 (255 is the largest byte value and represents the number with all bits turned on). It is a Yale convention (which we recommend to everyone) that the router for each department have station number 1 within the department network. Thus the PCLT router is 130.132.59.1. Thus the PCLT server is configured with the values:

  • My IP address: 130.132.59.234
  • Subnet mask: 255.255.255.0
  • Default router: 130.132.59.1

The subnet mask tells the server that any other machine with an IP address beginning 130.132.59.* is on the same department LAN, so messages are sent to it directly. Any IP address beginning with a different value is accessed indirectly by sending the message through the router at 130.132.59.1 (which is on the departmental LAN).

Additional information is available in self-study courses from SRA (1-800-SRA-1277)


TCP/IP [34610]


Copyright 1995 PCLT -- Introduction to TCP/IP -- H. Gilbert
This document generated by SpHyDir another fine product of PC Lube and Tune.

OSI 7 Layers Reference Model For Network Communication

Open Systems Interconnection (OSI) model is a reference model developed by ISO (International Organization for Standardization) in 1984, as a conceptual framework of standards for communication in the network across different equipment and applications by different vendors. It is now considered the primary architectural model for inter-computing and internetworking communications. Most of the network communication protocols used today have a structure based on the OSI model. The OSI model defines the communications process into 7 layers, which divides the tasks involved with moving information between networked computers into seven smaller, more manageable task groups. A task or group of tasks is then assigned to each of the seven OSI layers. Each layer is reasonably self-contained so that the tasks assigned to each layer can be implemented independently. This enables the solutions offered by one layer to be updated without adversely affecting the other layers.

The OSI 7 layers model has clear characteristics. Layers 7 through 4 deal with end to end communications between data source and destinations. Layers 3 to 1 deal with communications between network devices.

On the other hand, the seven layers of the OSI model can be divided into two groups: upper layers (layers 7, 6 & 5) and lower layers (layers 4, 3, 2, 1). The upper layers of the OSI model deal with application issues and generally are implemented only in software. The highest layer, the application layer, is closest to the end user. The lower layers of the OSI model handle data transport issues. The physical layer and the data link layer are implemented in hardware and software. The lowest layer, the physical layer, is closest to the physical network medium (the wires, for example) and is responsible for placing data on the medium.

The specific description for each layer is as follows:

Layer 7:Application Layer

Defines interface to user processes for communication and data transfer in network
Provides standardized services such as virtual terminal, file and job transfer and operations


Layer 6:Presentation Layer

Masks the differences of data formats between dissimilar systems

Specifies architecture-independent data transfer format

Encodes and decodes data; Encrypts and decrypts data; Compresses and decompresses data


Layer 5:Session Layer
Manages user sessions and dialogues

Controls establishment and termination of logic links between users

Reports upper layer errors


Layer 4:Transport Layer

Manages end-to-end message delivery in network

Provides reliable and sequential packet delivery through error recovery and flow control
mechanisms

Provides connectionless oriented packet delivery


Layer 3:Network Layer

Determines how data are transferred between network devices

Routes packets according to unique network device addresses

Provides flow and congestion control to prevent network resource depletion


Layer 2:Data Link Layer

Defines procedures for operating the communication links

Frames packets

Detects and corrects packets transmit errors


Layer 1:Physical Layer

Defines physical means of sending data over network devices

Interfaces between network medium and devices

Defines optical, electrical and mechanical characteristics

There are other network architecture models, such as IBM SNA (Systems Network Architecture) model . Those models will be discussed in separate documents.

The OSI 7 layer model is defined by ISO in document 7498 and ITU X.200, X.207, X.210, X.211, X.212, X.213, X.214, X.215, X.217 and X.800. The protocols defined by ISO based on the OSI 7 layer mode are as follows:


Application
ACSE: Association Control Service Element

CMIP: Common Management Information Protocol

CMIS: Common Management Information Service

CMOT: CMIP over TCP/IP

FTAM: File Transfer Access and Management

ROSE: Remote Operation Service Element

RTSE: Reliable Transfer Service Element Protocol

VTP: ISO Virtual Terminal Protocol

X.400: Message Handling Service (ISO email transmission service) Protocols

X.500: Directory Access Service Protocol (DAP)


Presentation Layer
ISO-PP: OSI Presentation Layer Protocol

ASN.1: Abstract Syntax Notation One


Session Layer
ISO-SP: OSI Session Layer Protocol


Transport Layer
ISO-TP: OSI Transport Protocols: TP0, TP1, TP2, TP3, TP4


Network Layer
ISO-IP: CLNP: Connectionless Network Protocol

CONP: Connection-Oriented Network Protocol

ES-IS: End System to Intermediate System Routing Exchange protocol

IDRP: Inter-Domain Routing Protocol

IS-IS: Intermediate System to Intermediate System


Data Link
HDLC: High Level Data Link Control protocol

LAPB: Link Access Procedure Balanced for X.25


Reference: http://www.doc.ua.pt/arch/itu/rec/product/X.htm :

Wireless LAN

From Wikipedia, the free encyclopedia


















A wireless LAN or WLAN is a wireless local area network, which is the linking of two or more computers or devices without using wires. WLAN utilizes spread-spectrum or OFDM modulation technology based on radio waves to enable communication between devices in a limited area, also known as the basic service set. This gives users the mobility to move around within a broad coverage area and still be connected to the network.


For the home user, wireless has become popular due to ease of installation, and location freedom with the gaining popularity of laptops. Public businesses such as coffee shops or malls have begun to offer wireless access to their customers; some are even provided as a free service. Large wireless network projects are being put up in many major cities. Google is even providing a free service to Mountain View, California[1] and has entered a bid to do the same for San Francisco.[2] New York City has also begun a pilot program to cover all five boroughs of the city with wireless Internet access.

Contents


History
In 1970 University of Hawaii, under the leadership of Norman Abramson, developed the world’s first computer communication network using low-cost ham-like radios, named ALOHAnet. The bi-directional star topology of the system included seven computers deployed over four islands to communicate with the central computer on the Oahu Island without using phone lines.

"In 1979, F.R. Gfeller and U. Bapst published a paper in the IEEE Proceedings reporting an experimental wireless local area network using diffused infrared communications. Shortly thereafter, in 1980, P. Ferrert reported on an experimental application of a single code spread spectrum radio for wireless terminal communications in the IEEE National Telecommunications Conference. In 1984, a comparison between Infrared and CDMA spread spectrum communications for wireless office information networks was published by Kaveh Pahlavan in IEEE Computer Networking Symposium which appeared later in the IEEE Communication Society Magazine. In May 1985, the efforts of Marcus led the FCC to announce experimental ISM bands for commercial application of spread spectrum technology. Later on, M. Kavehrad reported on an experimental wireless PBX system using code division multiple access. These efforts prompted significant industrial activities in the development of a new generation of wireless local area networks and it updated several old discussions in the portable and mobile radio industry.


The first generation of wireless data modems was developed in the early 1980's by amateur radio operators. They added a voice band data communication modem, with data rates below 9600 bit/s, to an existing short distance radio system, typically in the two meter amateur band. The second generation of wireless modems was developed immediately after the FCC announcement in the experimental bands for non-military use of the spread spectrum technology. These modems provided data rates on the order of hundreds of kbit/s. The third generation of wireless modem [then] aimed at compatibility with the existing LANs with data rates on the order of Mbit/s. Several companies [developed] the third generation products with data rates above 1 Mbit/s and a couple of products [had] already been announced [by the time of the first IEEE Workshop on Wireless LANs].


"The first of the IEEE Workshops on Wireless LAN was held in 1991. At that time early wireless LAN products had just appeared in the market and the IEEE 802.11 committee had just started its activities to develop a standard for wireless LANs. The focus of that first workshop was evaluation of the alternative technologies. [By 1996], the technology [was] relatively mature, a variety of applications [had] been identified and addressed and technologies that enable these applications [were] well understood. Chip sets aimed at wireless LAN implementations and applications, a key enabling technology for rapid market growth, [were] emerging in the market. Wireless LANs [were being] used in hospitals, stock exchanges, and other in building and campus settings for nomadic access, point-to-point LAN bridges, ad-hoc networking, and even larger applications through internetworking. The IEEE 802.11 standard and variants and alternatives, such as the wireless LAN interoperability forum and the European HiperLAN specification had made rapid progress, and the unlicensed PCS [ Unlicensed Personal Communications Services and the proposed SUPERNet, later on renamed as U-NII, bands also presented new opportunities.


On July 21, 1999, AirPort debuted at the Macworld Expo in New York City with Steve Jobs picking up an iBook supposedly to give the cameraman a better shot as he surfed the Web. Applause quickly built as people realized there were no wires. This was the first time Wireless LAN became publicly available at consumer pricing and easily available for home use. Before the release of the Airport, Wireless LAN was too expensive for consumer use and used exclusively in large corporate settings.
Originally WLAN hardware was so expensive that it was only used as an alternative to cabled LAN in places where cabling was difficult or impossible. Early development included industry-specific solutions and proprietary protocols, but at the end of the 1990s these were replaced by standards, primarily the various versions of IEEE 802.11 (Wi-Fi). An alternative ATM-like 5 GHz standardized technology, HiperLAN/2, has so far not succeeded in the market, and with the release of the faster 54 Mbit/s 802.11a (5 GHz) and 802.11g (2.4 GHz) standards, almost certainly never will.


In November 2006, the Australian Commonwealth Scientific and Industrial Research Organisation (CSIRO) won a legal battle in the US federal court of Texas against Buffalo Technology which found the US manufacturer had failed to pay royalties on a US WLAN patent CSIRO had filed in 1996. CSIRO are currently engaged in legal cases with computer companies including Microsoft, Intel, Dell, Hewlett-Packard and Netgear which argue that the patent is invalid and should negate any royalties paid to CSIRO for WLAN-based products.


Benefits

The popularity of wireless LANs is a testament primarily to their convenience, cost efficiency, and ease of integration with other networks and network components. The majority of computers sold to consumers today come pre-equipped with all necessary wireless LAN technology.
The benefits of wireless LANs include:


Convenience: The wireless nature of such networks allows users to access network resources from nearly any convenient location within their primary networking environment (home or office). With the increasing saturation of laptop-style computers, this is particularly relevant.


Mobility: With the emergence of public wireless networks, users can access the internet even outside their normal work environment. Most chain coffee shops, for example, offer their customers a wireless connection to the internet at little or no cost.


Productivity: Users connected to a wireless network can maintain a nearly constant affiliation with their desired network as they move from place to place. For a business, this implies that an employee can potentially be more productive as his or her work can be accomplished from any convenient location.


Deployment: Initial setup of an infrastructure-based wireless network requires little more than a single access point. Wired networks, on the other hand, have the additional cost and complexity of actual physical cables being run to numerous locations (which can even be impossible for hard-to-reach locations within a building).


Expandability: Wireless networks can serve a suddenly-increased number of clients with the existing equipment. In a wired network, additional clients would require additional wiring.


Cost: Wireless networking hardware is at worst a modest increase from wired counterparts. This potentially increased cost is almost always more than outweighed by the savings in cost and labor associated to running physical cables.


Disadvantages

Wireless LAN technology, while replete with the conveniences and advantages described above, has its share of downfalls. For a given networking situation, wireless LANs may not be desirable for a number of reasons. Most of these have to do with the inherent limitations of the technology.


Security: Wireless LAN transceivers are designed to serve computers throughout a structure with uninterrupted service using radio frequencies. Because of space and cost, the antennas typically present on wireless networking cards in the end computers are generally relatively poor. In order to properly receive signals using such limited antennas throughout even a modest area, the wireless LAN transceiver utilizes a fairly considerable amount of power. What this means is that not only can the wireless packets be intercepted by a nearby adversary's poorly-equipped computer, but more importantly, a user willing to spend a small amount of money on a good quality antenna can pick up packets at a remarkable distance; perhaps hundreds of times the radius as the typical user. In fact, there are even computer users dedicated to locating and sometimes even cracking into wireless networks, known as wardrivers. On a wired network, any adversary would first have to overcome the physical limitation of tapping into the actual wires, but this is not an issue with wireless packets. To combat this consideration, wireless networks users usually choose to utilize various encryption technologies available such as Wi-Fi Protected Access (WPA). Some of the older encryption methods, such as WEP are known to have weaknesses that a dedicated adversary can compromise. (See main article: Wireless security.)

Range: The typical range of a common 802.11g network with standard equipment is on the order of tens of metres. While sufficient for a typical home, it will be insufficient in a larger structure. To obtain additional range, repeaters or additional access points will have to be purchased. Costs for these items can add up quickly. Other technologies are in the development phase, however, which feature increased range, hoping to render this disadvantage irrelevant. (See WiMAX)
Reliability: Like any radio frequency transmission, wireless networking signals are subject to a wide variety of interference, as well as complex propagation effects (such as multipath, or especially in this case Rician fading) that are beyond the control of the network administrator. One of the most insidious problems that can affect the stability and reliability of a wireless LAN is the microwave oven.[7] In the case of typical networks, modulation is achieved by complicated forms of phase-shift keying (PSK) or quadrature amplitude modulation (QAM), making interference and propagation effects all the more disturbing. As a result, important network resources such as servers are rarely connected wirelessly.
Speed: The speed on most wireless networks (typically 1-108 Mbit/s) is reasonably slow compared to the slowest common wired networks (100 Mbit/s up to several Gbit/s). There are also performance issues caused by TCP and its built-in congestion avoidance. For most users, however, this observation is irrelevant since the speed bottleneck is not in the wireless routing but rather in the outside network connectivity itself. For example, the maximum ADSL throughput (usually 8 Mbit/s or less) offered by telecommunications companies to general-purpose customers is already far slower than the slowest wireless network to which it is typically connected. That is to say, in most environments, a wireless network running at its slowest speed is still faster than the internet connection serving it in the first place. However, in specialized environments, higher throughput through a wired network might be necessary. Newer standards such as 802.11n are addressing this limitation and will support peak throughputs in the range of 100-200 Mbit/s.


Wireless LANs present a host of issues for network managers. Unauthorized access points, broadcasted SSIDs, unknown stations, and spoofed MAC addresses are just a few of the problems addressed in WLAN troubleshooting. Most network analysis vendors, such as Network Instruments, Network General, and Fluke, offer WLAN troubleshooting tools or functionalities as part of their product line.


Architecture

Stations
All components that can connect into a wireless medium in a network are referred to as stations.
All stations are equipped with wireless network interface cards (WNICs).
Wireless stations fall into one of two categories: access points, and clients.
Access points (APs) are base stations for the wireless network. They transmit and receive radio frequencies for wireless enabled devices to communicate with.
Wireless clients can be mobile devices such as laptops, personal digital assistants, IP phones, or fixed devices such as desktops and workstations that are equipped with a wireless network interface.


Basic service set
The basic service set (BSS) is a set of all stations that can communicate with each other.
There are two types of BSS: Independent BSS ( also referred to as IBSS ), and infrastructure BSS.
Every BSS has an identification (ID) called the BSSID, which is the MAC address of the access point servicing the BSS.
An independent BSS (IBSS) is an ad-hoc network that contains no access points, which means they can not connect to any other basic service set.
An infrastructure BSS can communicate with other stations not in the same basic service set by communicating through access points.

Extended service set
An extended service set (ESS) is a set of connected BSSes. Access points in an ESS are connected by a distribution system. Each ESS has an ID called the SSID which is a 32-byte (maximum) character string. For example, "linksys" is the default SSID for Linksys routers.

Distribution system
A distribution system connects access points in an extended service setup. The concept of a DS can be to increase network coverage through roaming between cell's.



Types of wireless LANs


Peer-to-peer

Peer-to-Peer or ad-hoc wireless LAN
An ad-hoc network is a network where stations communicate only peer to peer (P2P). There is no base and no one gives permission to talk. This is accomplished using the Independent Basic Service Set (IBSS).


A peer-to-peer (P2P) allows wireless devices to directly communicate with each other. Wireless devices within range of each other can discover and communicate directly without involving central access points. This method is typically used by two computers so that they can connect to each other to form a network.
If a signal strength meter is used in this situation, it may not read the strength accurately and can be misleading, because it registers the strength of the strongest signal, which may be the closest computer.


802.11 specs define the physical layer (PHY) and MAC (Media Access Control) layers. However, unlike most other IEEE specs, 802.11 includes three alternative PHY standards: diffuse infrared operating at 1 Mbit/s in; frequency-hopping spread spectrum operating at 1 Mbit/s or 2 Mbit/s; and direct-sequence spread spectrum operating at 1 Mbit/s or 2 Mbit/s. A single 802.11 MAC standard is based on CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance). The 802.11 specification includes provisions designed to minimize collisions. Because two mobile units may both be in range of a common access point, but not in range of each other. The 802.11 has two basic modes of operation: Ad hoc mode enables peer-to-peer transmission between mobile units. Infrastructure mode in which mobile units communicate through an access point that serves as a bridge to a wired network infrastructure is the more common wireless LAN application the one being covered. Since wireless communication uses a more open medium for communication in comparison to wired LANs, the 802.11 designers also included a shared-key encryption mechanism, called wired equivalent privacy (WEP), or Wi-Fi Protected Access, (WPA, WPA2) to secure wireless computer networks.

Bridge
A bridge can be used to connect networks, typically of different types. A wireless Ethernet bridge allows the connection of devices on a wired Ethernet network to a wireless network. The bridge acts as the connection point to the Wireless LAN.

Wireless distribution system
Main article: Wireless Distribution System
When it is difficult to connect all of the access points in a network by wires, it is also possible to put up access points as repeaters.

Roaming
There are 2 definitions for roaming in WLAN:
Internal Roaming (1): The Mobile Station (MS) moves from one access point (AP) to another AP within a home network because the signal strength is too weak. An authentication server (RADIUS) assumes the re-authentication of MS via 802.1x (e.g. with PEAP). The billing of QoS is in the home network.
External Roaming (2): The MS(client) moves into a WLAN of an another Wireless Service Provider (WSP) and takes their services (Hotspot). The user can independently of his home network use another foreign network, if this is open for visitors. There must be special authentication and billing systems for mobile services in a foreign network

LAN TOPOLOGY




















There are four basic types of LAN topology.
  • STAR
  • RING
  • BUS
  • TREE

STAR NETWORK




In the star LAN topology, each station is directly connected to a common central node. Typically, each station attaches to a central node, referred to as the star coupler, via two point-to-point links, one for transmission and one for reception. In general, there are two alternatives for the operation of the central node. One approach is for the central node to operate in a broadcast fashion. A transmission of a frame from one station to the node is retransmitted on all of the outgoing links. In this case, although the arrangement is physically a star, it is logically a bus; a transmission from any station is received by all other stations, and only one station at a time may successfully transmit. Another approach is for the central node to act as a frame switching device. An incoming frame is buffered in the node and then retransmitted on an outgoing link to the destination station.


RING TOPOLOGY


In the ring topology, the network consists of a set of repeaters joined by point-topoint links in a closed loop. The repeater is a comparatively simple device, capable of receiving data on one link and transmitting them, bit by bit, on the other link as fast as they are received, with no buffering at the repeater. The links are unidirectional; that is, data are transmitted in one direction only and all are oriented in the same way. Thus, data circulate around the ring in one direction (clockwise or counterclockwise).Each station attaches to the network at a repeater and can transmit data onto the network through that repeater. As with the bus and tree, data are transmitted in frames. As a frame circulates past all the other stations, the destination station recognizes its address and copies the frame into a local buffer as it goes by. The frame continues to circulate until it returns to the source station, where it is removed. Because multiple stations share the ring, medium access control is needed to determine at what time each station may insert frames.


BUS TOPOLOGY





For the bus, all stations attach, through appropriate hardware interfacing known as a tap, directly to a linear transmission medium, or bus. Full-duplex operation between the station and the tap allows data to be transmitted onto the bus and received from the bus. A transmission from any station propagates the length of the medium in both directions and can be received by all other stations. At each end of the bus is a terminator, which absorbs any signal, removing it from the bus.



TREE TOPOLOGY




The tree topology is a generalization of the bus topology. The transmission medium is a branching cable with no closed loops. The tree layout begins at a point known as the headend, where one or more cables start, and each of these may have branches. The branches in turn may have additional branches to allow quite complex layouts. Again, a transmission from any station propagates throughout the medium and can be received by all other stations. Two problems present themselves in this arrangement. First, because a transmission from any one station can be received by all other stations, there needs to be some way of indicating for whom the transmission is intended. Second, a mechanism is needed to regulate transmission.


INTRODUCTION TO LAN

This web site is about LAN AND LAN TOPOLOGY.

AN EXAMPLE OF LOCAL AREA NET WORK
LANs are the high speed, low-error data netorks that span a relatively small geographic area. they connect workstations,peripherals,terminals, and other devices in a single building or other geographically limited area.

The LANs are distinguished from other types of data networks in that they are optimized for a moderate size geographic area such as a single office building, a warehouse, or a campus. The IEEE 802 LAN is a shared medium peer-to-peer communications network that broadcasts information for all stations to receive. As a consequence, it does not inherently provide privacy. The LAN enables stations to communicate directly using a common physical medium on a point-to-point basis without any intermediate switching node being required. There is always need for an access sublayer in order to arbitrate the access to the shared medium. The network is generally owned, used, and operated by a single organization. This is in contrast to Wide Area Networks (WANs) that interconnect communication facilities in different parts of a country or are used as a public utility. These LANs are also different from networks, such as backplane buses, that are optimized for the interconnection of devices on a desk top or components within a single piece of equipment


LAN COMPONENTS
The components of LAN are as following:
  • WORKSTATIONS
  • NETWORKING MEDIA
  • NIC CARDS

WORKSTATION
























UNSHIELDED TWISTED-PAIR CABLE


COAXIAL CABLE

Protocol (computing)

From Wikipedia, the free encyclopedia
In computing, a protocol is a convention or standard that controls or enables the connection, communication, and data transfer between two computing endpoints. In its simplest form, a protocol can be defined as the rules governing the syntax, semantics, and synchronization of communication. Protocols may be implemented by hardware, software, or a combination of the two. At the lowest level, a protocol defines the behavior of a hardware connection.

Meaning: Set of rules.
Contents
1 Typical properties
2 Importance
3 Common protocols
4 Protocol testing
5 See also

Typical properties
It is difficult to generalize about protocols because they vary so greatly in purpose and sophistication. Most protocols specify one or more of the following properties:
Detection of the underlying physical connection (wired or wireless), or the existence of the other endpoint or node

Handshaking
Negotiation of various connection characteristics
How to start and end a message
How to format a message
What to do with corrupted or improperly formatted messages (error correction)
How to detect unexpected loss of the connection, and what to do next
Termination of the session or connection.

Importance
The widespread use and expansion of communications protocols is both a prerequisite for the Internet, and a major contributor to its power and success. The pair of Internet Protocol (or IP) and Transmission Control Protocol (or TCP) are the most important of these, and the term TCP/IP refers to a collection (or protocol suite) of its most used protocols. Most of the Internet's communication protocols are described in the RFC documents of the Internet Engineering Task Force (or IETF).

The protocols in human communication are separate rules about appearance, speaking, listening and understanding. All these rules, also called protocols of conversation, represent different layers of communication. They work together to help people successfully communicate. The need for protocols also applies to network devices. Computers have no way of learning protocols, so network engineers have written rules for communication that must be strictly followed for successful host-to-host communication. These rules apply to different layers of sophistication such as which physical connections to use, how hosts listen, how to interrupt, how to say good-bye,in short how to communicate, what language to use and many others. These rules, or protocols, that work together to ensure successful communication are groups into what is known as a protocol suite.
Object-oriented programming has extended the use of the term to include the programming protocols available for connections and communication between objects.
Generally, only the simplest protocols are used alone. Most protocols, especially in the context of communications or networking, are layered together into protocol stacks where the various tasks listed above are divided among different protocols in the stack.
Whereas the protocol stack denotes a specific combination of protocols that work together, a reference model is a software architecture that lists each layer and the services each should offer. The classic seven-layer reference model is the OSI model, which is used for conceptualizing protocol stacks and peer entities. This reference model also provides an opportunity to teach more general software engineering concepts like hiding, modularity, and delegation of tasks. This model has endured in spite of the demise of many of its protocols (and protocol stacks) originally sanctioned by the ISO. The OSI model is not the only reference model however.

Common protocols
IP (Internet Protocol)
UDP (User Datagram Protocol)
TCP (Transmission Control Protocol)
DHCP (Dynamic Host Configuration Protocol)
HTTP (Hypertext Transfer Protocol)
FTP (File Transfer Protocol)
Telnet (Telnet Remote Protocol)
SSH (Secure Shell Remote Protocol)
POP3 (Post Office Protocol 3)
SMTP (Simple Mail Transfer Protocol)
IMAP (Internet Message Access Protocol)

Protocol testing
In general, protocol testers work by capturing the information exchanged between a Device Under Test (DUT) and a reference device known to operate properly. In the example of a manufacturer producing a new keyboard for a personal computer, the Device Under Test would be the keyboard and the reference device, the PC. The information exchanged between the two devices is governed by rules set out in a technical specification called a "communication protocol". Both the nature of the communication and the actual data exchanged are defined by the specification. Since communication protocols are state-dependent (what should happen next depends on what previously happened), specifications are complex and the documents describing them can be hundreds of pages.

The captured information is decoded from raw digital form into a human-readable format that permits users of the protocol tester to easily review the exchanged information. Protocol testers vary in their abilities to display data in multiple views, automatically detect errors, determine the root causes of errors, generate timing diagrams, etc.

Some protocol testers can also generate traffic and thus act as the reference device. Such testers generate protocol-correct traffic for functional testing, and may also have the ability to deliberately introduce errors to test for the DUT's ability to deal with error conditions.

Protocol testing is an essential step towards commercialization of standards-based products. It help ensure that products from different manufacturers will operate together properly ("interoperate") and so satisfy customer expectations. This type of testing is of particular importance for new emerging communication technologies.

See also
Internet protocol suite
Communications protocol
List of network protocols
Application programming interface
Calling convention
Retrieved from "http://en.wikipedia.org/wiki/Protocol_%28computing%29"