1 / 4

Domain Name System (DNS) Topic 2, Chapter 4

Network Programming Kansas State University at Salina. Domain Name System (DNS) Topic 2, Chapter 4. DNS. Host name to IP address look up and reverse Hierarchical, distributed, cached database Many services provided by OS sock.connect( (hostname, port) ) socket.getaddrinfo( hostname, None ).

kieve
Download Presentation

Domain Name System (DNS) Topic 2, Chapter 4

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Programming Kansas State University at Salina Domain Name System (DNS) Topic 2, Chapter 4

  2. DNS • Host name to IP address look up and reverse • Hierarchical, distributed, cached database • Many services provided by OS • sock.connect( (hostname, port) ) • socket.getaddrinfo( hostname, None )

  3. Advanced DNS – DNSPython • Lookup of MX records for sending e-mail is one example where you might need to program a DNS lookup. • Need to add additional package for stand alone DNS lookups. • Book discusses PyDNS, available from source forge. • The package index on python.org suggests that DNSPython is a more popular DNS package.

  4. DNSPython • http://www.dnspython.org/ • Also available from K-State Online • Get the MX targets and preferences for a domain: import dns.resolver answers = dns.resolver.query(‘gmail.com', 'MX') for rdata in answers: print 'Host', rdata.exchange, 'has preference', rdata.preference

More Related