Database Reference
In-Depth Information
Without
IP=FIRST
, the trace output contains a
bind
call, which uses an incoming address
of all zeros (
INADDR_ANY
).
$ grep "bind.*1521" /tmp/strace_no_ip_first.out
25443 bind(8, {sa_family=AF_INET, sin_port=htons(1521), sin_addr=inet_addr("0.0.0.0"
)}, 16) = 0
Running
telnet
IP_address
listener_port
for all the IP addresses associated with the host,
confirms that the TNS Listener accepts connections on any network. This is also evident from
netstat
output (multiple connections between
telnet
and
tnslsnr
must be open to get this
output).
$ netstat -np|egrep 'Proto|telnet|tnslsnr'
Proto Recv-Q Send-Q Local Address Foreign Address State PID/
Program na
me
tcp 0 0 192.168.10.132:50388 192.168.10.132:1521 ESTABLISHED 25610/teln
et
tcp 0 0 172.168.0.1:50393 172.168.0.1:1521 ESTABLISHED 25613/teln
et
tcp 0 0 127.0.0.1:50394 127.0.0.1:1521 ESTABLISHED 25614/teln
et
tcp 0 0 172.168.0.1:1521 172.168.0.1:50319 ESTABLISHED 25489/tnsl
snr
tcp 0 0 172.168.0.1:1521 172.168.0.1:50320 ESTABLISHED 25489/tnsl
snr
tcp 0 0 192.168.10.132:1521 192.168.10.132:50388 ESTABLISHED 25489/tnsl
snr
tcp 0 0 172.168.0.1:1521 172.168.0.1:50393 ESTABLISHED 25489/tnsl
snr
tcp 0 0 127.0.0.1:1521 127.0.0.1:50394 ESTABLISHED 25489/tnsl
snr
The switch
-n
tells
netstat
to use numbers instead of names for host names and ports. The
switch
-p
(Linux specific) is for displaying process names. The
INADDR_ANY
value of 0.0.0.0 can
be seen in the column “Local Address” of the
netstat
output, if the switch
-l
is used. This
switch restricts the report to sockets with status LISTEN, i.e., sockets that are not yet connected
to a client program.
$ netstat -tnlp | egrep 'Proto|tns'
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 25489/tnslsnr
The
netstat
switch
-t
limits the output to TCP sockets only. On Windows, you would run
netstat
with the switches
-abno -p tcp
, to get nearly the same report as on UNIX.
C:> netstat -abno -p tcp