Difference in netstat -a and -an output.

Hi,

Does anyone know why I get a different output when using "netstat -a" or "netstat -an" ??

# netstat -a | grep ts15r135
tcp        0      0  nbsol152.62736         ts15r135.23211          ESTABLISHED

# netstat -an | grep 172.23.160.78
tcp        0      0  135.246.39.152.51954   172.23.160.78.23212     ESTABLISHED
tcp        0      0  135.246.39.152.51952   172.23.160.78.58112     ESTABLISHED
tcp        0      0  135.246.39.152.51955   172.23.160.78.23211     ESTABLISHED
# uname -a
HP-UX nbsol151 B.11.11 U 9000/800 1020412055 unlimited-user license

Thanks,

E.J.

because the old connection dropped, and three new ones where established in the delay between netstat -a and netstat -an

or

172.23.160.78 is not the ip-adress of ts15r135

Thanks for the fast reply.
But that can't be it.
It is always like this and for more similar connections.
And the connection is stable.
Here the output with less than 1 second difference:

# date; netstat -a | grep ts15r135; date; netstat -an | grep 172.23.160.78               <
Wed Aug  5 10:02:07 GMT 2009
tcp        0      0  nbsol152.62736         ts15r135.23211          ESTABLISHED
Wed Aug  5 10:02:08 GMT 2009
tcp        0      0  135.246.39.152.51954   172.23.160.78.23212     ESTABLISHED
tcp        0      0  135.246.39.152.51952   172.23.160.78.58112     ESTABLISHED
tcp        0      0  135.246.39.152.51955   172.23.160.78.23211     ESTABLISHED

and nslookup ts15r135 gives 172.23.160.78 ?

(or hosts file entry)

No:

# nslookup ts15r135
Using /etc/hosts on:  nbsol152

looking up FILES
Name:    ts15r135
Address:  172.23.160.87

Stupid me :frowning: ; used 78 iso 87.
And 87 iso 78 for the other system !

# netstat -a | grep ts15r135
tcp        0      0  nbsol152.60377         ts15r135.23211          ESTABLISHED
# netstat -an | grep 172.23.160.87
tcp        0      0  135.246.39.152.60377   172.23.160.87.23211     ESTABLISHED

Thanks a lot !