All about Router
Explaination
Home | Explaination | Cisco Router Hardware | Router Configuration | Router Working | IOS - A | IOS-B | IOS-C | STP | VLAN | Layer 2 Switching | Last Minute Revision - CCNA IOS | ISDN | IPX | IP Addressing | FREQUENT | Subnet | Router Configuration | LMR-CCNA | Cisco Secret | Cisco IOS Basic Commands | Glossary | Working | Switch Working | OSI | VPN | Firewalls | NAT

What is an IP address?
Every machine on the Internet has a unique identifying number, called an IP Address. A typical IP address looks like this:
216.27.61.137
To make it easier for us humans to remember, IP addresses are normally expressed in decimal format as a "dotted decimal number" like the one above. But computers communicate in binary form. Look at the same IP address in binary:
11011000.00011011.00111101.10001001
The four numbers in an IP address are called octets, because they each have eight positions when viewed in binary form. If you add all the positions together, you get 32, which is why IP addresses are considered 32-bit numbers. Since each of the eight positions can have two different states (1 or 0) the total number of possible combinations per octet is 28 or 256. So each octet can contain any value between 0 and 255. Combine the four octets and you get 232 or a possible 4,294,967,296 unique values!
Out of the almost 4.3 billion possible combinations, certain values are restricted from use as typical IP addresses. For example, the IP address 0.0.0.0 is reserved for the default network and the address 255.255.255.255 is used for broadcasts.
The octets serve a purpose other than simply separating the numbers. They are used to create classes of IP addresses that can be assigned to a particular business, government or other entity based on size and need. The octets are split into two sections: Net and Host. The Net section always contains the first octet. It is used to identify the network that a computer belongs to. Host (sometimes referred to as Node) identifies the actual computer on the network. The Host section always contains the last octet. There are five IP classes plus certain special addresses:
Default Network - The IP address of 0.0.0.0 is used for the default network.

Class A - This class is for very large networks, such as a major international company might have. IP addresses with a first octet from 1 to 126 are part of this class. The other three octets are used to identify each host. This means that there are 126 Class A networks each with 16,777,214 (224 -2) possible hosts for a total of 2,147,483,648 (231) unique IP addresses. Class A networks account for half of the total available IP addresses. In Class A networks, the high order bit value (the very first binary number) in the first octet is always 0.
Net               Host or Node  
115.             24.53.107
 

Loopback - The IP address 127.0.0.1 is used as the loopback address. This means that it is used by the host computer to send a message back to itself. It is commonly used for troubleshooting and network testing.
 
Class B - Class B is used for medium-sized networks. A good example is a large college campus. IP addresses with a first octet from 128 to 191 are part of this class. Class B addresses also include the second octet as part of the Net identifier. The other two octets are used to identify each host. This means that there are 16,384 (214) Class B networks each with 65,534 (216 -2) possible hosts for a total of 1,073,741,824 (230) unique IP addresses. Class B networks make up a quarter of the total available IP addresses. Class B networks have a first bit value of 1 and a second bit value of 0 in the first octet.
Net                  Host or Node  
145.24.           53.107
 

Class C - Class C addresses are commonly used for small to mid-size businesses. IP addresses with a first octet from 192 to 223 are part of this class. Class C addresses also include the second and third octets as part of the Net identifier. The last octet is used to identify each host. This means that there are 2,097,152 (221) Class C networks each with 254 (28 -2) possible hosts for a total of 536,870,912 (229) unique IP addresses. Class C networks make up an eighth of the total available IP addresses. Class C networks have a first bit value of 1, second bit value of 1 and a third bit value of 0 in the first octet.
Net                     Host or Node  
195.24.53.       107
 
 
Class D - Used for multicast, Class D is slightly different from the first three classes. It has a first bit value of 1, second bit value of 1, third bit value of 1 and fourth bit value of 0. The other 28 bits are used to identify the group of computers the multicast message is intended for. Class D accounts for 1/16th (268,435,456 or 228) of the available IP addresses.
Net                   Host or Node  
224.                 24.53.107
 

Class E - Class E is used for experimental purposes only. Like Class D, it is different from the first three classes. It has a first bit value of 1, second bit value of 1, third bit value of 1 and fourth bit value of 1. The other 28 bits are used to identify the group of computers the multicast message is intended for. Class E accounts for 1/16th (268,435,456 or 228) of the available IP addresses.
Net                       Host or Node  
240.                     24.53.107
 
Broadcast - Messages that are intended for all computers on a network are sent as broadcast . These messages always use the IP address 255.255.255.255.
 
 
How does a T1 line work?
Most of us are familiar with a normal business or residential line from the phone company. A normal phone line like this is delivered on a pair of copper wires that transmit your voice as an analog signal. When you use a normal modem on a line like this, it can transmit data at perhaps 30 kilobits per second (30,000 bits per second).
The phone company moves nearly all voice traffic as digital rather than analog signals. Your analog line gets converted to a digital signal by sampling it 8,000 times per second at 8-bit resolution (64,000 bits per second). Nearly all digital data now flows over fiber optic lines, and the phone company uses different designations to talk about the capacity of a fiber optic line.
If your office has a T1 line, it means that the phone company has brought a fiber optic line into your office (a T1 line might also come in on copper). A T1 line can carry 24 digitized voice channels, or it can carry data at a rate of 1.544 megabits per second. If the T1 line is being used for telephone conversations, it plugs into the office's phone system. If it is carrying data it plugs into the network's router.
A T1 line can carry about 192,000 bytes per second -- roughly 60 times more data than a normal residential modem. It is also extremely reliable -- much more reliable than an analog modem. Depending on what they are doing, a T1 line can generally handle quite a few people. For general browsing, hundreds of users are easily able to share a T1 line comfortably. If they are all downloading MP3 or video files simultaneously it would be a problem, but that still isn't extremely common.
A T1 line might cost between $1,000 and $1,500 per month depending on who provides it and where it goes. The other end of the T1 line needs to be connected to a web serve, and the total cost is a combination of the fee the phone company charges and the fee the ISP charges.
A large company needs something more than a T1 line. The following list shows some of the common line designations:
DS0 - 64 kilobits per second
ISDN - Two DS0 lines plus signaling (16 kilobytes per second), or 128 kilobits per second
T1 - 1.544 megabits per second (24 DS0 lines)
T3 - 43.232 megabits per second (28 T1s)
OC3 - 155 megabits per second (84 T1s)
OC12 - 622 megabits per second (4 OC3s)
OC48 - 2.5 gigabits per seconds (4 OC12s)
OC192 - 9.6 gigabits per second (4 OC48s)

What is a packet?
It turns out that everything you do on the Internet involves packets. For example, every Web page that you receive comes as a series of packets, and every e-mail you send leaves as a series of packets. Networks that ship data around in small packets are called packet switched networks.
On the Internet, the network breaks an e-mail message into parts of a certain size in bytes. These are the packets. Each packet carries the information that will help it get to its destination -- the sender's IP address, the intended receiver's IP address, something that tells the network how many packets this e-mail message has been broken into and the number of this particular packet. The packets carry the data in the protocols that the Internet uses: Transmission Control Protocol/Internet Protocol (TCP/IP). Each packet contains part of the body of your message. A typical packet contains perhaps 1,000 or 1,500 bytes.
Each packet is then sent off to its destination by the best available route -- a route that might be taken by all the other packets in the message or by none of the other packets in the message. This makes the network more efficient. First, the network can balance the load across various pieces of equipment on a millisecond-by-millisecond basis. Second, if there is a problem with one piece of equipment in the network while a message is being transferred, packets can be routed around the problem, ensuring the delivery of the entire message.
Depending on the type of network, packets may be referred to by another name:
frame
block
cell
segment
Most packets are split into three parts:
header - The header contains instructions about the data carried by the packet. These instructions may include:
Length of packet (some networks have fixed-length packets, while others rely on the header to contain this information)
Synchronization (a few bits  that help the packet match up to the network)
Packet number (which packet this is in a sequence of packets)
Protocol (on networks that carry multiple types of information, the protocol defines what type of packet is being transmitted: e-mail, Web page, streaming video)
Destination address (where the packet is going)
Originating address (where the packet came from)
payload - Also called the body or data of a packet. This is the actual data that the packet is delivering to the destination. If a packet is fixed-length, then the payload may be padded with blank information to make it the right size.
trailer - The trailer, sometimes called the footer, typically contains a couple of bits that tell the receiving device that it has reached the end of the packet. It may also have some type of error checking. The most common error checking used in packets is Cyclic Redundancy Check (CRC). CRC is pretty neat. Here is how it works in certain computer networks: It takes the sum of all the 1s in the payload and adds them together. The result is stored as a hexadecimal value in the trailer. The receiving device adds up the 1s in the payload and compares the result to the value stored in the trailer. If the values match, the packet is good. But if the values do not match, the receiving device sends a request to the originating device to resend the packet.
As an example, let's look at how an e-mail message might get broken into packets. Let's say that you send an e-mail to a friend. The e-mail is about 3,500 bits (3.5 kilobits) in size. The network you send it over uses fixed-length packets of 1,024 bits (1 kilobit). The header of each packet is 96 bits long and the trailer is 32 bits long, leaving 896 bits for the payload. To break the 3,500 bits of message into packets, you will need four packets (divide 3,500 by 896). Three packets will contain 896 bits of payload and the fourth will have 812 bits. Here is what one of the four packets would contain:
Each packet's header will contain the proper protocols, the originating address (the IP address of your computer), the destination address (the IP address of the computer where you are sending the e-mail) and the packet number (1, 2, 3 or 4 since there are 4 packets). Routers  in the network will look at the destination address in the header and compare it to their lookup table to find out where to send the packet. Once the packet arrives at its destination, your friend's computer will strip the header and trailer off each packet and reassemble the e-mail based on the numbered sequence of the packets.

-------Jagdeep Yadav