konfigurasi dhcp server cisco packet tracer

  • 2 min read
  • Aug 13, 2019

Konfigurasi DHCP Server di Router Cisco (Simulasi Packet Tracer)

Apa itu DHCP Server ? Penjelasan sederhananya adalah, server yang memberikan IP address kepada client-client / users, sehingga si users / client tidak perlu konfigurasi IP address secara manual, karena sudah otomatis mendapatkan IP address dari si server.  Di server, dikonfigurasi / ditentukan IP address, netmask, gateway dan dns, apa yang digunakan untuk si client.

Mengenai IP address, subneting, netmask dan krooni-kroninya, saya anggap anda sudah menguasainya 🙂

 

Router – DHCP server.
Konfigurasi awal, yang biasa dilakukan pada router. Hanya option saja.

Router>enable

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#hostname DHCP-SERVER

DHCP-SERVER(config)#

Konfigurasi interface fast ethernet 0/0 pada router.

Loading...

DHCP-SERVER(config)#inter fa0/0

DHCP-SERVER(config-if)#ip address 192.168.50.1 255.255.255.0

DHCP-SERVER(config-if)#desc GATEWAY LAN

DHCP-SERVER(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

 

DHCP-SERVER(config-if)#exit

DHCP-SERVER(config)#

Konfigurasi DHCP poolnya.

DHCP-SERVER(config)#ip dhcp pool landhcp

DHCP-SERVER(dhcp-config)#network 192.168.50.0 255.255.255.0

DHCP-SERVER(dhcp-config)#defau

DHCP-SERVER(dhcp-config)#default-router 192.168.50.1

DHCP-SERVER(dhcp-config)#dns 192.168.50.1

DHCP-SERVER(dhcp-config)#exit

Konfigurasi selanjutnya mengeset IP address berapa saja yang tidak boleh diberikan ke users.

DHCP-SERVER(config)#ip dhcp ?

  excluded-address  Prevent DHCP from assigning certain addresses

  pool              Configure DHCP address pools

DHCP-SERVER(config)#ip dhcp exclude

DHCP-SERVER(config)#ip dhcp excluded-address ?

  A.B.C.D  Low IP address

DHCP-SERVER(config)#ip dhcp excluded-address 192.168.50.1 ?

  A.B.C.D  High IP address

  <cr>

DHCP-SERVER(config)#ip dhcp excluded-address 192.168.50.1

DHCP-SERVER(config)#ip dhcp excluded-address 192.168.50.30 192.168.50.50

DHCP-SERVER(config)#do wr

Building configuration…

[OK]

DHCP-SERVER(config)#

Cek hasil semua konfigurasi dengan menggunakan perintah sh run ( show running-config )

DHCP-SERVER#sh run

Building configuration…

 

Current configuration : 893 bytes

!

version 12.2

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption

!

hostname DHCP-SERVER

!

!

!

!

ip dhcp excluded-address 192.168.50.1

ip dhcp excluded-address 192.168.50.30 192.168.50.50

!

ip dhcp pool landhcp

 network 192.168.50.0 255.255.255.0

 default-router 192.168.50.1

 dns-server 192.168.50.1

!

!

!

interface FastEthernet0/0

 description GATEWAY LAN

 ip address 192.168.50.1 255.255.255.0

 duplex auto

 speed auto

!

—–deleted——–

End

Router sebagai user-1
Router ini sebagai user dari si DHCP Server. Maka pada interface routernya disetting DHCP client agar bisa mendapatkan IP dari DHCP server.

Router>en

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#host Router-User1

Router-User1(config)#inter fa0/0

Router-User1(config-if)#ip addres

Router-User1(config-if)#ip address dhcp

Router-User1(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

Router-User1(config-if)#

Komputer User
Konfigurasi interface fast ethernetnya, dan pada IP configuration, pilih DHCP.


Saatnya untuk mengetest. Dari Router-user1, gunakan perintah ping.

Router-User1>sh inter fa0/0

FastEthernet0/0 is up, line protocol is up (connected)

  Hardware is Lance, address is 0001.c9e1.5b01 (bia 0001.c9e1.5b01)

  Internet address is 192.168.50.2/24

  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,

     reliability 255/255, txload 1/255, rxload 1/255

……………………

Router-User1>ping 192.168.50.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.50.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/40/40 ms

 

Router-User1>

Dari komputer user.