In <[🔎] SNT125-W503AD2F570F2C86CE7A4AFDB410@phx.gbl>, Hadi Motamedi wrote:
>My Debian server is at @172.16.128.1 and the remote network element is at
> @172.16.4.1 , but the 'netstat' does not show the ip address and the
> assigned port from my Debian . It just shows many dedicated ports ,
> assigned with '0.0.0.0:xx' format . Can you please let me know how can I
> distinguish the dedicated port to that remote network element ?
There's not one. That's not the way TCP/IP or UDP/IP servers work. All the
client connections use the same server IP address and port. The TCP/IP or
UDP/IP stack separates them into different connections based on the source
address. Netstat shows sockets, not connections.
In pictures (ASCII art, view in a fixed-width font):
src = y.y.y.y:ry src = z.z.z.z:rz
+----------+ dst = x.x.x.x:dx +---------+ dst = x.x.x.x:dx +----------+
| Client 1 |----------------->| Server |<-----------------| Client 2 |
| y.y.y.y | | x.x.x.x | | z.z.z.z |
| port ry |<-----------------| port dx |----------------->| port rz |
+----------+ src = x.x.x.x:dx +---------+ src = x.x.x.x:dx +----------+
dst = y.y.y.y:ry dst = z.z.z.z:rz
There are a number of tools that can "look in" to the TCP/IP or UDP/IP stack
and give you per-connection metrics. I think iptraf is one of them; tcpdump
can also be used. Someone with more network monitoring experience will have
to mention any others.
--
Boyd Stephen Smith Jr. ,= ,-_-. =.
bss@iguanasuicide.net ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-'
http://iguanasuicide.net/ \_/
Attachment:
signature.asc
Description: This is a digitally signed message part.