Search This Blog

DHCP

On Core_R1, provide IP addresses to hosts on the GUEST VLAN (192.168.42.0/24). Exclude IP addresses ranging from 192.168.42.128 to 192.168.42.254. Also exclude IP addresses in the range 192.168.42.3,192.168.42.4 which are reserved for Core_R1 and Core_R2, and 192.168.42.11-16 which are reserved for the switches. Set Core_R1 as the default gateway for hosts on the network  192.168.42.0/24.

Core_R1#conf t
Core_R1(config)#ip dhcp excluded-address 192.168.42.128 192.168.42.254
Core_R1(config)#ip dhcp excluded-address 192.168.42.11 192.168.42.16
Core_R1(config)#ip dhcp excluded-address 192.168.42.192.168.42.4
Core_R1(config)#ip dhcp pool GUEST
Core_R1(dhcp-config)#network 192.168.42.0 255.255.255.0
Core_R1(dhcp-config)#default-router 192.168.42.3
Core_R1(dhcp-config)#end
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Full show run in CORE_R1
ip dhcp excluded-address 192.168.137.128 192.168.137.254
ip dhcp excluded-address 192.168.137.11 192.168.137.16
ip dhcp excluded-address 192.168.137.3 192.168.137.4
ip dhcp excluded-address 192.168.42.128 192.168.42.254
ip dhcp excluded-address 192.168.42.11 192.168.42.16
ip dhcp excluded-address 192.168.42.3 192.168.42.4
ip dhcp pool INTERNAL
 network 192.168.137.0 255.255.255.0
 default-router 192.168.137.3 
!
ip dhcp pool GUEST
 network 192.168.42.0 255.255.255.0
 default-router 192.168.42.3 255.255.255.0

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Full show run in CORE_R2
ip dhcp excluded-address 192.168.137.1 192.168.137.127
ip dhcp excluded-address 192.168.137.137
ip dhcp excluded-address 192.168.42.1 192.168.42.127
!
ip dhcp pool internal
 network 192.168.137.0 255.255.255.0
 default-router 192.168.137.4 
!
ip dhcp pool GUEST
 network 192.168.42.0 255.255.255.0
 default-router 192.168.42.4 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

The excluded range specifies wich address are not to be leased from the pool.The excluded range configured above will make Core_R1 Assign the first IP address from 192.168.137.1 - 127 and will skip 192.168.128-254. By look at the Diagram, we see the 192.168.137.11-16,  192.168.137.3-4. Those are Ip address for Switch Virtual Interface (SVI) or VLAN interface, and subinterface we don't need those IP address to assign to whatever host or users on our network, so we want to skip is as well. Same on VLAN 42


Now by looking  at the show run in Core_R2 

We can see CORE_R2  excluded-address 192.168.137.1 -127, for VLAN 137 because that IP address is released  by CORE_R1, so we need to skip is on CORE_R2   we excluded IP address
for VLAN 42 as well.

                   Please do not configure DHCP on your Router this is just for Explain 


DHCP traceoption for juniper 

set system processes dhcp-service traceoptions file dhcp.pcap

set system processes dhcp-service traceoptions file size 2000000

set system processes dhcp-service traceoptions file files 5

set system processes dhcp-service traceoptions flag all

set system processes dhcp-service traceoptions level all


show log dhcp.pcap










No comments: