Use the same network port with TCP and UDP connection at the same time

dabench

Senior member
Sep 23, 2004
465
0
71
A friend and I were studying for a network test and we came up with a question we couldn't completely answer. Since you can't assign a port once you already have it assigned how does something like a DNS transfer work since DNS normally uses port 53 with UDP, what happens when a zone transfer takes place and it wants to use TCP 53? Do you have to shutdown the DNS response to queries so that you free up port 53 for the zone transfer? If not how can you use port 53 for a UDP connections and TCP connection simultaneously on the same server? Thank you
 

Sheep221

Golden Member
Oct 28, 2012
1,843
27
81
It depends on application, can be used simultaneously. However assigned default ports are different mostly.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
Like others have said, TCP & UDP use different protocols, so they can use same port number.


TCP7.jpg


5BFY3.jpg


UDP is fire and forget, it does not care if the receiving side receives the packets correctly.

TCP_vs_UDP.jpg
 
Last edited:
  • Like
Reactions: Malogeek