Boris Dorestand
2021-01-30 12:02:17 UTC
I have a program (whose source code I don't know) listening on TCP port
8547. I connect to it by using an IPv4 address. When I look at
netstat's output, I can't see the ``tcp'' line relative to port 8547. I
see the following type of output:
--8<---------------cut here---------------start------------->8---
%netstat -na | grep LISTEN
[...]
tcp 0 0 0.0.0.0:1234 0.0.0.0:* LISTEN
[...]
tcp6 0 0 :::8547 :::* LISTEN
[...]
--8<---------------cut here---------------end--------------->8---
Because I can connect to it by specifying the machine's IPv4 address, I
expected to see a ``tcp'' line with the port 8547 on it. Instead, I see
a ``tcp6'' line, so that surprised me. To prove that there is no
8547-line that's not a tcp6-line, let me show you this:
--8<---------------cut here---------------start------------->8---
%netstat -na | grep LISTEN | grep 8547
tcp6 0 0 :::8547 :::* LISTEN
%
--8<---------------cut here---------------end--------------->8---
How does it work? When software supports both IPv4 and IPv6, I see only
a tcp6-line? I'm totally surprised here. Thank you for any information
on this.
8547. I connect to it by using an IPv4 address. When I look at
netstat's output, I can't see the ``tcp'' line relative to port 8547. I
see the following type of output:
--8<---------------cut here---------------start------------->8---
%netstat -na | grep LISTEN
[...]
tcp 0 0 0.0.0.0:1234 0.0.0.0:* LISTEN
[...]
tcp6 0 0 :::8547 :::* LISTEN
[...]
--8<---------------cut here---------------end--------------->8---
Because I can connect to it by specifying the machine's IPv4 address, I
expected to see a ``tcp'' line with the port 8547 on it. Instead, I see
a ``tcp6'' line, so that surprised me. To prove that there is no
8547-line that's not a tcp6-line, let me show you this:
--8<---------------cut here---------------start------------->8---
%netstat -na | grep LISTEN | grep 8547
tcp6 0 0 :::8547 :::* LISTEN
%
--8<---------------cut here---------------end--------------->8---
How does it work? When software supports both IPv4 and IPv6, I see only
a tcp6-line? I'm totally surprised here. Thank you for any information
on this.