In: Categories » » Ethernet » Obtaining and Using a Domain Name
After you obtain Internet access, connect your embedded system to the Internet, and configure your firewall to enable the embedded system to communicate, the system is ready to send and receive messages on the Internet. Applications running on other computers on the Internet can access the embedded system by specifying its public IP address. For example, to view a server’s home page, in the Address text box of a Web browser, you enter http:// followed by the server’s IP address. Each IP address is 32 bits, typically expressed as four bytes in a format known as dotted quad, or dotted decimal, consisting of four decimal numbers separated by periods, or dots, as in 216.92.61.61. An alternate, more human-friendly way to identify a computer on the Internet is with a domain name. Instead of remembering four numbers, users can provide a name such as rabbitsemiconductor.com or dalsemi.com. Another advantage of a domain name is that it can remain constant. The IP address of a particular Web page or other resource may change, either because the owner of the domain has changed ISPs or because the ISP uses dynamic IP addresses that change from time to time. Just about every major Web site available to the general public on the Internet has a domain name. The tiniest embedded system can also have a domain name, though not every system needs one. A system that functions as a client has no need for an easily remembered name because the client initiates all communications, and each request received from a client includes the IP address to respond to. A computer that only responds to communications from selected computers that know the computer’s IP address doesn’t need a domain name either. But a domain name can be useful and convenient for an embedded system that functions as a server that’s available to any computer on the Internet.
How a URL Specifies a Resource
When requesting a file or other resource from a computer on the Internet, a computer provides a uniform resource locator (URL) that helps in identifying the location of the resource and tells the server how to respond to the request. A URL specifies the protocol to use in reading the request, the name or IP address of the server that hosts the requested resource, the path to the file on the server, and the name of the requested resource (or no name to request a default file). The document that defines URLs is RFC 1738: Uniform Resource Locators (URL). At minimum, a URL specifies a scheme that identifies a protocol such as HTTP, followed by scheme-specific information such as a host name that identifies the location of a requested file. A host name is either an IP address in dotted-quad format or a domain name. Here is an example of a URL that requests a page from a Web server:
http://www.example.com:80/data/testdata.htm
http:// contains the scheme that tells the server to use the hypertext transfer protocol (HTTP) in responding to the request. Other schemes include ftp for FTP transfers and mailto for links to e-mail messages. Many browsers add http:// if you omit the scheme when specifying a URL in the browser’s Address text box. example.com specifies the domain, and www specifies the Web server at the domain. :80 specifies the port the client sends the request to. If the URL doesn’t include a port number, the client uses the protocol’s default port. RFC 1738 specifies default port numbers for standard protocols. The default for HTTP is port 80. /data/ names a folder within the server’s root folder. A small embedded system may store all of its files in the server’s root folder. Forward slashes separate folder and file names even if the server’s file system uses different separators. The name of the requested file is testdata.htm. When a URL doesn’t specify a filename, most Web servers are configured to serve a default home page, often titled index.html. In many cases, you don’t need to type the full URL in the browser’s window. If you leave off the http://, most browsers insert it for you. Every domain should have a default page to serve if no page is specified. And many servers are configured to serve a Web page even if the URL doesn’t contain www. So typing just the domain name, such as example.com, often causes the Web server at the specified domain to return the same default home page that would be returned by requesting http://www.example.com:80/index.html.
Registering a Domain Name
If you want to be able to access your embedded system by specifying a domain name, you must register the name with an appropriate authority. Registering in turn requires providing two name servers that respond to requests for the domain’s IP address. For all domains except those with country-code top-level domains, you can register the name with any of a number of domain name registrars accredited by the Internet Corporation for Assigned Names and Numbers (ICANN) at www.icann.org. The registrar pays a yearly fee to ICANN for each registered domain. The registrar in turn typically charges a yearly fee to the person or entity registering the domain. The domains managed by ICANN are available to registrants in any country. In addition, each country-code top-level domain has a sponsoring organization for registering domains. The Internet Assigned Numbers Authority (IANA) at ww.iana.org has information about registering these domains.
Matching a Domain Name to Its IP Address
Name servers enable computers to match a domain name with the IP address required to access the domain’s resources. Domain names are convenient for humans who are requesting resources, but each request ultimately must translate into one or more IP datagrams that contain the IP address of the datagram’s destination. So a computer requesting a resource by domain name needs a way to learn the IP address that corresponds to the domain. A system that communicates only with a defined set of hosts could store a lookup table that matches each host name with its IP address. If a host changes its IP address, the lookup table will need updating, however. More commonly, matching a domain name to its IP address involves communications between one or more domain-name servers and a resolver. A domain-name server is a computer that stores records that match domain names with their IP addresses. The resolver is a program or process that uses the domain-name-system (DNS) protocol to communicate with name servers to find a match between a domain name and its IP address. Each registered domain name must have two name servers that respond to queries for the domain’s IP address. The ISP that provides the domain’s IP address typically provides the name servers. Some registrars will provide name servers if you aren’t ready to host the domain right away. Once the name servers are set up and operating, the computers on the Internet need to learn about their existence. The Internet has a series of root name servers that store root zone files containing the IP addresses of the name servers for all registered domains. Each server stores records for one of the root domains such as .com, .edu, or .mil. To ensure that the information is always available even if a server fails, each root domain has multiple servers.
The root name servers operate under the direction of IANA and are updated regularly. The servers are in varied locations and are owned by different entities. To learn a domain’s IP address, a computer uses the DNS protocol to send a query to a resolver, which may reside in the same computer that originated the query or elsewhere. The resolver first searches its own cache and returns the answer if found. If not, the resolver attempts to find the answer by querying a name server. A local network may have an assigned local name server that functions as the resolver for queries from the local network. The local name server knows the addresses of the root name servers and maintains a database of information obtained from previous queries. If the local name server doesn’t have the answer in its database, it queries a root name server or another server that it thinks may have the information. On receiving a query, a name server may return the requested IP address or the IP address of another server that is likely to have the information. For example, to learn the IP address for www.example.com, a resolver may send a query to a .com root domain server that returns the address of the name server for example.com. The resolver can then query this name server for the address of www.example.com. To learn the IP addresses of a local network’s name servers, in Windows XP, click Start > Run, type cmd, and click OK. In the window that appears, type ipconfig /all. In the information displayed are the IP addresses of two DNS servers. Although an embedded system with a domain name must have name servers that other computers can access to learn the domain’s IP address, many embedded systems don’t need to communicate with name servers themselves. An embedded system functioning as a server just needs to respond to requests that contain a source IP address to respond to. Other systems may communicate only with computers with known IP addresses. Systems that communicate only in a local network don’t need to support domain names at all, though local computers may have locally assigned host names that correspond to local IP addresses.
legal notice
Our website is not responsible for the information contained by this article. Web-articles is a free articles resource.
Suggestion: If you need fresh, daily updated content for your website, feel free to use our service. Click here for more information.
Useful tools and features
related articles
NE2000 Compatibility A term you’re likely to hear in reference to program code for network controllers is NE2000-compatible. The NE2000 was an early and popular PC network interface card from Novell. The card contained National Semiconductor’s DP8390 controller. Software for systems that use the ’8390 or a compatible chip has come to be known as NE2000-compatible code. A major feature of the ’8390 is its set of internal registers. By reading and writing to the registers, a CPU can c...
2. Using the Internet Protocol in Local and Internet Communications
The protocols in the IEEE 802.3 Ethernet standard enable the computers in a local network to exchange messages with each other. In practice, most Ethernet networks also use Internet protocols such as TCP or UDP and IP. These provide defined and well-supported methods for accomplishing common tasks such as flow control and flexible addressing and routing of messages. Messages that travel on the Internet must use IP. And because TCP and UDP are designed to work along with IP, local communications that use TCP or UDP also use...
3. There are several options for obtaining an Internet connection
Technologies for Connecting There are several options for obtaining an Internet connection. A long-popular way for home users to connect to the Internet is via dial-up connections on phone lines. For higher speeds, alternatives are a Digital Subscriber Line (DSL), an Integrated Services Digital Network (ISDN) line, or a cable modem. Satellite connections are also possible. Table 4-1 compares the capabilities of the different methods. Not every connection type is available in all locations. Depending on ...
4. Every computer that communicates over the Internet must have an IP address
Static and Dynamic IP Addresses Every computer that communicates over the Internet must have an IP address, which the computer typically receives from its ISP. The IP address may be static or dynamic. A static IP address stays the same until someone explicitly changes it, while a dynamic IP address can change on every boot up or network connect (though the address typically changes only occasionally). An embedded system may store a static IP address in non-volatile memory, either within an application...
5. Inside the Internet Protocol
The Internet Protocol (IP) helps data find its way to its destination even if the data must travel through other networks, including the many and varied networks that make up the Internet. Although it’s called the Internet Protocol, local networks can use IP as well. Many communications in local networks use IP because they use its companion protocols, TCP and UDP. This section introduces IP, including how computers obtain IP addresses, the format of IP datagrams, how IP and the domain name system help in getti...
6. A computer that uses the Internet Protocol must have an IP address
IP Addresses A computer that uses the Internet Protocol must have an IP address. A network administrator may manually assign an IP address to each computer or the network may have a way of assigning addresses automatically to computers that connect to the network. An IPv4 address is 32 bits. As explained earlier in this networking tutorial, the conventional way to express an IP address is in dotted-quad format, such as 192.168.111.1. Assigning Addresses Each IP datagram includes t...
7. With classless addressing the network address and IP prefix
Classless Addressing With classless addressing, the network address and IP prefix are often expressed in the form: xxx.xxx.xxx.xxx/n where xxx.xxx.xxx.xxx is the lowest IP address in the network and n is the number of bits in the network-address portion of the IP address. For example, with a network address and IP prefix of 192.0.2.0/24, the network address is 192.0.2 (three bytes, or 24 bits), and the final eight bits in the IP address are the host address. In routing datagrams for addresses that us...
8. Considerations when Using Dynamic IP Addresses
Dynamic Allocation One thing that automatic allocation doesn’t define is a way to reclaim addresses that are no longer in use. Reclaiming addresses is essential in networks that have more potential hosts than available IP addresses. For example, the hosts connected to an ISP at any one time will vary as different customers go on and off line. If the ISP assigns a permanent, or static, address to every computer that connects, it will eventually run out of addresses, even if only a few customers connec...
9. Hosts that support IP must also support the ICMP
The Internet Control Message Protocol (ICMP) Hosts that support IP must also support the Internet Control Message Protocol (ICMP) defined by RFC 792: Internet Control Message Protocol. ICMP is a basic protocol for sending messages. Some common uses for ICMP are to send a PING message to learn if a host is available on the network and to obtain the IP addresses of local routers. ICMP messages travel in IP datagrams. The Protocol field in the IP header is 1 to indicate ICMP. The first byte in the data portion of...
