I have always had a question about the transport layer protocols TCP and UDP. How is it that a port number can use both transport protocols? For instance DNS is on port 53 but it uses UDP/TCP how is this possible? This question has nagged me forever. I don't understand what determines if a program will use UDP or TCP especially when the service can use either or? I know this is an easy question but I am reading about transport layer protocols and the questions popped in my head again, can someone shed some light on this?
DNS primarily uses UDP on port 53 to serve requests. Almost all DNS queries consist of a single UDP request from the client followed by a single UDP reply from the server. TCP comes into play only when the response data size exceeds 512 bytes, or for such tasks as zone transfer.
So, does that mean you can block TCP and allow only UDP. Not Really. Blocking TCP 53 and allowing UDP 53 will eventually cause some DNS
** Please rate if it helps **