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