Specifying the DNS Server and Default Gateway Router Addresses
So far, we’ve discussed the IP address and subnet mask parameters that
you need to specify when configuring the IP stack on a Linux system.
However, you should also specify the DNS server address and the
default gateway router address.
If you’ve used the Internet, you know that you can use domain names,
such as www.google .com, to navigate to particular hosts on the Web.
However, your system actually can’t work with alphanumeric domain
names. It has no idea where www.google.com is or what it has to offer.
To make this work, your local system needs to resolve domain names
into IP addresses. One of the ways this can be done is to submit the
domain name to a DNS server. When a DNS server receives a name
resolution request, it matches the domain name submitted with an IP
address and returns it to the requesting system. Then your system can
contact the specified host using its IP address.
For example, in Figure 15-7, the domain name www.google.com has been resolved to an IP
address of 74.125.239.144 by the DNS server.
To make this system work, you need to provide your system with the IP
address of the DNS server you want it to use. We’ll spend more time
working with DNS later in this chapter.
In addition, you also need to specify the IP address of your network’s
default gateway router. The IP protocol was designed from the ground
up with internetworking in mind. In an internetwork, multiple network
segments are connected together using routers. If a system on one
segment tries to send data to a host that doesn’t reside on the same
network, the IP protocol will redirect the packets to the default
gateway router for its segment. The router will then use a variety of
routing protocols to determine where the packets should be sent to get
them to their destination. This is shown in Figure 15-8.
In Figure 15-8, the sending system (192.168.1.1) is sending data to
10.0.0.1. However, 10.0.0.1 resides on the 10.0.0.0 network segment,
not the 192.168.1.0 network segment. Therefore, the IP stack on the
sending system redirects the data to the router connecting the two
segments together. The routing software on the router knows where the
10.0.0.0 network segment resides and forwards the packets on to that
network, where they are delivered to the receiving system.
This system is very powerful. It’s what allows you to connect to the
Internet and pull down web pages from a server somewhere else in the
world. However, for it to work, your local system needs to know the IP
address of the router to which it should forward packets if they are
addressed to a system that doesn’t reside on the local network
segment. You need to configure this parameter whenever you configure
network settings on a Linux system. If you don’t, the system will be
able to communicate only with systems on the same local network
segment.
LX0-104 Exam Objectives (R)
No comments:
Post a Comment