Gray Su Gray Su - 1 year ago 78
Linux Question

what's the "peer" and two "address:port" from "ss -l" command mean

When I use "ss-l" command to display all open network ports in centos7, the output has two "address:port" fields.

Like this

enter image description here

Is this for local address and foreign address? And what's the "peer" mean.

I am confused on it. Can anyone help me? Thanks.

Answer Source

Yes, the two "Address:Port" columns are for the IP address and port being used locally and by the other end of the connection.

"Peer" is a common term used for the machine on the other end of a network connection because, historically, all servers on the internet were originally considered to be equal peers rather than divided into "client machines" and "server machines".

In the output of ss -l, the peer is always listed as * (used as a wildcard) because the -l option tells it to show only ports which are listening for new connections, not those which have connections established. If you run ss without -l, you should get some Peer Address:Port entries such as, showing that you have an active https connection to a peer with IP address

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download