Numeric Prefix in Hostname












5















In the Ubuntu Server Installer, we are precluded from placing a number as the first character in a hostname. However, once installed, we can issue a hostname command to rename the server to have a numeric prefix. Is there a reason for this limitation?



As an example, in the installer, I could create a hostname of



WebServer1 


but NOT



0WebServer1 


I can, however, create a server with a name of



WebServer1 


then, in the CLI, rename it to



0WebServer1


Please advise why this limitation is in place and if there are any caveats to working around it.










share|improve this question





























    5















    In the Ubuntu Server Installer, we are precluded from placing a number as the first character in a hostname. However, once installed, we can issue a hostname command to rename the server to have a numeric prefix. Is there a reason for this limitation?



    As an example, in the installer, I could create a hostname of



    WebServer1 


    but NOT



    0WebServer1 


    I can, however, create a server with a name of



    WebServer1 


    then, in the CLI, rename it to



    0WebServer1


    Please advise why this limitation is in place and if there are any caveats to working around it.










    share|improve this question



























      5












      5








      5








      In the Ubuntu Server Installer, we are precluded from placing a number as the first character in a hostname. However, once installed, we can issue a hostname command to rename the server to have a numeric prefix. Is there a reason for this limitation?



      As an example, in the installer, I could create a hostname of



      WebServer1 


      but NOT



      0WebServer1 


      I can, however, create a server with a name of



      WebServer1 


      then, in the CLI, rename it to



      0WebServer1


      Please advise why this limitation is in place and if there are any caveats to working around it.










      share|improve this question
















      In the Ubuntu Server Installer, we are precluded from placing a number as the first character in a hostname. However, once installed, we can issue a hostname command to rename the server to have a numeric prefix. Is there a reason for this limitation?



      As an example, in the installer, I could create a hostname of



      WebServer1 


      but NOT



      0WebServer1 


      I can, however, create a server with a name of



      WebServer1 


      then, in the CLI, rename it to



      0WebServer1


      Please advise why this limitation is in place and if there are any caveats to working around it.







      system-installation hostname






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 11 at 17:05









      TDK

      1376




      1376










      asked Jan 11 at 16:13









      James RileyJames Riley

      261




      261






















          1 Answer
          1






          active

          oldest

          votes


















          3














          Historic reasons, probably.



          RFC 952, published in 1985, with the title of DOD INTERNET HOST TABLE SPECIFICATION mandates that hostnames contains letters (a-z) and digits (0-9), and cannot start with a digit:





          1. A "name" (Net, Host, Gateway, or Domain name) is a text string up
            to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
            sign (-), and period (.). Note that periods are only allowed when
            they serve to delimit components of "domain style names". (See
            RFC-921, "Domain Name System Implementation Schedule", for
            background). No blank or space characters are permitted as part of a
            name. No distinction is made between upper and lower case. The first
            character must be an alpha character. The last character must not be
            a minus sign or period.
            A host which serves as a GATEWAY should have
            "-GATEWAY" or "-GW" as part of its name. Hosts which do not serve as
            Internet gateways should not use "-GATEWAY" and "-GW" as part of
            their names. A host which is a TAC should have "-TAC" as the last
            part of its host name, if it is a DoD host. Single character names
            or nicknames are not allowed.




          (My emphasis).



          This was changed in RFC 1123, four years later:




          The syntax of a legal Internet host name was specified in RFC-952 [DNS:4]. One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax.




          So whilst the latter is allowable today, it has not always been so, and I'm guessing it's an convention that is still held by quite a few today, which is why programmers has (wrongly) enforced this.



          IMO it could be submitted as a bug towards the installer.



          It will work on modern systems, and you should see no issues on modern platforms that conforms to modern DNS standards.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108909%2fnumeric-prefix-in-hostname%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            Historic reasons, probably.



            RFC 952, published in 1985, with the title of DOD INTERNET HOST TABLE SPECIFICATION mandates that hostnames contains letters (a-z) and digits (0-9), and cannot start with a digit:





            1. A "name" (Net, Host, Gateway, or Domain name) is a text string up
              to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
              sign (-), and period (.). Note that periods are only allowed when
              they serve to delimit components of "domain style names". (See
              RFC-921, "Domain Name System Implementation Schedule", for
              background). No blank or space characters are permitted as part of a
              name. No distinction is made between upper and lower case. The first
              character must be an alpha character. The last character must not be
              a minus sign or period.
              A host which serves as a GATEWAY should have
              "-GATEWAY" or "-GW" as part of its name. Hosts which do not serve as
              Internet gateways should not use "-GATEWAY" and "-GW" as part of
              their names. A host which is a TAC should have "-TAC" as the last
              part of its host name, if it is a DoD host. Single character names
              or nicknames are not allowed.




            (My emphasis).



            This was changed in RFC 1123, four years later:




            The syntax of a legal Internet host name was specified in RFC-952 [DNS:4]. One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax.




            So whilst the latter is allowable today, it has not always been so, and I'm guessing it's an convention that is still held by quite a few today, which is why programmers has (wrongly) enforced this.



            IMO it could be submitted as a bug towards the installer.



            It will work on modern systems, and you should see no issues on modern platforms that conforms to modern DNS standards.






            share|improve this answer






























              3














              Historic reasons, probably.



              RFC 952, published in 1985, with the title of DOD INTERNET HOST TABLE SPECIFICATION mandates that hostnames contains letters (a-z) and digits (0-9), and cannot start with a digit:





              1. A "name" (Net, Host, Gateway, or Domain name) is a text string up
                to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
                sign (-), and period (.). Note that periods are only allowed when
                they serve to delimit components of "domain style names". (See
                RFC-921, "Domain Name System Implementation Schedule", for
                background). No blank or space characters are permitted as part of a
                name. No distinction is made between upper and lower case. The first
                character must be an alpha character. The last character must not be
                a minus sign or period.
                A host which serves as a GATEWAY should have
                "-GATEWAY" or "-GW" as part of its name. Hosts which do not serve as
                Internet gateways should not use "-GATEWAY" and "-GW" as part of
                their names. A host which is a TAC should have "-TAC" as the last
                part of its host name, if it is a DoD host. Single character names
                or nicknames are not allowed.




              (My emphasis).



              This was changed in RFC 1123, four years later:




              The syntax of a legal Internet host name was specified in RFC-952 [DNS:4]. One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax.




              So whilst the latter is allowable today, it has not always been so, and I'm guessing it's an convention that is still held by quite a few today, which is why programmers has (wrongly) enforced this.



              IMO it could be submitted as a bug towards the installer.



              It will work on modern systems, and you should see no issues on modern platforms that conforms to modern DNS standards.






              share|improve this answer




























                3












                3








                3







                Historic reasons, probably.



                RFC 952, published in 1985, with the title of DOD INTERNET HOST TABLE SPECIFICATION mandates that hostnames contains letters (a-z) and digits (0-9), and cannot start with a digit:





                1. A "name" (Net, Host, Gateway, or Domain name) is a text string up
                  to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
                  sign (-), and period (.). Note that periods are only allowed when
                  they serve to delimit components of "domain style names". (See
                  RFC-921, "Domain Name System Implementation Schedule", for
                  background). No blank or space characters are permitted as part of a
                  name. No distinction is made between upper and lower case. The first
                  character must be an alpha character. The last character must not be
                  a minus sign or period.
                  A host which serves as a GATEWAY should have
                  "-GATEWAY" or "-GW" as part of its name. Hosts which do not serve as
                  Internet gateways should not use "-GATEWAY" and "-GW" as part of
                  their names. A host which is a TAC should have "-TAC" as the last
                  part of its host name, if it is a DoD host. Single character names
                  or nicknames are not allowed.




                (My emphasis).



                This was changed in RFC 1123, four years later:




                The syntax of a legal Internet host name was specified in RFC-952 [DNS:4]. One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax.




                So whilst the latter is allowable today, it has not always been so, and I'm guessing it's an convention that is still held by quite a few today, which is why programmers has (wrongly) enforced this.



                IMO it could be submitted as a bug towards the installer.



                It will work on modern systems, and you should see no issues on modern platforms that conforms to modern DNS standards.






                share|improve this answer















                Historic reasons, probably.



                RFC 952, published in 1985, with the title of DOD INTERNET HOST TABLE SPECIFICATION mandates that hostnames contains letters (a-z) and digits (0-9), and cannot start with a digit:





                1. A "name" (Net, Host, Gateway, or Domain name) is a text string up
                  to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
                  sign (-), and period (.). Note that periods are only allowed when
                  they serve to delimit components of "domain style names". (See
                  RFC-921, "Domain Name System Implementation Schedule", for
                  background). No blank or space characters are permitted as part of a
                  name. No distinction is made between upper and lower case. The first
                  character must be an alpha character. The last character must not be
                  a minus sign or period.
                  A host which serves as a GATEWAY should have
                  "-GATEWAY" or "-GW" as part of its name. Hosts which do not serve as
                  Internet gateways should not use "-GATEWAY" and "-GW" as part of
                  their names. A host which is a TAC should have "-TAC" as the last
                  part of its host name, if it is a DoD host. Single character names
                  or nicknames are not allowed.




                (My emphasis).



                This was changed in RFC 1123, four years later:




                The syntax of a legal Internet host name was specified in RFC-952 [DNS:4]. One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax.




                So whilst the latter is allowable today, it has not always been so, and I'm guessing it's an convention that is still held by quite a few today, which is why programmers has (wrongly) enforced this.



                IMO it could be submitted as a bug towards the installer.



                It will work on modern systems, and you should see no issues on modern platforms that conforms to modern DNS standards.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 11 at 18:11

























                answered Jan 11 at 17:21









                vidarlovidarlo

                9,58352445




                9,58352445






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1108909%2fnumeric-prefix-in-hostname%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    How to make a Squid Proxy server?

                    第一次世界大戦

                    Touch on Surface Book