Wednesday, November 30, 2011


using namespace std;
int Arr[10]={1,2,3,4,5,6,7,8,9,10};
int i=0,j=9,mod,input;
cout<<"Type number to search ";
     cout<<"\nNumber "<<input<<" is located at index "<<i<<"\n";
     cout<<"\nNumber "<<input<<" is not present in the list\n\n";

Saturday, November 26, 2011


Token Ring:

A big competitor to Ethernet in the past was Token Ring, which runs at 4 Mbps or 16 Mbps. Token Ring is a network architecture that uses a star ring topology (a hybrid, looking physically like a star but logically wired as a ring) and can use many forms of cables. 

IBM Token Ring has its own proprietary cable types, while more modern implementations of Token Ring can use CAT 3 or CAT 5 UTP cabling. Token Ring uses the token-passing access method. 

Looking at Token Ring networks today, you may wonder where the “ring” topology is, because the network appears to have a star topology. The reason why it appears that this network architecture is using a star topology is that all hosts are connected to a central device that looks similar to a hub, but with Token Ring, this device is called a multistation access unit (MAU or MSAU). . The ring is the internal communication path within the wiring. 

Token Ring uses token passing; it is impossible to have collisions in a token-passing environment, because the MAUs do not have collisions lights like an Ethernet hub does (remember that Ethernet uses CSMA /CD and there is potential for collisions).

Monday, November 21, 2011


Circuit and Packet Switching:

We can divide data connections through a telecommunications network into different categories based on the principle of how the communications circuit is built between the communicating devices. Data communications through the telecommunications network may use three basic different types of circuits:
Leased or dedicated: The cost of a leased line is fixed per month and depends on the capacity and length of the connection.
Circuit switched or dial-up: The cost of switched service depends on the time the service is used, the data rate, and the distance.

Packet switched: The cost is often fixed and depends on the interface data rate. In some packet-switched networks cost may depend on the amount of transferred data. Agreements with the service provider may specify other parameters that influence the cost, such as the maximum data rate or average data rate.

For corporate data networks, the leased-line solution is often attractive when the LANs of offices in a region need to be interconnected. The network operator provides a permanent circuit and the monthly cost is fixed and depends only on the agreed-on data rate. Over long distances, however, leased lines become expensive and switched service is often preferred. In such a service, several corporate networks share transmission capacity and the cost of the backbone of the telecommunications network operator. Within the switched category there are two subcategories, circuit and packet-switched networks as shown in Figure  both of which are used for data transmission.

Circuit Switching 

Circuit-switched networks provide fixed bandwidth and very short and fixed delay. It is the primary technology for voice telephone, video telephone and video conferencing. The disadvantage is that it is inflexible for data communications where the demand for transmission data rate is far from constant but varies extensively over short time scales. Some older generation data networks used the circuit switching principle. In the beginning a circuit-switched connection is dialed up by the data source. The routing is based on the destination subscriber number given when the circuit is established. The connection is released after the communication is over. During a conversation, the data capacity of the connection is fixed and it is reserved only for this conversation regardless of whether the data capacity is used or not. At the end of the call, the circuit is released. ISDN as well as the telephone network use the circuit-switching principle.

Packet Switching:

Packet-switched networks are specially designed for data communication. The source data are split into packets containing route or destination identifications. The packets are routed toward the destination by packet-switching nodes on the path through the network. The major drawback of the packet-switched technology is that it usually cannot provide a service for applications that require constant and low delay. There are two basic types of packet-switched networks.
virtual circuits and datagram transmission. In the case of virtual circuits, the virtual connection is established at the beginning of each conversation or it is permanently set up and every packet belonging to a certain connection is transmitted via the same established route. The main difference between circuit-switched physical circuits and virtual circuits is that many users share the capacity of the transmission lines and channels between network nodes if virtual instead of physical circuits are used. At a certain moment active users may use all the available capacity if other users are not transmitting anything. The complete address information is not needed in the packets when the connection is established. Only a short connection identifier is included in each packet to define the virtual circuit to which the packet belongs.

Another method for packet-switched data communications is connectionless datagram transmission in which routing devices perform routing procedures, and each packet contains a full destination address. We discuss this layer 3 (network layer) routing principle next. 

Wednesday, November 16, 2011


IP address defined
Every device connected to a TCP/IP network requires at least one IP address and must be unique within that network. An IP address is commonly represented in dotted decimal notation. Here are some examples of IP addresses shown in dotted decimal form.
As in these examples, all IP addresses are 32 bits long and are comprised of four 8-bit segments known as octets. Representing IP addresses in dotted decimal notation makes them a lot easier to read than in the machine friendly binary format. As you will see in the next section, however, the capability to convert IP addresses to-and-from binary format is required for configuring your TCP/IP network and for the exam. The following is an example of an IP address shown in dotted decimal and its equivalent binary notation.
Dotted Decimal Binary   11001111 00010101 00100000 00001100

Network ID and Host ID

Although an IP address is a single value, it is divided into two pieces of information: the network ID and the host ID of the networked device.
The network ID identifies the systems that are located on the same physical network. All systems on the same physical network must have the same network ID, and the network ID must be unique to the local segment. In this case, local is defined as being on one side of a router.
The host ID identifies a workstation, server, router, or other TCP/IP device within a network. The host address for each device must be unique to the network ID. A computer connected to a TCP/IP network uses the network ID and host ID to determine which
packets it should receive or ignore and to determine which devices are to have the opportunity of receiving its transmissions.
Throughout the world, TCP/IP networks vary greatly in size and scope. In order to accommodate the wide range of network design needs, IP addresses have been divided into classes.

IP Address Classes Defined

The IP address is 32 bits in length and is used to identify both the host address and the address of the network in which the host resides. An address class is defined to allocate the minimum number of bits that are to be used as the network ID. The remaining bits can be used to further subdivide the network using subnet masks and to define the host ID.

Reasons for Using Specific Address Classes

If you are new to TCP/IP, you may be asking yourself “Why are there different classes of IP addresses, and how can I use them?” First of all, the Internet community has defined the different types of IP addresses in order to accommodate the needs of networks of different sizes. A network with less than 255 devices (workstations, routers, printers, and so) can be assigned a Class C network address. However, a large organization with up to 65,534
devices will need at least a Class B address.
Second, as long as you are not connecting your internal network directly to the public Internet, you can use any valid Class A, B, or C address you want. However, any device that is connected directly to the Internet, must be assigned a network ID from the Internet
community. The organization responsible for administering the assignment of the network ID portions of IP addresses for network devices directly connected to the Internet is the Internet Network Information Center (InterNIC).

Class A addresses are assigned to networks with extremely large numbers of hosts (networked devices). The MSB is set to 0, and is combined with the remaining seven bits of the first octet to complete the network ID. This leaves the last 3 octets, or 24 bits to be assigned to subnet masking and to hosts. As we saw in table 3.3, this allows for 126 (27-2) networks with up to 16,777,214 (221-2) hosts per network. An example of a Class A address is where is the network and is the host.

Class B addresses are assigned to networks with no more than 65,534 (216-2) hosts (networked devices). The MSBs are set to 10, and are combined with the remaining 14 bits of the first two octets to complete the network ID. This leaves the last 2 octets, or 16 bits to be assigned to subnet masking and to hosts and allows for 16,384 (214) networks. Each of these networks can have as many as 65+ thousand hosts. An example of a Class B address is here the network is and the host is 21.253.

Class C addresses are assigned to small networks with a more limited number of hosts. The MSBs are set to 110, and are combined with the remaining 21 bits of the first three octets
to complete the network ID. This leaves the last octet available to be assigned to subnet masking and to hosts, allowing for 2,097,152 (221) networks with up to 254 (28-2) hosts per
network. An example of a Class B address is which is a network of with a host ID of

Class D addresses are reserved for multicast groups. Multicast addresses are assigned to groups of hosts that are cooperating, or are related in some manner. Each host in a multicast group has to be configured to accept multicast packets. The MSBs of a class D address are set to 1110. The remaining bits are uniquely assigned to each group of hosts. Microsoft NT supports class D addresses for applications such as Microsoft Net-Show.

Class E addresses are an experimental class of IP addresses reserved for use in the future. The MSBs for class E address