This article explains how to configure DHCP forwarding across two routing instances on the same QFX switch.
DHCP clients connected to one routing instance are not able to get the IP address from the DHCP server connected in another routing instance on the same QFX switch.
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.
DHCP clients connected to one routing instance can forward DHCP requests to a DHCP server connected in another routing instance on the same switch.
In the example below, the QFX switch has two routing instances: VRF (VRF.inet.0) and DEFAULT (inet.0). Routing instance VRF (VRF.inet.0) has interface ge-0/0/10, and DEFAULT (inet.0) has irb.20.
DHCP clients connected in routing instance VRF (ge-0/0/10) use the DHCP server connected in routing instance DEFAULT (inet.0).
set system host-name DHCP-SERVER set system services dhcp pool 10.0.0.0/24 address-range low 10.0.0.10 set system services dhcp pool 10.0.0.0/24 address-range high 10.0.0.20 set system services dhcp pool 10.0.0.0/24 router 10.0.0.1 set interfaces ge-0/0/20 unit 0 family ethernet-switching port-mode access set interfaces ge-0/0/20 unit 0 family ethernet-switching vlan members 20 set interfaces vlan unit 20 family inet address 20.0.0.2/24 set routing-options static route 10.0.0.0/24 next-hop 20.0.0.1 set vlans V20 vlan-id 20 set vlans V20 l3-interface vlan.20
set system host-name DHCP-CLIENT set interfaces ge-0/0/10 unit 0 family inet dhcp
set system host-name QFX5100 set interfaces ge-0/0/10 unit 0 family inet address 10.0.0.1/24 set interfaces ge-0/0/20 unit 0 family ethernet-switching interface-mode access set interfaces ge-0/0/20 unit 0 family ethernet-switching vlan members 20 set interfaces irb unit 20 family inet address 20.0.0.1/24 set forwarding-options dhcp-relay forward-only-replies set routing-options static route 10.0.0.0/24 receive set routing-instances VRF instance-type virtual-router set routing-instances VRF interface ge-0/0/10.0 set routing-instances VRF forwarding-options dhcp-relay overrides no-allow-snooped-clients set routing-instances VRF forwarding-options dhcp-relay forward-only routing-instance default set routing-instances VRF forwarding-options dhcp-relay server-group DHCP-RELAY 20.0.0.2 set routing-instances VRF forwarding-options dhcp-relay active-server-group DHCP-RELAY set routing-instances VRF forwarding-options dhcp-relay route-suppression destination set routing-instances VRF forwarding-options dhcp-relay group DHCP-RELAY active-server-group DHCP-RELAY set routing-instances VRF forwarding-options dhcp-relay group DHCP-RELAY interface ge-0/0/10.0 set vlans V20 vlan-id 20 set vlans V20 l3-interface irb.20
{master:0}[edit] root@DHCP-CLIENT# run start shell root@DHCP-CLIENT:RE:0% ifconfig ge-0/0/10 down root@DHCP-CLIENT:RE:0% ifconfig ge-0/0/10 root@DHCP-CLIENT:RE:0% ifconfig ge-0/0/10 ge-0/0/10: encaps: ether; framing: ether flags=0xb/0xc003 <PRESENT|RUNNING|DOWN/HARDDOWN|DOWN> curr media: i802 78:fe:3d:33:4e:8d ge-0/0/10.0: flags=0xc000 <UP|MULTICAST> inet primary mtu 1500 root@DHCP-CLIENT:RE:0% ifconfig ge-0/0/10 up root@DHCP-CLIENT:RE:0% cli {master:0} root@DHCP-CLIENT> monitor traffic interface ge-0/0/10 15:00:05.337319 Out IP truncated-ip - 268 bytes missing! 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp] 15:00:05.353055 In IP truncated-ip - 253 bytes missing! 10.0.0.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 285 15:00:05.353315 Out IP truncated-ip - 268 bytes missing! 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp] 15:00:05.374777 In IP truncated-ip - 253 bytes missing! 10.0.0.1.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 285 {master:0} root@DHCP-CLIENT> start shell root@DHCP-CLIENT:RE:0% ifconfig ge-0/0/10 ge-0/0/10: encaps: ether; framing: ether flags=0x3/0xc000 <PRESENT|RUNNING> curr media: i802 78:fe:3d:33:4e:8d ge-0/0/10.0: flags=0xc000 <UP|MULTICAST> inet primary mtu 1500 local=10.0.0.10 dest=10.0.0.0/24 bcast=10.0.0.255 root@DHCP-CLIENT:RE:0% exit {master:0} root@DHCP-CLIENT> show interfaces terse ge-0/0/10 Interface Admin Link Proto Local Remote ge-0/0/10 up up ge-0/0/10.0 up up inet 10.0.0.10/24
show dhcp relay statistics