Hari ke enam juga diisi dengan materi IP Services.
Salah satu bagian dari IP services adalah bagaimana cara konfigurasi DHCP server.
Lab 1 - DHCP Server
Topologi lab yang digunakan
Router R1 akan dibuat sebagai client dan R2 kita set sebagai DHCP server.
Konfigurasi R1:
interface FastEthernet0/0
ip address dhcp
ip address dhcp
Konfigurasi R2 :
ip dhcp pool CISCO
network 12.12.12.0 255.255.255.0
default-router 12.12.12.2
dns-server 10.10.10.10 20.20.20.20
lease 1 12
network 12.12.12.0 255.255.255.0
default-router 12.12.12.2
dns-server 10.10.10.10 20.20.20.20
lease 1 12
!
interface FastEthernet0/0
ip address 12.12.12.2 255.255.255.0
ip address 12.12.12.2 255.255.255.0
Dari konfigurasi IP pool di R2, mempunyai lease time selama 1 hari dan 12 jam.
Setelah R1 terkoneksi ke R2, maka secara otomatis R1 akan melakukan request IP DHCP ke R2.
Untuk detailnya bisa kita cek dengan mengaktifkan 'debug ip dhcp server event'
R2#
*Mar 1 00:12:28.459: DHCPD: Sending notification of DISCOVER:
*Mar 1 00:12:28.463: DHCPD: htype 1 chaddr c007.0ab4.0000
*Mar 1 00:12:28.463: DHCPD: remote id 020a00000c0c0c0200000000
*Mar 1 00:12:28.463: DHCPD: circuit id 00000000
*Mar 1 00:12:28.463: DHCPD: Seeing if there is an internally specified pool class:
*Mar 1 00:12:28.463: DHCPD: htype 1 chaddr c007.0ab4.0000
*Mar 1 00:12:28.467: DHCPD: remote id 020a00000c0c0c0200000000
*Mar 1 00:12:28.467: DHCPD: circuit id 00000000
R2#
*Mar 1 00:12:30.467: DHCPD: Adding binding to radix tree (12.12.12.1)
*Mar 1 00:12:30.467: DHCPD: Adding binding to hash tree
*Mar 1 00:12:30.467: DHCPD: assigned IP address 12.12.12.1 to client 0063.6973.636f.2d63.3030.372e.3061.6234.2e30.3030.302d.4661.302f.30.
*Mar 1 00:12:30.531: DHCPD: Sending notification of ASSIGNMENT:
*Mar 1 00:12:30.531: DHCPD: address 12.12.12.1 mask 255.255.255.0
*Mar 1 00:12:30.535: DHCPD: htype 1 chaddr c007.0ab4.0000
*Mar 1 00:12:30.535: DHCPD: lease time remaining (secs) = 129600
*Mar 1 00:12:28.459: DHCPD: Sending notification of DISCOVER:
*Mar 1 00:12:28.463: DHCPD: htype 1 chaddr c007.0ab4.0000
*Mar 1 00:12:28.463: DHCPD: remote id 020a00000c0c0c0200000000
*Mar 1 00:12:28.463: DHCPD: circuit id 00000000
*Mar 1 00:12:28.463: DHCPD: Seeing if there is an internally specified pool class:
*Mar 1 00:12:28.463: DHCPD: htype 1 chaddr c007.0ab4.0000
*Mar 1 00:12:28.467: DHCPD: remote id 020a00000c0c0c0200000000
*Mar 1 00:12:28.467: DHCPD: circuit id 00000000
R2#
*Mar 1 00:12:30.467: DHCPD: Adding binding to radix tree (12.12.12.1)
*Mar 1 00:12:30.467: DHCPD: Adding binding to hash tree
*Mar 1 00:12:30.467: DHCPD: assigned IP address 12.12.12.1 to client 0063.6973.636f.2d63.3030.372e.3061.6234.2e30.3030.302d.4661.302f.30.
*Mar 1 00:12:30.531: DHCPD: Sending notification of ASSIGNMENT:
*Mar 1 00:12:30.531: DHCPD: address 12.12.12.1 mask 255.255.255.0
*Mar 1 00:12:30.535: DHCPD: htype 1 chaddr c007.0ab4.0000
*Mar 1 00:12:30.535: DHCPD: lease time remaining (secs) = 129600
Terlihat bahwa request IP DHCP dari R1 dijawab oleh R2 dengan memberikan IP 12.12.12.1/24 dengan lease time 129600 (1 hari dan 12 jam).
Kita cek IP DHCP pool di R2 :
R2#sh ip dhcp pool
Pool CISCO :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 1
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
12.12.12.2 12.12.12.1 - 12.12.12.254 1
Pool CISCO :
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 1
Pending event : none
1 subnet is currently in the pool :
Current index IP address range Leased addresses
12.12.12.2 12.12.12.1 - 12.12.12.254 1
R2#sh ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
12.12.12.1 0063.6973.636f.2d63. Mar 02 2002 12:00 PM Automatic
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
12.12.12.1 0063.6973.636f.2d63. Mar 02 2002 12:00 PM Automatic
Terlihat bahwa sudah ada 1 IP address yang sudah dileased, IP 12.12.12.1 untuk mac-address client 0063.6973.636f.2d63
Tidak ada komentar:
Posting Komentar