Description: This lab exercise demonstrates DHCP server configuration and DHCP client configuration on two routers and also shows the verification commands both on the server and the client.
Network Diagram :
Instructions:
1. Enter into configuration mode of device R1
2. Assign ipaddress of ge-0/0/0 interface as 192.168.1.1/24 and ge-0/0/1 interface as 192.168.1.2/24
3. Configure the dhcp server
4. Specify the low and high ip address pool range
5. Configure default and maximum lease-time
6. Configure the domain-name used by client
7. Configure DNS Server IP address
8. Configure the default-router address
9. Confirm the configuration by entering the show command from configuration mode
10. For the security zone (for example, untrust) to which the interface is bound, specify DHCP as a host-inbound service.(ge-0/0/0 and ge-0/0/1)
11. Enter into configuration mode of R2 and specify the interface ( ge-0/0/0) on which to enable the DHCP client.
12. Enter into configuration mode of R3 and specify the interface ( ge-0/0/0) on which to enable the DHCP client.
13. On R1 issue "show system service dhcp binding" command to view the addresses allocated to clients
14. Issue "show system service dhcp pool" command on R1 to view server ip address pool
15. On R2 and R3 issue "show system service dhcp client" command to view information about DHCP client
On R1
user@R1>configure
[edit]
user@R1#edit interfaces ge-0/0/0 unit 0 family inet
[edit interfaces ge-0/0/0 unit 0 family inet]
user@R1#set address 192.168.1.1/24
[edit interfaces ge-0/0/0 unit 0 family inet]
user@R1#exit
[edit]
user@R1#edit interfaces ge-0/0/1 unit 0 family inet
[edit interfaces ge-0/0/0 unit 0 family inet]
user@R1#set address 192.168.1.2/24
user@R1#exit
[edit]
user@R1#edit system services dhcp
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 address-range low 192.168.1.1
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 address-range high 192.168.1.100
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 domain-name sample.com
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 name-server 192.168.1.2
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 router 192.168.1.1
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 default-lease-time 1428700
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 maximum-lease-time 2356210
[edit system services dhcp]
user@R1#set pool 192.168.1.0/24 server-identifier 192.168.1.1
[edit system services dhcp]
user@R1#exit
[edit]
user@R1#set security zones security-zone untrust interfaces ge-0/0/0 host-inbound-traffic
system-services dhcp
[edit]
user@R1#set security zones security-zone untrust interfaces ge-0/0/1 host-inbound-traffic
system-services dhcp
[edit]
user@R1#commit
commit complete
[edit]
user@R1#exit
user@R1>show system services dhcp pool
Pool Name Low Address High Address Excluded Address 192.168.1.0/24 192.168.1.1 192.168.1.100 -
On R2
user@R2>configure
[edit]
user@R2#edit interfaces ge-0/0/0 unit 0 family inet
[edit interfaces ge-0/0/0 unit 0 family inet]
user@R2#set dhcp
[edit interfaces ge-0/0/0 unit 0 family inet]
user@R2#exit
[edit]
user@R2#commit
commit complete
[edit]
user@R2#exit
user@R2>show system services dhcp client
Logical Interface Name : ge-0/0/0 Hardware address : 00A0.c914.c1f3 Client Status : bound Vendor Identifier : ether Server Address : 192.168.1.1 Address obtained : 192.168.1.3 Update server : enabled Lease Obtained at : 1428700 Lease Expires at : 2356210 DHCP Options Name Server : 192.168.1.2 Server Identifier : 192.168.1.1 Router : 192.168.1.1 Domain-Name : sample.com
On R3
user@R3>configure
[edit]
user@R3#edit interfaces ge-0/0/0 unit 0 family inet
[edit interfaces ge-0/0/0 unit 0 family inet]
user@R3#set dhcp
[edit interfaces ge-0/0/0 unit 0 family
inet]
user@R3#exit
[edit]
user@R3#commit
commit complete
[edit]
user@R3#exit
user@R3>show system services dhcp client
Logical Interface Name : ge-0/0/0 Hardware address : 00A0.c914.e:b8 Client Status : bound Vendor Identifier : ether Server Address : 192.168.1.2 Address obtained : 192.168.1.4 Update server : enabled Lease Obtained at : 1428700 Lease Expires at : 2356210 DHCP Options Name Server : 192.168.1.2 Server Identifier : 192.168.1.1 Router : 192.168.1.1 Domain-Name : sample.com
On R1
user@R1>show system services dhcp binding
Allocated Address MAC Address Binding Type Lease expires at 192.168.1.3 00A0.c914.d5b7 Dynamic 2356210 192.168.1.4 00A0.c914.a7d8 Dynamic 2356210