How to publish both IPv4 and IPv6 addresses
Summary
How to add both IPv4 and IPv6 addresses to IOR
How to add both IPv4 and IPv6 addresses to object reference
How to publish both IPv4 and IPv6 addresses
Environment
VisiBroker 8.5.x
All supported platforms
Question/Problem Description
A CORBA server may wish to publish an IOR containing both IPv4 and IPv6 host addresses. This allows clients to connect to the server's the IPv4, or IPv6 host address.
Clarifying Information
The Internet Protocol version 6 specification is defined by the Internet Engineering Task Force and can be found here.
Resolution
To publish an IOR containing both the IPv4 and IPv6 IP address, two server engines are configured. For example, "iiop_tp" (the default for IPv4) and "iiop_ipv6" (for IPv6).
pm.setProperty("vbroker.se.default", "iiop_tp,iiop_ipv6");
// Set IPv4 IP address:
pm.setProperty("vbroker.se.iiop_tp.host", "[IPv4 IP Address]");
...
// Set IPv6 IP address:
pm.addProperty("vbroker.se.iiop_ipv6.host", "[IPv6 IP Address]");
Please see the attached Java, server application for an example of how to publish IPv4 and IPv6 object references.
Support Incidents
2800887
Attachment
IPv4_5F00_IPv6_5F00_Sample.zip
The attached zip file "IPv4_IPv6_Sample.zip" contains the following:
- AccountImpl.java
- AccountManagerImpl.java
- Bank.idl
- Server.java
- vbmake.bat
The file "Server.java" must be edited to contain the IPv4 and IPv6 IP addresses for your machine. To see where these are set please search for the word "NOTE:" in the Server.java file.
To build the server, run the "vbmake.bat" file.
The server should then be launched with the command:
vbj Server
The server application writes an IOR to the file IOR.ref, which contains both IPv4 and IPv6 host addresses.