Database Reference
In-Depth Information
Active Connections
Proto Local Address Foreign Address State PID
TCP 0.0.0.0:1521 0.0.0.0:0 LISTENING 4524
[TNSLSNR.exe]
TCP 127.0.0.1:1521 127.0.0.1:2431 ESTABLISHED 4524
[TNSLSNR.exe]
TCP 127.0.0.1:2431 127.0.0.1:1521 ESTABLISHED 4836
[telnet.exe]
TCP 192.168.10.1:1521 192.168.10.1:2432 ESTABLISHED 4524
[TNSLSNR.exe]
TCP 192.168.10.1:2432 192.168.10.1:1521 ESTABLISHED 4224
[telnet.exe]
Loopback Adapter
You may be surprised to find that the TNS Listener may also be contacted at the IP address
127.0.0.1 of the loopback adapter. The loopback adapter provides IP networking within the
boundaries of a machine for situations where a system is not connected to a network, but
needs TCP/IP for applications that require it. The host name “localhost” is mapped to the IP
address 127.0.0.1 in the hosts configuration file. This file is /etc/hosts on UNIX and %SYSTEM_
ROOT%\system32\drivers\etc\hosts on Windows. On a laptop computer, the loopback IP
address may be explicitly assigned to the TNS Listener when working offline. This will allow
use of the TNS Listener over TCP/IP even when not connected to any network. Another option
for local connections via the TNS Listener is the IPC protocol. To check whether a process is
listening on port 1521 of the loopback address, the following telnet command may be used:
$ telnet localhost 1521
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Since telnet did not terminate with the error “Connection refused”, the TNS Listener
accepted the connection from telnet . The strace output contains a separate bind call for the
IP address 127.0.0.1.
25443 bind(12, {sa_family=AF_INET, sin_port=htons(0),
sin_addr=inet_addr ("127.0.0.1")}, 16) = 0
Boot IP Address
It is undocumented in releases prior to Oracle11 g that the TNS Listener does not bind to INADDR_
ANY if the boot IP address is used in listener.ora , instead of the system's host name. Following
is a modified TNS Listener configuration that uses the boot IP address:
 
Search WWH ::




Custom Search