8. Fictional example
This is (part of) the zone file for asdf.com, a still-unused domain: $ORIGIN asdf.com. @ SOA server.asdf.com. root.asdf.com. ( 1995032001 3600 3600 604800 86400 ) NS server.asdf.com. NS ns1.ip-provider.net. NS ns2.ip-provider.net. ftp.tcp SRV 0 0 21 server.asdf.com. finger.tcp SRV 0 0 79 server.asdf.com. ; telnet - use old-slow-box or new-fast-box if either is ; available, make three quarters of the logins go to ; new-fast-box. telnet.tcp SRV 0 1 23 old-slow-box.asdf.com. SRV 0 3 23 new-fast-box.asdf.com. ; if neither old-slow-box or new-fast-box is up, switch to ; using the sysdmin's box and the server SRV 1 0 23 sysadmins-box.asdf.com. SRV 1 0 23 server.asdf.com. ; HTTP - server is the main server, new-fast-box is the backup ; (On new-fast-box, the HTTP daemon runs on port 8000) http.tcp SRV 0 0 80 server.asdf.com. SRV 10 0 8000 new-fast-box.asdf.com. ; since we want to support both http://asdf.com/ and ; http://www.asdf.com/ we need the next two RRs as well http.tcp.www SRV 0 0 80 server.asdf.com. SRV 10 0 8000 new-fast-box.asdf.com. ; SMTP - mail goes to the server, and to the IP provider if ; the net is down smtp.tcp SRV 0 0 25 server.asdf.com. SRV 1 0 25 mailhost.ip-provider.net. @ MX 0 server.asdf.com. MX 1 mailhost.ip-provider.net. ; NNTP - use the IP providers's NNTP server nntp.tcp SRV 0 0 119 nntphost.ip-provider.net. ; IDB is an locally defined protocol idb.tcp SRV 0 0 2025 new-fast-box.asdf.com. ; addresses server A 172.30.79.10 old-slow-box A 172.30.79.11 sysadmins-box A 172.30.79.12 new-fast-box A 172.30.79.13 ; backup A records - new-fast-box and old-slow-box are ; included, naturally, and server is too, but might go ; if the load got too bad @ A 172.30.79.10 A 172.30.79.11 A 172.30.79.13 ; backup A RR for www.asdf.com www A 172.30.79.10 ; NO other services are supported *.tcp SRV 0 0 0 . *.udp SRV 0 0 0 . In this example, a telnet connection to "asdf.com." needs an SRV lookup of "telnet.tcp.asdf.com." and possibly A lookups of "new- fast-box.asdf.com." and/or the other hosts named. The size of the SRV reply is approximately 365 bytes: 30 bytes general overhead 20 bytes for the query string, "telnet.tcp.asdf.com." 130 bytes for 4 SRV RR's, 20 bytes each plus the lengths of "new- fast-box", "old-slow-box", "server" and "sysadmins-box" - "asdf.com" in the query section is quoted here and doesn't need to be counted again. 75 bytes for 3 NS RRs, 15 bytes each plus the lengths of "server", "ns1.ip-provider.net." and "ns2" - again, "ip- provider.net." is quoted and only needs to be counted once. 120 bytes for the 6 A RR's mentioned by the SRV and NS RR's.
