blob: 8dff454b1df86a713733121515444aad38431003 [file] [log] [blame]
Robin Getz82f0d232009-07-20 14:53:54 -04001Domain Name System
2-------------------------------------------
3
4The Domain Name System (DNS) is a hierarchical naming system for computers,
5services, or any resource participating in the Internet. It associates various
6information with domain names assigned to each of the participants. Most
7importantly, it translates domain names meaningful to humans into the numerical
8(binary) identifiers associated with networking equipment for the purpose of
9locating and addressing these devices world-wide. An often used analogy to
10explain the Domain Name System is that it serves as the "phone book" for the
11Internet by translating human-friendly computer hostnames into IP addresses.
12For example, www.example.com translates to 208.77.188.166.
13
14For more information on DNS - http://en.wikipedia.org/wiki/Domain_Name_System
15
Robin Getz82f0d232009-07-20 14:53:54 -040016U-Boot and DNS
17------------------------------------------
18
19CONFIG_CMD_DNS - controls if the 'dns' command is compiled in. If it is, it
Wolfgang Denkbddc7262009-07-23 22:23:23 +020020 will send name lookups to the dns server (env var 'dnsip')
21 Turning this option on will about abou 1k to U-Boot's size.
Robin Getz82f0d232009-07-20 14:53:54 -040022
Wolfgang Denkbddc7262009-07-23 22:23:23 +020023 Example:
Robin Getz82f0d232009-07-20 14:53:54 -040024
25bfin> print dnsip
26dnsip=192.168.0.1
27
28bfin> dns www.google.com
2966.102.1.104
30
Wolfgang Denkbddc7262009-07-23 22:23:23 +020031 By default, dns does nothing except print the IP number on
32 the default console - which by itself, would be pretty
33 useless. Adding a third argument to the dns command will
34 use that as the environment variable to be set.
Robin Getz82f0d232009-07-20 14:53:54 -040035
Wolfgang Denkbddc7262009-07-23 22:23:23 +020036 Example:
Robin Getz82f0d232009-07-20 14:53:54 -040037
38bfin> print googleip
39## Error: "googleip" not defined
40bfin> dns www.google.com googleip
4164.233.161.104
42bfin> print googleip
43googleip=64.233.161.104
44bfin> ping ${googleip}
45Using Blackfin EMAC device
46host 64.233.161.104 is alive
47
Wolfgang Denkbddc7262009-07-23 22:23:23 +020048 In this way, you can lookup, and set many more meaningful
49 things.
Robin Getz82f0d232009-07-20 14:53:54 -040050
51bfin> sntp
52ntpserverip not set
53bfin> dns pool.ntp.org ntpserverip
5472.18.205.156
55bfin> sntp
Wolfgang Denkbddc7262009-07-23 22:23:23 +020056Date: 2009-07-18 Time: 4:06:57
Robin Getz82f0d232009-07-20 14:53:54 -040057
Wolfgang Denkbddc7262009-07-23 22:23:23 +020058 For some helpful things that can be related to DNS in U-Boot,
59 look at the top level README for these config options:
60 CONFIG_CMD_DHCP
61 CONFIG_BOOTP_DNS
62 CONFIG_BOOTP_DNS2