Forum Discussion

GLM_191985's avatar
Apr 08, 2019

dns works on 2 ports ?

dns works on 2 ports? port no is same tcp and udp 53 ? why do we need 2 ports. why we using 2 different protocols tcp and udp

 

  • Udp port is used to small size answers...

     

    most of DNS servers respond to client to open a tcp connection If answer size is more than 512 bytes

     

  • DNS will use TCP for Zone Transfer or DNSSEC.

     

    DNS will use UDP for answering requests.

     

    EDNS (Extension mechanisms for DNS) is a specification for expanding the size of several parameters of the DNS protocol. When using EDNS issues may occur when traversing firewalls , since some firewalls assume a maximum DNS message length of 512 bytes and block longer DNS packets. But still UDP will be used for EDNS.