Description

This article explains how to configure extended DHCP server configuration under routing instance virtual router (VR) on an EX/QFX switch.

Solution

Routing instances are a collection of routing tables, interfaces, and routing protocol parameters. The set of interfaces belongs to the routing tables, and the routing protocol parameters control the information in the routing tables.  Therefore, if we create a DHCP pool under default routing instance, it will not act for other routing instances.

Clients are connected via a specific routing instance that will be able to get the IP address if the pool has been defined under the specific routing instance. T he example below shows how to create a pool for the clients under a routing instance and mapping the desired interface.

Routing Instance R1 consists of Client A connected to ge-0/0/0 which is configured with VLAN10. VLAN10 is mapped to irb.10.


irb.10=10.10.10.1/24
 

 
STEP 1 : Configure VLAN and l3 interface with the desired physical interfaces mapped to the VLAn.
 
set vlans VLAN10 vlan-id 10
set interfaces irb unit 10 family inet address 10.10.10.1/24
set vlans VLAN10 l3-interface irb.10
set interfaces ge-0/0/0 unit 0 family ethernet-switching interface-mode access
set interfaces ge-0/0/0 unit 0 family ethernet-switching vlan members VLAN10
 
STEP 2 : Configure a routing instance R1 as VR and map the l3 interface to R1.
 
set routing-instances R1 instance-type virtual-router
set routing-instances R1 interface irb.10
 
STEP 3 : Now, the important part is the pool should be created under routing instance R1. It should not be present under default routing instance.
 
set routing-instances R1 access address-assignment pool Client family inet network 10.10.10.0/24
set routing-instances R1 access address-assignment pool Client family inet range host low 10.10.10.10
set routing-instances R1 access address-assignment pool Client family inet range host high 10.10.10.100
 
STEP 4 : Other attributes like router and name server can be added to pool as follows:
 
set routing-instances R1 access address-assignment pool Client family inet dhcp-attributes name-server 8.8.8.8
set routing-instances R1 access address-assignment pool Client family inet dhcp-attributes router 10.10.10.1
 
STEP 5: Configure the DHCP-local-server option with system services under routing instance R1.  Most of the time, the configuration is done under default system services, which is incorrect. Hence the clients cannot get an IP address.
 
set routing-instances R1 system services dhcp-local-server group test interface irb.10

STEP 6:  Confirm if the clients are getting IP addresses and check the statistics, binding, etc. on the switch with the following commands:

show dhcp server binding routing-instance R1
show dhcp server statistics routing-instance R1
 
Note: Routing instance is a must in the above command to see the outputs.