Configuring DHCP

 

23-1 DHCP Configuration – Lab Exercise


Pada LAB Exercise ini, saya masih mengutip dari buku Flackbox oleh Niel Andersen. Buku ini dapat diakses secara gratis melalui www.Flackbox.com .

In this lab you will perform a DHCP configuration for a small campus network. You will configure a router’s outside interface as a DHCP client. You will then set up DCHP services, using a Cisco router first and then an external DHCP server. The external DHCP server is inside the campus LAN but outside the router.


Note that the external DHCP server at 10.10.20.10 will not be used until the last part of the lab.



Lab Topology





Load the Startup Configurations


Download the ‘23-1 DHCP Configuration.zip’ file here. Extract the project .pkt file then open it in Packet Tracer. Do not try to open the project from directly inside the zip file.



Cisco DHCP Client


  1. You have not acquired a static public IP address from the Internet service provider. Configure the outside interface FastEthernet 0/0 on R1 to receive its IP address using DHCP. The Service Provider is already configured and you have no access to it.

Answer:

R1(config)#int f0/0
R1(config-if)#ip address dhcp
R1(config-if)#no shut


%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Note:
Di bagian ini, kita diminta untuk membuat R1 interface FastEthernet0/0 menjadi DHCP client dari Router Service Provider. Maka dari itu, kita akses interfacenya. Kemudian kita konfigurasi interface tersebut dengan command ip address dhcp, agar R1 me-request IP DHCP dari subnetnya yaitu Router Service Provider. Dilanjut dengan no shutdown untuk menghidupkan interfacenya.

  1. Verify that R1 received its public IP address via DHCP (you may need to wait a few minutes for the address to be assigned).

Answer:

%DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 203.0.113.2, mask 255.255.255.0, hostname R1

Note:
Interface FastEthernet0/0 R1 sudah terverifikasi memiliki IP DHCP dengan IP 203.0.113.2/24.


  1. What is the IP address of R1’s DHCP server?

Answer:
203.0.113.1/24



Cisco DHCP Server


  1. Enable the DHCP service on R1 so it gives out IP addresses to the PCs in the 10.10.10.0/24 subnet. Leave IP addresses 10.10.10.1 – 10 free to be assigned to servers and printers. 10.10.20.10 is the DNS server.

Answer:

R1(config)#ip dhcp excluded-address 10.10.10.1 0.10.10.10

R1(config)#ip dhcp pool SW1

R1(dhcp-config)#network 10.10.10.0 255.255.255.0

R1(dhcp-config)#default-router 10.10.10.1

R1(dhcp-config)#dns-server 10.10.20.10

R1(dhcp-config)#exit

Note:

Sebelum membuat pool DHCP, kita buat dahulu pengecualian alamat dalam range IP DHCP agar alamat tersebut tidak dapat dipinjamkan kepada client. Kita diminta untuk mengecualikan IP 10.10.10.1 – 10. Untuk melakukannya, kita input command ip dhcp excluded-address 10.10.10.1 0.10.10.10.
Lalu kita buat pool DHCP dengan string SW1. Dilanjutkan dengan mengisi network 10.10.10.0 255.255.255.0 yang artinya adalah pool ini untuk network 10.10.10.0/24.
R1 dengan interface f0/1, merupakan gateway dengan IP 10.10.10.1 dari subnet 10.10.10.0. Maka dari itu, secara otomatis pool ini diaplikasikan ke bagian tersebut.

Lalu kita konfigurasikan gateway untuk client DHCP subnet ini yaitu 10.10.10.1. Maka kita input command default-router 10.10.10.1.

Selanjutnya konfigurasikan dns-servernya yaitu 10.10.20.10. Maka input command-nya dns-server 10.10.20.10.



  1. Verify the clients received their IP information via DHCP.

Answer:

 

  1. Verify the clients can ping the DNS server by its hostname ‘DNSserver’ (it might take some time for DNS to resolve the hostname).

Answer:


  1. On R1, verify both clients received an IP address via DHCP.

Answer:

R1#show ip dhcp binding

IP address Client-ID/ Lease expiration Type

Hardware address

10.10.10.12 0000.0CA0.A359 -- Automatic

10.10.10.11 0002.164E.D116 -- Automatic


  1. Cleanup – remove the DHCP server configuration on R1. You will use an external DHCP server instead in the next section.

Answer:
R1(config)#no ip dhcp pool SW1


  1. Enter the command ‘ipconfig /release’ on the PCs to release their IP addresses.

Answer:


  1. Enter the command ‘ipconfig /renew’ on the PCs and verify they can no longer obtain an IP address via DHCP

Answer:



External DHCP Server



  1. The server at 10.10.20.10 has been configured as a DHCP server with a scope of IP addresses for the 10.10.10.0/24 subnet, but the PCs there are not receiving IP addresses. Why is this?

Answer:

Because server 10.10.20.10 sits at different subnet from the PCs subnet. So, Router needs DHCP relay configuration to reach IP DHCP from the server.



  1. Configure the network to allow the PCs to receive their IP addresses from the DHCP server.

Answer:

R1(config)#int f0/1

R1(config-if)#ip helper-address 10.10.20.10

Note:
Apabila pada network LAN tersebut tidak terdapat server DHCP. Maka, router dapat mencarikan server DHCP-nya melalui fitur DHCP relay. Fungsi DHCP relay adalah menghubungkan client DHCP menuju server DHCP yang berada pada network LAN yang berbeda. Pada topology ini, Server DHCP server memiliki IP address 10.10.20.10. Untuk mengkonfigurasikannya, kita pilih dulu interface mana yang membutuhkan koneksi ke DHCP server. Di mana pada topology ini yaitu interface FastEthernet 0/1. Maka kita akses konfigurasi interface f0/1. Dilanjutkan dengan menginput subcommand ip helper-address 10.10.20.10.


  1. Verify the clients received their IP information via DHCP.

Answer:


Comments

Popular posts from this blog

Cisco Device Management - Lab Exercise