vb.net and sockets



Why does a VB.NET UDP socket send data on a random port?. My problem
simplified. I send a UDP packet to a remote machine that responds back via
UDP with some data in the packet. I set up my program to use port 9600 ( a
bind with IPAddress.ANY,9600) with an OnRecevie function and then do a
sendto(...9600). Looking at a packet sniffer, VB ACTUALLY sends the packet
with a SOURCE port of 2xxx range (this changes each time I run my program,
and on diff computers) and a DEST port of 9600. The remote machine responds
back to me on the original source port, so of course my bind doesn't work.
How do I bind to the port VB.NET is ACTUALLY sending the packet on? I cant
change the way the remote sends. I assume it knows what it is doing because
the actual returned packet is on source port and NOT 9600 although vb.net
is given this param. I tried to step back to just a simple packet send on
port whatever.Looking at sniffer, VB.NET sends the packet with the dest port
as whatever but the source port is always in the 2xxx range. no remote
machine involved. simple SENDTO(blah,port). How can I figure out the real
source port? This happens regardless of local WindowsXP boxes I use. Where
is the 2xxx port coming from?
Thanks BUC


.