IPV6 Approach

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

Investigation Report – CPE

CPE Team Client : BMS , Airtel

Requirement Details: Compliance to IPV6.

Author : Asima Sethi


Revision Date : 28 March 11

Purpose:

As per DOT all telecom operators product should be IPV6 compliant. This document specifies about BMS
(Bulk Managed Services) and a way to make it IPv6 compliant also gives an idea about IPv6, its
functionalities, advantages over IPv4 and guide to migration .
Currently IPv4 is used as a network layer protocol in Internet. Main purpose of IPv4 is to establish a
communication link between host-to-systems in the Internet. Though IPv4 is well-designed but it's not
appropriate for the fast-growing Internet.

IPv6:

IPv6, or Internet Protocol Version 6, is the "next generation" protocol designed by the Internet Engineering
Task Force (IETF) to gradually replace IPv4, the version that has been in use for nearly two decades. IPv6
overcomes some of the limitations of IPv4, such as the limited address space, while introducing a number
of enhancements in areas such as routing and network auto configuration.

IPv6 addresses contain 128 bits (IPv4 has 32 bits) of data. A host address is usually written as eight 16-bit
hexadecimal numbers that are separated by colons. Two colons are used to abbreviate strings of
consecutive zeros. For example, the IPv6 loopback address `0:0:0:0:0:0:0:1' can just be written as
`::1'.

IPv6 Code Sequence:

Server:
– Socket – open a socket
– Bind – bind our local address to the socket
– Listen – tell that we are listening to a port
– Accept – wait for connection

Issue No.: A, Date: 01/04/09 Page 1 of 6 Comviva Confidential 1


Rev. No.: 00, Date: 01/04/09 Form Id.: SWIVRF01
Investigation Report – CPE
– Read and/or write if TCP
– recvfrom and/or sendto if UDP

Client:
– Socket – open a socket
– Connect – connect to the server
– Read and/or write if TCP
– recvfrom and/or sendto if UDP

Changes:

This paragraph describes what needs to be changed.

1) Socket Interface
– New protocol family name: PF_INET6

2) Address Data Structures


– Net address family name: AF_INET6
– in6_addr structure
– sockaddr_in6 structure

3) Name-to-address translation functions


– inet_pton, inet_ntop

4) Address Conversion functions


– getnameinfo
– getaddrinfo

5) tcp6_socket = socket(PF_INET6, SOCK_STREAM, 0);


udp6_socket = socket (PF_INET6, SOCK_DGRAM, protocol);

6) To bind an AF_INET6 socket to any process the local address should be copied from the
in6addr_any variable which has in6_addr type. In static initializations IN6ADDR_ANY_INIT
may also be used, which expands to a constant expression. Both of them are in network order.

The IPv6 loopback address (::1) is available in the global in6addr_loopback variable. For
initializations IN6ADDR_LOOPBACK_INIT should be used.

Issue No.: A, Date: 01/04/09 Page 2 of 6 Comviva Confidential 2


Rev. No.: 00, Date: 01/04/09 Form Id.: SWIVRF01
Investigation Report – CPE
IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6 address type; thus
a program only needs only to support this API type to support both protocols. This is handled transparently
by the address handling functions in libc.

IPv4 and IPv6 share the local port space. When you get an IPv4 connection or packet to a IPv6
socket its source address will be mapped to v6 and it'll be mapped to v6.

Functionality Difference of IPV4 & IPV6:

Advantages over IPv4:

1. Larger Address Space:


– Address filed in IPv6 is 128 bits long while the address filed of IPv4 is only 32 bits in
length. IPv6 offers very large, i.e.296 address space as compared to IPv4.
2. Better Header format:
– The header of IPv6 has been designed in a way to speed-up the routing process. In header
of IPv6 options are separated from the base header. Options are inserted into base header

Issue No.: A, Date: 01/04/09 Page 3 of 6 Comviva Confidential 3


Rev. No.: 00, Date: 01/04/09 Form Id.: SWIVRF01
Investigation Report – CPE
only when required by the upper-layer data.
3. Provision for extension:
– IPv6 has been designed in a way that a protocol can be extended easily to meet the
requirements of emerging technologies or new applications.
4. Resource Allocation support in IPv6:
– IPv6 provides a mechanism called Flow Label for resource allocation. Flow label enables
source to send request for the special handling of a packet. This mechanism is really
helpful in real-time audio and video transmission.

5. Security Features:
– To ensure confidentiality and packet's integrity encryption and authentication options are
included in IPv6. Under 32 bit address IPv4 system we are limited to a total possible 4.29
billion global address (2^32). Under a 128 bit address IPv6 system there is a total possible
3.4 x 10^38. Obviously everyone in the world could easily be assigned their own global IP
address. Real-time peer to peer communication will available to everyone, or true end to
end connectivity like the internet was really intended for. This will lead to technological
and economical progress.

Modules to be modified:

1) Gateway
2) Mediator
3) proftpd
4) smpp
5) GUI

Software Requirements:
Static library Com_LibSock-0.9 needs to be installed.
Php IPv6 validation JavaScript.

Using the test stub:


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Compiling for TCP Client/Server
gcc -Wall -g3 -O2 v4_v6_sock_utils.c -D_TCP_ -lpthread -o tcp_bin libsock_debug-0.9.a
gcc -Wall -g3 -O2 v4_v6_sock_utils.c -D_TCP_ -lpthread -o tcp_bin libsock-0.9.a

Running as TCP Server


IPv4:
./tcp_bin l 0.0.0.0 6666

Issue No.: A, Date: 01/04/09 Page 4 of 6 Comviva Confidential 4


Rev. No.: 00, Date: 01/04/09 Form Id.: SWIVRF01
Investigation Report – CPE
./tcp_bin l 127.0.0.1 6666
./tcp_bin l 172.19.1.61 6666

IPv6:
./tcp_bin l ::0 6666
./tcp_bin l ::1 6666
./tcp_bin l fec0::219:bbff:fed3:9fbe 6666

Running as TCP Client


IPv4:
./tcp_bin c 127.0.0.1 6666
./tcp_bin c 172.19.1.80 6666

IPv6:
./tcp_bin c ::1 6666
./tcp_bin c fec0::219:bbff:fed3:9fbe 6666

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++
Compiling for UDP Client/Server

gcc -Wall -g3 -O2 v4_v6_sock_utils.c -D_UDP_ -lpthread -o udp_bin libsock_debug-0.9.a


gcc -Wall -g3 -O2 v4_v6_sock_utils.c -D_UDP_ -lpthread -o udp_bin libsock-0.9.a

Running as UDP Server


IPv4:
./udp_bin l 0.0.0.0 6666
./udp_bin l 127.0.0.1 6666
./udp_bin l 172.19.1.61 6666

IPv6:
./udp_bin l ::0 6666
./udp_bin l ::1 6666
./udp_bin l fec0::219:bbff:fed3:9fbe 6666

Running as UDP Client


IPv4:
./udp_bin c 127.0.0.1 6666
./udp_bin c 172.19.1.80 6666

IPv6:
./udp_bin c ::1 6666
./udp_bin c fec0::219:bbff:fed3:9fbe 6666

Issue No.: A, Date: 01/04/09 Page 5 of 6 Comviva Confidential 5


Rev. No.: 00, Date: 01/04/09 Form Id.: SWIVRF01
Investigation Report – CPE

PS: (0.0.0.0)IPv4 <=> (::0)IPv6 and


(127.0.0.1)IPv4 <=> (::1)IPv6

Conclusion:

IPv4 is a well-designed protocol but lacks features to be used in the fast-growth Internet world. So
approach to migrate BMS modules to IPv6 in this document will be helpful.

Issue No.: A, Date: 01/04/09 Page 6 of 6 Comviva Confidential 6


Rev. No.: 00, Date: 01/04/09 Form Id.: SWIVRF01

You might also like