DNS Configuration
DNS Configuration
Lab Topology
The topology diagram below represents the NetMap in the Simulator.
Fa 0/0 Fa 0/12
Router1 Switch1
Fa 0/1 Fa 0/2
PC1 PC2
Command Summary
Command Description
bedit filename is used in NetSim to open a file from a workstation
configure terminal enters global configuration mode from privileged EXEC mode
enable enters privileged EXEC mode
end ends and exits configuration mode
exit exits one level in the menu structure
hostname host-name sets the device name
interface type number changes from global configuration mode to interface
configuration mode
ip address ip-address subnet-mask assigns an IP address to an interface
ipconfig /all is used in NetSim to display the IP addresses and Media
Access Control (MAC) address on a PC workstation
ipconfig /dg ip-address is used in NetSim to assign a default gateway IP address to a
workstation interface
ipconfig /ip ip-address subnet-mask is used in NetSim to assign an IP address and subnet mask to
a workstation interface
The IP addresses and subnet masks used in this lab are shown in the tables below:
IP Addresses
Device Interface IP Address Subnet Mask
Router1 FastEthernet 0/0 10.0.0.1 255.255.255.0
Switch1 VLAN 1 10.0.0.2 255.255.255.0
Lab Tasks
Task 1: Perform Initial Configurations
This task involves configuring all four devices, verifying your configuration, and verifying connectivity.
1. On Router1, configure a host name of Router1, enable interface FastEthernet 0/0, and assign
interface FastEthernet 0/0 the appropriate IP address and subnet mask; refer to the IP Addresses
table.
2. On Switch1, configure a host name of Switch1 and assign interface VLAN 1 the appropriate IP
address and subnet mask; refer to the IP Addresses table.
3. On PC1 and PC2, configure the appropriate IP address, subnet mask, and default gateway; refer to
the IP Addresses table.
5. On Router1, verify network connectivity by issuing a ping to Switch1 (10.0.0.2), PC1 (10.0.0.100),
and PC2 (10.0.0.101).
3. Configure Router1 with two host-table entries: Router1 with an IP address 10.0.0.1 and Switch1
with an IP address 10.0.0.2.
4. Configure Switch1 to use Router1 as its DNS server, and enable host-name–to–address translation.
5. From Switch1, ping Router1 by using the name of the host (Router1) instead of Router1’s IP
address to verify your configuration.
2. You can open a basic text editor on a NetSim-simulated PC by issuing the bedit filename command.
Open PC1’s hosts file. The name of the file is hosts.
3. Add two entries to the hosts file on PC1: Router1 with an IP address 10.0.0.1 and Switch1 with an
IP address 10.0.0.2.
4. Save the hosts file by clicking the Save (F11) menu item.
5. Close the text editor by clicking the Close (F6) menu item.
6. Using the name of the host instead of the IP address, issue a ping from PC1 to Router1 (Router1)
and Switch1 (Switch1).
2. In NetSim, you can configure a PC with a Primary DNS server by issuing the ipconfig /dns ip-
address command. A Secondary DNS server can be configured by using the same command and
supplying a second IP address. Configure PC2 to use 10.0.0.1 as its Primary DNS server.
4. From PC2, ping Router1 and Switch1 by using host names (Router1 and Switch1).
Router>enable
Router#configure terminal
Router(config)#hostname Router1
Router1(config)#interface fastethernet 0/0
Router1(config-if)#ip address 10.0.0.1 255.255.255.0
Router1(config-if)#no shutdown
2. You should issue the following commands on Switch1 to configure a host name of Switch1 and to
assign interface VLAN 1 the appropriate IP address and subnet mask:
Switch>enable
Switch#configure terminal
Switch(config)#hostname Switch1
Switch1(config)#interface vlan 1
Switch1(config-if)#ip address 10.0.0.2 255.255.255.0
3. You should issue the following commands on PC1 and PC2 to configure the appropriate IP address,
subnet mask, and default gateway:
On PC1:
C:>ipconfig /ip 10.0.0.100 255.255.255.0
C:>ipconfig /dg 10.0.0.1
On PC2:
C:>ipconfig /ip 10.0.0.101 255.255.255.0
C:>ipconfig /dg 10.0.0.1
4. You should issue the show ip interface brief command on Router1 and Switch1 to verify IP
addresses and subnet masks. Sample output is below:
Router1(config-if)#end
Router1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Serial0/0 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
FastEthernet0/0 10.0.0.1 YES unset up up
FastEthernet0/1 unassigned YES unset administratively down down
Switch1(config-if)#end
Switch1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Vlan 1 10.0.0.2 YES unset up up
<output omitted>
Router1#ping 10.0.0.2
Router1#ping 10.0.0.100
Router1#ping 10.0.0.101
Switch1#ping Router1
% Unrecognized host or address, or protocol not running.
2. You should issue the ip dns server command on Router1 to enable the DNS server features and to
configure it to respond to DNS queries:
Router1#configure terminal
Router1(config)#ip dns server
3. You should issue the following commands to configure Router1 with the appropriate host-table
entries:
4. You should issue the following commands on Switch1 to use Router1 as its DNS server and enable
host-name–to–address translation:
Switch1#configure terminal
Switch1(config)#ip name-server 10.0.0.1
Switch1(config)#ip domain-lookup
Switch1(config)#end
Switch1#ping Router1
2. You should issue the bedit hosts command on PC1 to open PC1’s hosts file.
C:>bedit hosts
3. You should add the two lines in the screenshot below to add a host name entry Router1 with an IP
address 10.0.0.1 and a host name entry Switch1 with an IP address 10.0.0.2 to the hosts file on
PC1:
4. You should click the Save (F11) menu item to save the hosts file on PC1.
6. Pings from PC1 to Router1 and Switch1 by using host names should now be successful.
C:>ping Router1
C:>ping Switch1
C:>ipconfig /all
<output omitted>
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.0.0.101
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.1
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139/810X Family PCI
FastEthernet NIC
Physical Address. . . . . . . . . : 000C.3832.8668
DHCP Enabled. . . . . . . . . . . : YES
DNS Servers . . . . . . . . . . . :
2. You should issue the following command on PC2 to configure it to use 10.0.0.1 as its Primary DNS
server:
3. You should issue the following command on PC2 to verify IP configuration information. Sample
output is below:
C:>ipconfig /all
<output omitted>
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.0.0.101
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.1
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8139/810X Family PCI
FastEthernet NIC
Physical Address. . . . . . . . . : 000C.3832.8668
DHCP Enabled. . . . . . . . . . . : YES
C:>ping Router1
C:>ping Switch1
Copyright © 1996–2014 Boson Software, LLC. All rights reserved. NetSim software and documentation are protected by copyright law.