banner



How To Set A Domain Name On Cisco Router

Configure DNS and DHCP on Cisco Router

Domain Name Service (DNS)

Domain Name Service or is a  protocol which is used to resolve Fully Qualified Domain Name (FQDN) into IP address and vice-versa. You tin think of FQDN every bit the name of some website like www.techtutsonline.com. Information technology is easier to remember the name as compared to IP addresses. That is why DNS is used everywhere while accessing websites through net besides connecting to shared resources inside LAN.

Dynamic Host Configuration Protocol (DHCP)

DHCP is a protocol which is used  by network devices to automatically obtain network configuration data like IP Address, Subnet mask, Default gateway, DNS Servers etc.

Y'all know that both of DNS and DHCP are so important services, you might want to setup them to exist used in your network. Today every low-finish routers come up with builtin DNS and DHCP functionality. All yous have to do is to enable and confgure them to be used in your network. In this section I am going to discuss how to configure DNS and DHCP on Cisco routers.

I volition utilise the post-obit network diagram to demonstrate the configuration

DNS DHCP
In above network topology, WebServer (192.168.0.254) is running a website www.techtutsonline.com and our goal is to configure DNS and DHCP on Router R1 so that PC1, PC2 can obtain IP configurations and admission the website using FQDN instead of using IP address.

Now, Let's get started.

DNS Configuration

R1#config term R1(config)#            ip dns server                    R1(config)#            ip domain-lookup                    R1(config)#

the ip dns-server control is used to enable DNS service on router and ip domain-lookup command is used to enable IP to domain name translation on router.

Now, nosotros need to add forwarder address so that R1 tin can make recursive query to other DNS server if it does not accept any record in its own database. We will utilise Server 192.168.0.254 because this server is likewise running DNS service forth with Web service. You lot can apply upto 6 addresses as forwarders and if y'all are configuring the router for your network to reach internet, I would recommend using your Internet access provider's DNS or whatsoever public DNS server accost like google's DNS (eight.8.8.eight).

R1(config)#            ip name-server 192.168.0.254                    R1(config)#            ip host 192.168.1.ten                  

If you want this DNS to resolve your local PC to IP address, you lot can add host (A) tape manually by using ip host control. In our sample network, the PC3 is assigned static address 192.168.1.10.

Verify DNS

You lot tin can verify if DNS is working by running ping to PC3 on R1.

R1# R1#            ping PC3                    Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to                      192.168.1.10          , timeout is 2 seconds: !!!!! Success rate is 100 percent (v/5), round-trip min/avg/max = 8/9/12 ms  R1#            ping www.techtutsonline.com                    Translating "            www.            techtutsonline.com          "...domain server (            192.168.0.254          ) Type escape sequence to arrest. Sending v, 100-byte ICMP Echos to                      192.168.0.254          , timeout is 2 seconds: !!!!! Success rate is 100 percent (5/five), round-trip min/avg/max = 2/three/5 ms  R1#

R1 can resolve FQDN address world wide web.techtutsonline.com to 192.168.0.254 using domain server 192.168.0.254.

To verify if R1 is doing recursive queries to next DNS server, move to PC3 and run ping to techtutsonline.com and run into if it resolves to IP 192.168.0.254. If information technology does, ways you tin also browse the website http://www.techtutsonline.com right from PC3.

PC>            ping techtutsonline.com                    Pinging                      192.168.0.254                    with 32 bytes of data:  Respond from 192.168.0.254: bytes=32 time=16ms TTL=127 Reply from 192.168.0.254: bytes=32 time=13ms TTL=127 Respond from 192.168.0.254: bytes=32 fourth dimension=13ms TTL=127 Reply from 192.168.0.254: bytes=32 time=13ms TTL=127  Ping statistics for 192.168.0.254:     Packets: Sent = iv, Received = four, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:     Minimum = 13ms, Maximum = 16ms, Average = 13ms  PC>

You tin run into above that techtutsonline.com is correctly resolved to 192.168.0.254.

At present try to open the website from PC3.

PC3
It proves that DNS service is now working on Router R1.

DHCP Configuration

Now, let's configure DHCP server on R1 so that PC1 and PC2 tin obtain TCP/IP configuration from R1.

R1#config term R1(config)#            service dhcp                  

The global configuration mode command service dhcp is used to enable DHCP service on router. The next step is to create DHCP pool where nosotros will define the IP accost range which R1 will assign to DHCP clients. I am going to create it with the name DHCP-Puddle

R1(config)#            ip dhcp pool DHCP-Pool                    R1(dhcp-config)#            network 192.168.1.0 255.255.255.0                    R1(dhcp-config)#            default-router 192.168.1.1                    R1(dhcp-config)#            dns-server 192.168.1.1                    R1(dhcp-config)#            domain-name techtutsonline.com                    R1(dhcp-config)#stop R1#

The network 192.168.ane.0 255.255.255.0 command as shown above will tell the router that unabridged 192.168.1.1 through 192.168.ane.254 would be assigned to DHCP clients requesting the configuration. Simply as yous know, we have already used 192.168.1.1 on router and 192.168.ane.10 on PC3, we take to exclude these two IPs. The d default-router control tells what should be default gateway for clients. The dns-server and domain-name commands are used to specify the DNS server address and domain name respectively.

R1(config)#            ip dhcp excluded-address 192.168.1.1                    R1(config)#            ip dhcp excluded-address 192.168.1.10                    R1(config)#

The i p dhcp excluded-address control is used to exclude the IP address range or single IP address.

This is all you need to configure DHCP on router. You can view the DHCP status on router using show ip dhcp bindig command.

R1#            evidence ip dhcp binding                    IP address       Client-ID/              Lease expiration        Blazon                  Hardware accost 192.168.1.three      0040.0BD9.77C0           --                     Automated 192.168.1.iv      0050.0F74.91D4           --                     Automatic R1#

Yous tin can also see that PC1 and PC2 has been assigned the TCP/IP configuration.

PC1>ipconfig /all  Physical Accost................: 0040.0BD9.77C0 IP Accost......................: 192.168.1.3 Subnet Mask.....................: 255.255.255.0 Default Gateway.................: 192.168.1.one DNS Servers.....................: 192.168.1.1

DHCP is very useful if yous take very large network where static accost configuration is not possible.

Dorsum

Source: https://www.techtutsonline.com/configure-dns-and-dhcp-on-cisco-router/

0 Response to "How To Set A Domain Name On Cisco Router"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel