SlideShare a Scribd company logo
Presented by R P Porwal
contents
 Introduction
 IPv4 Client, IPv6 Server
 IPv6 Client, IPv4 Server
 IPv6 Address Testing Macros
 IPV6_ADDRFORM Socket Option
 Source Code Portability
Introduction
 Server and client combination
 IPv4 <=> IPv4(most server and client)
 IPv4 <=> IPv6
 IPv6 <=> IPv4
 IPv6 <=> IPv6
 How IPv4 application and IPv6 application can
communicate with each other.
 Host are running dual stacks, both an IPv4 protocol stack
and IPv6 protocol stack
IPv4 Client , IPv6 Server
 IPv6 dual stack server can handle both IPv4 and IPv6
clients.
 This is done using IPv4-mapped IPv6 address
 server create an IPv6 listening socket that is bound to
the IPv6 wildcard address
IPv6
client
IPv6
server
TCP
IPv6
Data
link
Data
link
IPv4
TCP
IPv4
client
TCP
IPv4 IPv6
Data
link
Enet
hdr
IPv4
hdr
TCP
hdr
TCP
data
Enet
hdr
IPv4
hdr
TCP
hdr
TCP
data
Type0800
Type0800 Dport 8888
Dport 8888
206.62.226.42
IPv4 mapped
IPv6 address
IPv6 listening socket,
bound to 0::0, port 8888
IPv6 address
5flb:df00:ce3
e:e200:20:80
0:2b37:6426
IPv4 datagram IPv6 datagram
AF_INET
SOCK_STREAM
sockaddr_in
AF_INET
SOCK_DGRAM
sockaddr_in
AF_INET6
SOCK_DGRAM
sockaddr_in6
AF_INET6
SOCK_DGRAM
sockaddr_in6
TCP
IPv4 IPv6
UDP
IPv4
sockets
IPv6
sockets
Address
returned by
accept or
recvfrom
IPv6IPv4
IPv4 mapped
IPv6 client, IPv4 server
 IPv4 server start on an IPv4 only host and create an
IPv4 listening socket
 IPv6 client start, call gethostbyname. IPv4 mapped
IPv6 address is returned.
 Using IPv4 datagram
IPv4 datagram IPv6 datagram
AF_INET
SOCK_STREAM
sockaddr_in
AF_INET
SOCK_DGRAM
sockaddr_in
AF_INET6
SOCK_DGRAM
sockaddr_in6
AF_INET6
SOCK_DGRAM
sockaddr_in6
TCP
IPv4 IPv6
UDP
IPv4
sockets
IPv6
sockets
Address
for connect
or sendto
IPv6IPv4
IPv4 mappedIPv6
IPv6 Address Testing Macros
 There are small class of IPv6 application that must
know whether they are talking to an IPv4 peer.
 These application need to know if the peer’s address is
an IPv4-mapped IPv6 address.
 Twelve macro defined(참조 page 267)
IPV6_ADDRFORM Socket Option
 Can change a socket from one type to another,
following restriction.
 An IPv4 socket can always be changed to an IPv6. Any
IPv4 address already associated with the socket are
converted to IPv4- mapped IPv6 address.
 An IPv6 socket can changed to an IPv4 socket only if any
address already associated with the socket are IPv4-
mapped IPv6 address.
Int af;
socklen_t clilen;
struct sockaddr_int6 cli; /* IPv6 struct */
struct hostent *ptr;
af = AF_INT6;
Setsockopt(STDIN_FILENO, IPPROTO_IPV6,
IPV6_ADDRFORM, &af, sizeof(af));
clilen = sizeof(cli);
Getpeername(0, &cli, &clilen);
ptr = gethostbyaddr(&cli.sin6_addr, 16, AF_INET);
Converting an IPv4 to IPv6
 setsockopt => change the Address format of socket
from IPv4 to IPv6.
 Return value is AF_INET or AF_INET6
 getpeername =>return an IPv4-mapped IPv6
address
Source Code Portability
 #ifdefs => hard to maintain, littered …
 use getaddrinfo and getnameinfo

More Related Content

KEY
Introduction to IPV6
PDF
IETF 106 - In-flight IPv6 Extension Header Insertion Considered Harmful
PPTX
Nat64 server
PPTX
Performance .NET Core - M. Terech, P. Janowski
PPT
Ping Tracert
PPTX
Bypassing DEP using ROP
PDF
Internet Protocol version 10 (IPv10).
Introduction to IPV6
IETF 106 - In-flight IPv6 Extension Header Insertion Considered Harmful
Nat64 server
Performance .NET Core - M. Terech, P. Janowski
Ping Tracert
Bypassing DEP using ROP
Internet Protocol version 10 (IPv10).

What's hot (13)

PDF
AWS re:Invent 2018 notes
PDF
ExaBGP at LINX 83
PDF
Eincop Netwax Lab: Site 2 Site VPN with Routing Protocols
PDF
Deploying IPv6 - planning, common pitfalls and security-considerations
PPTX
Securing ARP in Software Defined Networks
PDF
Nxll19 vrrp (virtual router redundancy protocol)
PPTX
introducing PING comand
PPT
Client server
DOCX
IPv6 The Big Move Transition And Coexistent
PDF
Network Sockets
PDF
Nxll10 v lan and trunking
PDF
Eincop Netwax Lab: Access List ii
PPT
Ppt of socket
AWS re:Invent 2018 notes
ExaBGP at LINX 83
Eincop Netwax Lab: Site 2 Site VPN with Routing Protocols
Deploying IPv6 - planning, common pitfalls and security-considerations
Securing ARP in Software Defined Networks
Nxll19 vrrp (virtual router redundancy protocol)
introducing PING comand
Client server
IPv6 The Big Move Transition And Coexistent
Network Sockets
Nxll10 v lan and trunking
Eincop Netwax Lab: Access List ii
Ppt of socket
Ad

Viewers also liked (7)

PPTX
Ak procedural vs oop
PPTX
Procedural vs. object oriented programming
PPT
Object oriented programming (oop) cs304 power point slides lecture 01
PPTX
Introduction to Object Oriented Programming
PPT
Oops ppt
PPT
Object-oriented concepts
PPT
Object Oriented Programming Concepts
Ak procedural vs oop
Procedural vs. object oriented programming
Object oriented programming (oop) cs304 power point slides lecture 01
Introduction to Object Oriented Programming
Oops ppt
Object-oriented concepts
Object Oriented Programming Concepts
Ad

Similar to IPV4_IPV6_INTEROPERABILITY_ (20)

KEY
ipv6 programming
PDF
InfiniFlux IP Address Type
PDF
Introduction to IPv6
PDF
Why We Need IPv6
PPTX
Why we need ipv6...
PDF
NAT 64 FPGA Implementation
DOC
Ipv6 questions
PPT
Introduction to TCP/IP
PPTX
PPT
mohammad.ppt jahsjajajajajajwjjwjwjwjajajaja
PDF
IP Routing on z/OS
PDF
07_IP_Addressing.pdf
PDF
07_IP_Addressing ayudaok.pdf
PPTX
IPv6 Basis Training Presentation - Huawei
PDF
Fb i pv6-sparchimanv1.0
PPTX
Transitioning IPv4 to IPv6
PPTX
IPv6 address
PDF
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
PDF
7 2.5 3 Lab - Identifying IPv6 Addresses.pdf
ipv6 programming
InfiniFlux IP Address Type
Introduction to IPv6
Why We Need IPv6
Why we need ipv6...
NAT 64 FPGA Implementation
Ipv6 questions
Introduction to TCP/IP
mohammad.ppt jahsjajajajajajwjjwjwjwjajajaja
IP Routing on z/OS
07_IP_Addressing.pdf
07_IP_Addressing ayudaok.pdf
IPv6 Basis Training Presentation - Huawei
Fb i pv6-sparchimanv1.0
Transitioning IPv4 to IPv6
IPv6 address
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
7 2.5 3 Lab - Identifying IPv6 Addresses.pdf

More from Rajesh Porwal (7)

PDF
Radio network planning for 4G LTE
PDF
Ip spoofing & types of attachs using it
DOCX
Yokogawa otdr operations
PDF
Gre tunnel pdf
PDF
Ip tunnelling and_vpn
PPTX
Synchronization in packet based mobile backhaul networks
DOCX
PIX vs ASA_firewall
Radio network planning for 4G LTE
Ip spoofing & types of attachs using it
Yokogawa otdr operations
Gre tunnel pdf
Ip tunnelling and_vpn
Synchronization in packet based mobile backhaul networks
PIX vs ASA_firewall

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Machine learning based COVID-19 study performance prediction
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
A Presentation on Artificial Intelligence
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
A Presentation on Artificial Intelligence
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Approach and Philosophy of On baking technology
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Encapsulation_ Review paper, used for researhc scholars
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
Review of recent advances in non-invasive hemoglobin estimation
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

IPV4_IPV6_INTEROPERABILITY_

  • 1. Presented by R P Porwal
  • 2. contents  Introduction  IPv4 Client, IPv6 Server  IPv6 Client, IPv4 Server  IPv6 Address Testing Macros  IPV6_ADDRFORM Socket Option  Source Code Portability
  • 3. Introduction  Server and client combination  IPv4 <=> IPv4(most server and client)  IPv4 <=> IPv6  IPv6 <=> IPv4  IPv6 <=> IPv6  How IPv4 application and IPv6 application can communicate with each other.  Host are running dual stacks, both an IPv4 protocol stack and IPv6 protocol stack
  • 4. IPv4 Client , IPv6 Server  IPv6 dual stack server can handle both IPv4 and IPv6 clients.  This is done using IPv4-mapped IPv6 address  server create an IPv6 listening socket that is bound to the IPv6 wildcard address
  • 5. IPv6 client IPv6 server TCP IPv6 Data link Data link IPv4 TCP IPv4 client TCP IPv4 IPv6 Data link Enet hdr IPv4 hdr TCP hdr TCP data Enet hdr IPv4 hdr TCP hdr TCP data Type0800 Type0800 Dport 8888 Dport 8888 206.62.226.42 IPv4 mapped IPv6 address IPv6 listening socket, bound to 0::0, port 8888 IPv6 address 5flb:df00:ce3 e:e200:20:80 0:2b37:6426
  • 6. IPv4 datagram IPv6 datagram AF_INET SOCK_STREAM sockaddr_in AF_INET SOCK_DGRAM sockaddr_in AF_INET6 SOCK_DGRAM sockaddr_in6 AF_INET6 SOCK_DGRAM sockaddr_in6 TCP IPv4 IPv6 UDP IPv4 sockets IPv6 sockets Address returned by accept or recvfrom IPv6IPv4 IPv4 mapped
  • 7. IPv6 client, IPv4 server  IPv4 server start on an IPv4 only host and create an IPv4 listening socket  IPv6 client start, call gethostbyname. IPv4 mapped IPv6 address is returned.  Using IPv4 datagram
  • 8. IPv4 datagram IPv6 datagram AF_INET SOCK_STREAM sockaddr_in AF_INET SOCK_DGRAM sockaddr_in AF_INET6 SOCK_DGRAM sockaddr_in6 AF_INET6 SOCK_DGRAM sockaddr_in6 TCP IPv4 IPv6 UDP IPv4 sockets IPv6 sockets Address for connect or sendto IPv6IPv4 IPv4 mappedIPv6
  • 9. IPv6 Address Testing Macros  There are small class of IPv6 application that must know whether they are talking to an IPv4 peer.  These application need to know if the peer’s address is an IPv4-mapped IPv6 address.  Twelve macro defined(참조 page 267)
  • 10. IPV6_ADDRFORM Socket Option  Can change a socket from one type to another, following restriction.  An IPv4 socket can always be changed to an IPv6. Any IPv4 address already associated with the socket are converted to IPv4- mapped IPv6 address.  An IPv6 socket can changed to an IPv4 socket only if any address already associated with the socket are IPv4- mapped IPv6 address.
  • 11. Int af; socklen_t clilen; struct sockaddr_int6 cli; /* IPv6 struct */ struct hostent *ptr; af = AF_INT6; Setsockopt(STDIN_FILENO, IPPROTO_IPV6, IPV6_ADDRFORM, &af, sizeof(af)); clilen = sizeof(cli); Getpeername(0, &cli, &clilen); ptr = gethostbyaddr(&cli.sin6_addr, 16, AF_INET); Converting an IPv4 to IPv6
  • 12.  setsockopt => change the Address format of socket from IPv4 to IPv6.  Return value is AF_INET or AF_INET6  getpeername =>return an IPv4-mapped IPv6 address
  • 13. Source Code Portability  #ifdefs => hard to maintain, littered …  use getaddrinfo and getnameinfo