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