Monday, September 27, 2010

TCP States

Connection Establishment

1. Connection Request By Client: The client chooses an ISN for its transmissions of 4,567. It sends a SYN with the Sequence Number field set to 4,567.

2. Acknowledgment and Connection Request By Server: The server chooses an ISN for its transmissions of 12,998. It receives the client's SYN. It sends a SYN+ACK with an Acknowledgment Number field value of 4,568 (one more than the client's ISN). This message has a Sequence Number field value of 12,998.

3. Acknowledgment By Client: The client sends an ACK with the Acknowledgment Number field set to 12,999.


This diagram illustrates the same three-way handshake connection establishment procedure introduced in Figure 211, except this time I have shown the Sequence Number and Acknowledgment Number fields in each message so you can see how they are used by each of the two devices to establish initial sequence numbers for data exchange.


With the connection now established, the client will send data whose first byte will be given sequence number 4,568. The server's first byte of data will be numbered 12,999.

Connection Termination


TCP Connection Termination is implemented as follows:

1. One computer sends a FIN packet to the other computer including an ACK for the last data received (N).
2. The other computer sends an ACK number of N+1
3. It also sends a FIN with the sequence number of X.
4. The originating computer sends a packet with an ACK number of N+1. The connection is closed.

Another way to close the connection is for one computer to send a packet with the RST (reset) bit set which will tell the other computer to immediately terminate the connection.

Tuesday, September 14, 2010

How to call VOIP from cell phone

Go thru the video...

http://www.videojug.com/interview/cell-phone-voip-2

Friday, May 28, 2010

Worth to read... cURL options...

Do you want to know the response time of your requests???!
Curl will give you that.... It gives even more...

Please see the below site for more details..

http://www.linux.com/archive/feed/57715

Friday, March 26, 2010

HTTP

About HTTP

Table of Contents

List of contents in this Blog











S.No Protocol Tools
1 HttpNemesis

Wednesday, February 24, 2010

IP Addressing

Address Classes

There are 5 different address classes. You can determine which class any IP address is in by examining the first 4 bits of the IP address.
  • Class A addresses begin with 0xxx, or 1 to 126 decimal.
  • Class B addresses begin with 10xx, or 128 to 191 decimal.
  • Class C addresses begin with 110x, or 192 to 223 decimal.
  • Class D addresses begin with 1110, or 224 to 239 decimal.
  • Class E addresses begin with 1111, or 240 to 254 decimal.
Addresses beginning with 01111111, or 127 decimal, are reserved for loopback and for internal testing on a local machine; [You can test this: you should always be able to ping 127.0.0.1, which points to yourself] Class D addresses are reserved for multicasting; Class E addresses are reserved for future use. They should not be used for host addresses.

Now we can see how the Class determines, by default, which part of the IP address belongs to the network (N, in blue) and which part belongs to the node (n, in red).

  • Class A -- NNNNNNNN.nnnnnnnn.nnnnnnnn.nnnnnnnn
  • Class B -- NNNNNNNN.NNNNNNNN.nnnnnnnn.nnnnnnnn
  • Class C -- NNNNNNNN.NNNNNNNN.NNNNNNNN.nnnnnnnn

Private Subnets

There are three IP network addresses reserved for private networks. The addresses are 10.0.0.0, Subnet Mask 255.0.0.0, 172.16.0.0, Subnet Mask 255.240.0.0, and 192.168.0.0, Subnet Mask 255.255.0.0. These addresses are also notated 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. They can be used by anyone setting up internal IP networks, such as a lab or home LAN behind a NAT or proxy server or a router. It is always safe to use these because routers on the Internet by default will never forward packets coming from these addresses.

Subnet Masking

Node addresses of all "0"s and all "1"s are reserved for specifying the local network (when a host does not know its network address) and all hosts on the network (broadcast address), respectively.

To calculate the number of subnets or nodes, use the formula (2n-2) where n = number of bits in either field, and 2n represents 2 raised to the nth power.

Example:
11111111.11111111.11100000.00000000 255.255.224.000 Subnet Mask

In this example a 3 bit subnet mask was used. There are 6 (23-2) subnets available with this size mask (remember that subnets with all 0's and all 1's are not allowed). Each subnet has 8190 (213-2) nodes. Each subnet can have nodes assigned to any address between the Subnet address and the Broadcast address.

# bits Subnet Mask CIDR # Subnets # Hosts Nets * Hosts
2 255.192.0.0 /10 2 4194302 8388604
3 255.224.0.0 /11 6 2097150 12582900
4 255.240.0.0 /12 14 1048574 14680036
5 255.248.0.0 /13 30 524286 15728580
6 255.252.0.0 /14 62 262142 16252804
7 255.254.0.0 /15 126 131070 16514820
8 255.255.0.0 /16 254 65534 16645636
9 255.255.128.0 /17 510 32766 16710660
10 255.255.192.0 /18 1022 16382 16742404
11 255.255.224.0 /19 2046 8190 16756740
12 255.255.240.0 /20 4094 4094 16760836
13 255.255.248.0 /21 8190 2046 16756740
14 255.255.252.0 /22 16382 1022 16742404
15 255.255.254.0 /23 32766 510 16710660
16 255.255.255.0 /24 65534 254 16645636
17 255.255.255.128 /25 131070 126 16514820
18 255.255.255.192 /26 262142 62 16252804
19 255.255.255.224 /27 524286 30 15728580
20 255.255.255.240 /28 1048574 14 14680036
21 255.255.255.248 /29 2097150 6 12582900
22 255.255.255.252 /30 4194302 2 8388604