Resolver takes request from application formats it

This preview shows page 32 - 41 out of 51 pages.

Resolver – takes request from application, formats it into UDP packet, sends to cache Caching Nameserver Returns answer if it is known, otherwise searches for authoritative server Caches results for further queries Authoritative Nameserver Contains the actual Resource Record put into the DNS by the domain owner
Image of page 32

Subscribe to view the full document.

dig tiscali.co.uk. -- defaults to query type "A" dig tiscali.co.uk. mx -- specified query type dig @212.74.112.66 tiscali.co.uk. mx -- send to particular cache (overrides /etc/resolv.conf) Testing DNS with "dig" "dig" is a program which just makes DNS queries and displays the result Trailing dot (for name lookups only) Prevents lookups using the default domain
Image of page 33
# dig . a ; <<>> DiG 9.3.0 <<>> a ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2462 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADD'L: 4 ;; QUESTION SECTION: ; IN A ;; ANSWER SECTION: . 86400 IN CNAME waib.gouv.bj. waib.gouv.bj. 86400 IN A 81.91.232.2 ;; AUTHORITY SECTION: gouv.bj. 86400 IN NS rip.psg.com. gouv.bj. 86400 IN NS ben02.gouv.bj. gouv.bj. 86400 IN NS nakayo.leland.bj. gouv.bj. 86400 IN NS ns1.intnet.bj. ;; ADDITIONAL SECTION: ben02.gouv.bj. 86400 IN A 81.91.232.1 nakayo.leland.bj. 18205 IN A 81.91.225.1 ns1.intnet.bj. 18205 IN A 81.91.225.18 rip.psg.com. 160785 IN A 147.28.0.39 ;; Query time: 200 msec ;; SERVER: 212.74.112.67#53(212.74.112.67)
Image of page 34

Subscribe to view the full document.

Interpreting the results STATUS NOERROR: 0 or more resource records (RRs) returned NXDOMAIN: non-existent domain SERVFAIL: cache could not locate answer FLAGS AA: Authoritative answer (not from cache) You can ignore the others QR: Query/Response (1 = Response) RD: Recursion Desired RA: Recursion Available
Image of page 35
Interpreting the results Answer section (RRs requested) Each record has a Time To Live (TTL) Says how long the cache will keep it Authority section Which nameservers are authoritative for this domain Additional section More RRs (typically IP addresses for the authoritative nameservers) Total query time Check which server gave the response! If you make a typing error, the query may go to a default server Note: RR = Resource Record
Image of page 36

Subscribe to view the full document.

Socket Berkeley Software Distribution Handle-like data structure for communicating A socket is an endpoint Send and receive Attach a protocol UDP user datagram (best effort) TCP transmission control (reliable stream)
Image of page 37
Sockets Programming
Image of page 38

Subscribe to view the full document.

Sockets Sockaddr struct sockaddr { u_short sa_family; char sa_data[14]; }; designed to work with all protocols sockaddr_in is used with TCP/IP Sockaddr_in struct sockaddr_in { short sin_family; u_short sin_port; struct inaddr sin_addr; char sin_zero[8]; };
Image of page 39
A situation Client can determine IP address of server But how can it know the socket id? Socket is a handle – different number on each machine Name server can’t deal with all the handles BSD provides a way to map a socket to a port that exists in the network name space.
Image of page 40

Subscribe to view the full document.

Image of page 41
You've reached the end of this preview.
  • Winter '08
  • Clement,M
  • Transmission Control Protocol, Domain Name System, int sock, data link physical, network data link

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern