Why isnt a random port chosen for SEED node sockets? I connected a node A to bitcoin testnet (Port 18333). The node discovery happens and I see couple of connections between my node A and the seed nodes. All of the sending and receiving happens between nodes ONLY via Port 18333 (I checked this in ThreadSocketHandler)

I add another node B (different laptop hence different IP) to the bitcoin testnet. I initiate a addnode &lt;lappyB_IP&gt;:18333 onetry connection from A and it gets accepted. But now the port A uses to send data is chosen randomly by OS and NOT 18333. This can be checked by
getpeerinfo 

We should note that both are outbound connections from A -- namely the first one is we connected to seednode and send one is we connected to another node B. How come in the former data is getting sent via 18333 (default port) but in the later OS decides to chose a different port?
All nodes are listening on port 18333 for inbound connections.  Any inbound connection will use this port.  So addrlocal will show localIP:18333.  

Any outbound connection will use a random port so addrlocal will show localIP:xxxxx

So every connection is either random &lt;----> 18333  OR 18333 &lt;----> random.  The node that initiated the connection (out) will always use a random port.

This is how all tcp/ip web services with known ports work.  Web servers listen on port 80 or port 443, browsers use a random local port to connect to them. 

Edit: Should note that port 18333 is for testnet nodes. Would be 8333 for main net.  Also if on linux netstat -ntlp or netstat -ntp will show all tcp connections