Operating System - Linux
1753770 Members
5174 Online
108799 Solutions
New Discussion юеВ

strange output of netstat

 
SOLVED
Go to solution
Maaz
Valued Contributor

strange output of netstat

I am running JSCAPE SECURE FTP Server.

# telnet 192.168.143.128 21
Trying 192.168.143.128...
Connected to 192.168.143.128.
Escape character is '^]'

I am getting strange output when running 'netstat'

# netstat -at |grep ftp
tcp 0 0 192.168.143.128%321:ftp *:* LISTEN

notice the "%321" after the IP of this machine(ftp Server)... why this %321 ? what does this means ?

Regards
Maaz
2 REPLIES 2
Matti_Kurkela
Honored Contributor
Solution

Re: strange output of netstat

You're using netstat without the -n option, so netstat should output hostnames instead of IP addresses whenever possible. So although this string looks like an IP address, it might be actually a (strange) result of a hostname lookup.

Maybe you have a typo in your /etc/hosts file, and "192.168.143.128%321" is listed in there instead of the real hostname.

MK
MK
Maaz
Valued Contributor

Re: strange output of netstat

your are GENIUS ;) thanks Dear for such a nice and perfect help.

you are right when I ran netstat with '-n' option I got the proper output
# netstat -ant |grep ftp
tcp 0 0 192.168.143.128:21 *:* LISTEN

that is no %321 in the output.

Now when i checked the /etc/hosts, i found no entry for the IP of this FTP server, then I simply add the line, and now "netstat -at" is also giving the right output.

Regards
Maaz