Receiving incoming connections on IPv6 or IPv4 sockets
UNIX™ platforms receive both IPv4 and IPv6 incoming connections on the same socket. Microsoft™ Windows™ is not capable of receiving both incoming IPv4 and IPv6 connections on the same socket. If IPv6 is disabled, Microsoft™ Windows™ only receives IPv4 connections. If IPv6 is enabled and the port is not bound to an address, only IPv6 connections are received. To receive both IPv4 and IPv6 connections, define two ports -- one bound to an IPv4 address and one bound to an IPv6 address. This is easily done for NRPC, but until now, Internet servers only provided support for a single HCL Notes® port.
HCL Domino® supports
two Notes® ports for Internet
servers. The user interface specifies two Notes® port names in the NOTES.INI variable SMTPNotesPort
.
For example,
SMTPNotesPort=TCPIP,TCPIP6
If either of the ports is shut down (stop port tcpip) the Internet servers momentarily shut down both ports and restart listening on the one remaining port. Also, outbound connections for any address will succeed on any TCP port. For outbound connections, Domino® creates the proper socket to handle the attempted target address.
Making outbound connections with a TCP port bound to an IP address
When a client or a server making outbound connections has a TCP port bound to a specific IP address, using the NOTES.INI setting SMTPNotesPorts= <TCPIPAddress>, the bound port can only make outbound connections of the type of the bound IP Address. For example, if a server binds the Notes® Port TCPIP to an IPV4 address and the Notes® Port TCPIP6 to an IPV6 address, then port TCPIP can only make outbound connections to IPV4 addresses and port TCPIP6 can only make outbound connections to IPV6 addresses.
In a configuration that includes IPV4 and IPV6 Notes® ports bound to IP addresses, the ports listed in the Connection documents must include all TCP ports over which the connection can possibly be made. For example, if you create a Server Connection document from serverA to serverB, and serverB's DNS name can resolve to both an IPV4 address and an IPV6 address, and you want the connection to work over IPV4 or IPV6, you must include both ports in the Connection document.
When an IPv4 or an IPv6 socket is created and used
Use the following set of rules to determine whether to use an IPv4 or IPv6 socket:
- When connecting or listening, if IPv6 is not enabled, always create an IPv4 socket.
- If connecting or listening with a bound address, use a socket that matches the address type.
- If listening and no address is bound, and if IPv6 is enabled, use an IPv6 socket.
- If listening and no address is bound, and if IPv6 is disabled, use an IPv4 socket.
- To create an IPv6 socket that listens to any IPv6 address, do not bind to an address.
- To create an IPv4 socket that listens to any IPv4 address, bind
it to address
::ffff:0.0.0.0
On UNIX™ servers, an IPv6 socket bound to any address accepts all incoming connections, but on Windows™ the same socket only listens to incoming IPv6 connections.
On Linux™, if one port binds to the "any" address and IPv6 is enabled, a second port cannot bind to a specific IPv4 or IPv6 address. If this is attempted, an Address is already in use error is returned.