1

I'm trying to understand if there are any benefits/important uses of the DNS suffix search list other than what is stated in various docs: if you type just the hostname instead of the FQDN it will pull a suffix off the list, add it to the host, and see if it resolves - I get that.

I always make a habit of using the FQDN because I want to explicitly know that I'm accessing the right host, especially if I'm planning on using that host as a reference in any scripts or programming. It seems like not using the FQDN is a recipe for disaster if something were to change on the network (i.e. domain name change) and the DNS suffix search list wasn't updated and now things aren't resolving.

So, I guess what I'm getting at is, is the suffix list really just for people that want to be lazy, type the host name, and hope that they end up at the right location? Are there any other major reasons why you'd use one? The previous admin has a huge list specified (probably because we have a bunch of subdomains) and I'm trying to figure out if there's another purpose for that list, or if it's purely just to save on typing. And if it's purely to save on typing, I'm tempted to get rid of it and force FQDN usage because doing otherwise seems fraught with potential problems. I also understand that just removing the list could break stuff if users relied on that list - which seems like yet another reason why you shouldn't rely on it...

1 Answer 1

0

Obviously, you must use a fully qualified domain name in scripts and settings. But if you are using a command line, you ssh/scp/ping a log from the command line, you would probably prefer to just type

$ scp host1:~/file host2:~/

rather then

$ scp host1.lan.mylongdomain.com:~/file host2.lan.mylongdomain.com:~/
5
  • Nope, you are not required to use a FQDN in a script, but I'd strongly recommend it. I'm sure there are plenty of people that might work with a computer name or similar, ping it not knowing how it resolved, and then use just the host name in their script, especially for a quick task. That script gets scheduled and forgotten - change something in the domain and you could get unintended consequences...
    – Mike
    May 26, 2017 at 15:17
  • So it leads me back to my original question, is there any other reason for having the suffix other than convenience?
    – Mike
    May 26, 2017 at 15:18
  • @Mike Sure, using FQDN in a script it is not a requirement per se. My point was typing a FQDN does not hurt in a script, but it really hurts if you need to type it few times an hour... May 26, 2017 at 15:20
  • Yes, I agree with you there. So, what I'm really curious about is if there are any other purposes for it. It kinda seems like that's it (convenience), and if that's the case, I might make some changes to it. I just want to make sure if I tweak my suffix list that I'm not going to break anything else. Thanks!
    – Mike
    May 26, 2017 at 15:28
  • @Mike no, there are no other reasons but the convenience of the users. May 26, 2017 at 15:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .