7 Replies Latest reply: Feb 10, 2011 1:45 PM by josephquinajon RSS

    About DHCP and DNS configuration in Cisco Router

    student

      Hi Guys,

       

      I am having a confusion about DHCP and DNS configuration in Cisco Routers, I do know about the function of DHCP and DNS but I wanted to know that

      Inorder for the Router to function as DHCP should we also enable DNS on it or we can keep the DNS Server seperate on the network?

       

       

      My other question is that why do we really need to make the Router a DNS? Do we only do it when other DNS machine is not available in the network?

       

      When we make the Router as a DNS ,does the request for web traffic from the LAN goes to this Router for the resolution of domain name to ip address?

       

      I hope my questions are clear

        • 1. Re: About DHCP and DNS configuration in Cisco Router
          DelVonte

          A router can be configured as a DHCP server that in turn has the ability to give out Domain information to its DHCP clients, but as far as I know, it cannot act as a DNS server.

           

          For instance, you can configure the domain-name domain option or the dns-server address option on a router, which basically tells the DHCP client the domain name and IP addresses of DNS servers.

           

          HTH

          DelVonte

          • 2. Re: About DHCP and DNS configuration in Cisco Router
            Conwyn

            Hi Student

             

            DNS server on a router

             

            If you want to  implement a DNS server on the router use the commands

            ip dns server
            ip dns primary conwyn.com soa ns.conwyn.com conwyn.conwyn.com 21600 900 7776000 86400

            then the dns server uses ip host as its data to satisfy DNS requests.

             

             

            Regards Conwyn

            • 3. Re: About DHCP and DNS configuration in Cisco Router
              DelVonte

              Didn't know that could be done. Thanks for that one Conwyn, learned something new today.

              • 4. Re: About DHCP and DNS configuration in Cisco Router
                Conwyn

                Hi DelVonte

                 

                It is just the Cisco Learning Network living up to its name.

                 

                Regards Conwyn

                • 5. Re: About DHCP and DNS configuration in Cisco Router
                  student

                  Hi Del Vonte and Conwyn,

                   

                  Thanks for your reply so you mean we cannot add DNS functionality in Router but we can give the path of the DNS Server in the Router so that any web or http traffic that reaches the Router from LAN goes to that DNS Server for the domain name to ip resolution,right?

                   

                  Why do we use this command "domain-name" in the router? Do we use this command to assign a domain name to the Router so that we can also access it from web browser?

                   

                  For example when we configure DHCP on a Router,we use these commands:

                   

                  (dhcp-config)#default-router 192.168.1.254----> this is the IP address of the Router.

                  dhcp-config)#dns-server 192.168.1.254-------->configuring DNS on the Router.

                   

                  Now please tell me what does this 2nd command actually means? Are we telling the router that when the HTTP or web traffic from LAN that hits the Router at 192.168.1.254 should be directed to the DNS Server located in the network or to the DNS of the ISP or ,this command just tells the Router that it is a DNS Server?

                   

                  I hope you guys understand my question.

                  • 6. Re: About DHCP and DNS configuration in Cisco Router
                    Conwyn

                    Hi Student

                     

                    Post two show you how to implement DNS server on a router.

                     

                    Regards Conwyn

                    • 7. Re: About DHCP and DNS configuration in Cisco Router
                      josephquinajon

                      hi Student,

                       

                      (dhcp-config)#default-router 192.168.1.254----> this is the IP address of the Router.

                      dhcp-config)#dns-server 192.168.1.254-------->configuring DNS on the Router.

                       

                       

                      On the first configuration, the router tells its dhcp clients or configures the dhcp client's default gateway to this address 192.168.1.254. So when the client have traffic outside the network or to the internet, it will send that traffic to it default gateway which is in your case 192.168.1.254.

                      On the second configuration, the router tells its dhcp clients to use the IP 192.168.1.254 as its DNS if the client wanted to send traffic to the internet.

                       

                      The 2 lines of configurations will be sent to all dhcp clients of the same subnet of course and will be configured  automatically on the clients TCP/IP together with the IP address of the dhcp client which is from the DHCP address pool.

                       

                           (dhcp-config)#network192.168.1.0 255.255.255.0, -- IP address to be assigned.

                       

                      I hope this will help you clear your understanding to your problem.