SlideShare una empresa de Scribd logo
1 de 13
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

Más contenido relacionado

La actualidad más candente

Eincop Netwax Lab: Site 2 Site VPN with Routing Protocols
Eincop Netwax Lab: Site 2 Site VPN with Routing ProtocolsEincop Netwax Lab: Site 2 Site VPN with Routing Protocols
Eincop Netwax Lab: Site 2 Site VPN with Routing ProtocolsNetwax Lab
 
Deploying IPv6 - planning, common pitfalls and security-considerations
Deploying IPv6 - planning, common pitfalls and security-considerationsDeploying IPv6 - planning, common pitfalls and security-considerations
Deploying IPv6 - planning, common pitfalls and security-considerationsSpeedPartner GmbH
 
Securing ARP in Software Defined Networks
Securing ARP in Software Defined NetworksSecuring ARP in Software Defined Networks
Securing ARP in Software Defined NetworksFarzaneh Pakzad
 
Nxll19 vrrp (virtual router redundancy protocol)
Nxll19 vrrp (virtual router redundancy protocol)Nxll19 vrrp (virtual router redundancy protocol)
Nxll19 vrrp (virtual router redundancy protocol)Netwax Lab
 
introducing PING comand
introducing PING comandintroducing PING comand
introducing PING comandali torabi
 
IPv6 The Big Move Transition And Coexistent
IPv6 The Big Move Transition And CoexistentIPv6 The Big Move Transition And Coexistent
IPv6 The Big Move Transition And Coexistentfrenildand
 
Nxll10 v lan and trunking
Nxll10 v lan and trunkingNxll10 v lan and trunking
Nxll10 v lan and trunkingNetwax Lab
 
Eincop Netwax Lab: Access List ii
Eincop Netwax Lab: Access List iiEincop Netwax Lab: Access List ii
Eincop Netwax Lab: Access List iiNetwax Lab
 

La actualidad más candente (13)

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

Destacado

Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programmingHaris Bin Zahid
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01Adil Kakakhel
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Conceptsthinkphp
 

Destacado (7)

Ak procedural vs oop
Ak procedural vs oopAk procedural vs oop
Ak procedural vs oop
 
Procedural vs. object oriented programming
Procedural vs. object oriented programmingProcedural vs. object oriented programming
Procedural vs. object oriented programming
 
Object oriented programming (oop) cs304 power point slides lecture 01
Object oriented programming (oop)   cs304 power point slides lecture 01Object oriented programming (oop)   cs304 power point slides lecture 01
Object oriented programming (oop) cs304 power point slides lecture 01
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
Oops ppt
Oops pptOops ppt
Oops ppt
 
Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 

Similar a IPV4_IPV6_INTEROPERABILITY_

InfiniFlux IP Address Type
InfiniFlux IP Address TypeInfiniFlux IP Address Type
InfiniFlux IP Address TypeInfiniFlux
 
Why We Need IPv6
Why We Need IPv6Why We Need IPv6
Why We Need IPv6Netwax Lab
 
Why we need ipv6...
Why we need ipv6...Why we need ipv6...
Why we need ipv6...Adii Shah
 
NAT 64 FPGA Implementation
NAT 64 FPGA ImplementationNAT 64 FPGA Implementation
NAT 64 FPGA ImplementationJanith Rukman
 
07_IP_Addressing ayudaok.pdf
07_IP_Addressing ayudaok.pdf07_IP_Addressing ayudaok.pdf
07_IP_Addressing ayudaok.pdfJosue138778
 
Fb i pv6-sparchimanv1.0
Fb i pv6-sparchimanv1.0Fb i pv6-sparchimanv1.0
Fb i pv6-sparchimanv1.0Fred Bovy
 
Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6Jhoni Guerrero
 
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistanceRobert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistancePROIDEA
 
7 2.5 3 Lab - Identifying IPv6 Addresses.pdf
7 2.5 3 Lab - Identifying IPv6 Addresses.pdf7 2.5 3 Lab - Identifying IPv6 Addresses.pdf
7 2.5 3 Lab - Identifying IPv6 Addresses.pdfSamantha Vargas
 
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...Louis Göhl
 
Ipv4 over ipv6 by Jigar Tarsariya
Ipv4 over ipv6 by Jigar TarsariyaIpv4 over ipv6 by Jigar Tarsariya
Ipv4 over ipv6 by Jigar TarsariyaJigar Tarsariya
 

Similar a IPV4_IPV6_INTEROPERABILITY_ (20)

ipv6 programming
ipv6 programmingipv6 programming
ipv6 programming
 
InfiniFlux IP Address Type
InfiniFlux IP Address TypeInfiniFlux IP Address Type
InfiniFlux IP Address Type
 
Introduction to IPv6
Introduction to IPv6Introduction to IPv6
Introduction to IPv6
 
Why We Need IPv6
Why We Need IPv6Why We Need IPv6
Why We Need IPv6
 
Why we need ipv6...
Why we need ipv6...Why we need ipv6...
Why we need ipv6...
 
IPv6
IPv6IPv6
IPv6
 
NAT 64 FPGA Implementation
NAT 64 FPGA ImplementationNAT 64 FPGA Implementation
NAT 64 FPGA Implementation
 
Ipv6 questions
Ipv6 questionsIpv6 questions
Ipv6 questions
 
Introduction to TCP/IP
Introduction to TCP/IPIntroduction to TCP/IP
Introduction to TCP/IP
 
Ipv6
Ipv6Ipv6
Ipv6
 
IP Routing on z/OS
IP Routing on z/OSIP Routing on z/OS
IP Routing on z/OS
 
07_IP_Addressing ayudaok.pdf
07_IP_Addressing ayudaok.pdf07_IP_Addressing ayudaok.pdf
07_IP_Addressing ayudaok.pdf
 
07_IP_Addressing.pdf
07_IP_Addressing.pdf07_IP_Addressing.pdf
07_IP_Addressing.pdf
 
Fb i pv6-sparchimanv1.0
Fb i pv6-sparchimanv1.0Fb i pv6-sparchimanv1.0
Fb i pv6-sparchimanv1.0
 
Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6Transitioning IPv4 to IPv6
Transitioning IPv4 to IPv6
 
IPv6 address
IPv6 addressIPv6 address
IPv6 address
 
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistanceRobert Raszuk - Technologies for IPv4/IPv6 coexistance
Robert Raszuk - Technologies for IPv4/IPv6 coexistance
 
7 2.5 3 Lab - Identifying IPv6 Addresses.pdf
7 2.5 3 Lab - Identifying IPv6 Addresses.pdf7 2.5 3 Lab - Identifying IPv6 Addresses.pdf
7 2.5 3 Lab - Identifying IPv6 Addresses.pdf
 
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
SVR401: DirectAccess Technical Drilldown, Part 1 of 2: IPv6 and transition te...
 
Ipv4 over ipv6 by Jigar Tarsariya
Ipv4 over ipv6 by Jigar TarsariyaIpv4 over ipv6 by Jigar Tarsariya
Ipv4 over ipv6 by Jigar Tarsariya
 

Más de Rajesh Porwal

Radio network planning for 4G LTE
Radio network planning for 4G LTERadio network planning for 4G LTE
Radio network planning for 4G LTERajesh Porwal
 
Ip spoofing & types of attachs using it
Ip spoofing & types of attachs using itIp spoofing & types of attachs using it
Ip spoofing & types of attachs using itRajesh Porwal
 
Yokogawa otdr operations
Yokogawa otdr operationsYokogawa otdr operations
Yokogawa otdr operationsRajesh Porwal
 
Ip tunnelling and_vpn
Ip tunnelling and_vpnIp tunnelling and_vpn
Ip tunnelling and_vpnRajesh Porwal
 
Synchronization in packet based mobile backhaul networks
Synchronization in packet based mobile backhaul networksSynchronization in packet based mobile backhaul networks
Synchronization in packet based mobile backhaul networksRajesh Porwal
 

Más de Rajesh Porwal (7)

Radio network planning for 4G LTE
Radio network planning for 4G LTERadio network planning for 4G LTE
Radio network planning for 4G LTE
 
Ip spoofing & types of attachs using it
Ip spoofing & types of attachs using itIp spoofing & types of attachs using it
Ip spoofing & types of attachs using it
 
Yokogawa otdr operations
Yokogawa otdr operationsYokogawa otdr operations
Yokogawa otdr operations
 
Gre tunnel pdf
Gre tunnel pdfGre tunnel pdf
Gre tunnel pdf
 
Ip tunnelling and_vpn
Ip tunnelling and_vpnIp tunnelling and_vpn
Ip tunnelling and_vpn
 
Synchronization in packet based mobile backhaul networks
Synchronization in packet based mobile backhaul networksSynchronization in packet based mobile backhaul networks
Synchronization in packet based mobile backhaul networks
 
PIX vs ASA_firewall
PIX vs ASA_firewallPIX vs ASA_firewall
PIX vs ASA_firewall
 

Último

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

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