Now we also have to understand how our name server entries are placed there,
the name server that we query.
So we're going to work on openSUSE and take a look at how we control DNS
name server entries. Now I think the whole idea of life is that we can try
and get through it by continually learning,
and we're going to discover now how we can control through the
/etc/resolv.conf our DNS name resolution.
Now this is really well documented when we take a look at this openSUSE
system. It's really telling me that we shouldn't make changes to this
traditional file, that we have a different file. It tells me the file to
go for and the options to set.
We can see though that it is reading the name server 10.0.2.3, the name
server that we did see when we were using the dig command previously and
not specifying the DNS server to query.
Now if you want to query,
let's say our Google server by default, then we can go ahead and
start making changes to the configuration file.
We know though that using vim, we can save ourselves a huge amount of work. If
I go through and put vim +, we can specify a line number or we can specify the
text. When we specify text, we put a forward slash in front of the text that
we're searching for, and we can go through and look for our option and just
paste this in. Now with that done,
we can then go through and grab our file this is going
to be located in, and paste this in.
Look at this, how easy is this going to be?
As I hit Enter,
we are then taken through to the line that we need to be on, and I can then
just go through and put my DNS server that I want to be queried first, so I
can put a single server or I can put a list of servers. Here, I'm just going
to put in the Google server, so 8.8.8.8.
And once we've got that in, we can go through and save our change.
Now again, adding this just to my configuration file isn't going to make
anything happen, not until we force this configuration to be read.
So if I go through and take a look at the resolv.conf again, we're
going to see that it hasn't changed, but we can also see the command
that we need to run our netconfig command, so we can go through and
force the update on this.
And now as we go through and take a look at our name server,
we have two name servers.
We'll be searching the Google name server first, and when we
go through and issue our dig command, we should be, even
without putting in the server, querying our Google server. So there you go. This is how we configure DNS order on our openSUSE system.