differnce bw ipv4 and ipv6

Upload: muthukumar-rajendran

Post on 14-Jul-2015

154 views

Category:

Documents


0 download

TRANSCRIPT

address

IPv4 32 bits long (4 bytes). Address is composed of a network and a host portion, which depend on address class. Various address classes are defined: A, B, C, D, or E depending on initial few bits. The total number of IPv4 addresses is 4 294 967 296.

IPv6 128 bits long (16 bytes). Basic architecture is 64 bits for the network number and 64 bits for the host number. Often, the host portion of an IPv6 address (or part of it) will be a MAC address or other interface identifier. Depending on the subnet prefix, IPv6 has a more complicated architecture than IPv4.

The text form of the IPv4 address is nnn.nnn.nnn.nnn, where 0= 1; } return tmplg; }

Socket Tips and Best Practices:

Re-connect: If a socket client attempts to connect to a socket server and fails, one should attempt to re-attach after a given waiting period, a fixed number of times. view source print?01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 ... ... int iTry = 0; int mRetrymax = 10; int mRetrywait = 2; // If this client can not connect to the server, try again after period "Retrywait". while ( connect(socketHandle, (struct sockaddr *)&remoteSocketInfo, sizeof(sockaddr_in)) < 0 ) { iTry++; if( iTry > mRetrymax ) { cerr