0% found this document useful (0 votes)
16 views4 pages

DHCP Relay Setup for VLANs

Uploaded by

727722eucs139
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

DHCP Relay Setup for VLANs

Uploaded by

727722eucs139
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EX.

NO:05(A)
Date:

DHCP Relay Configuration | IP Helper Address


Aim:
To configure DHCP relay (IP Helper Address) on a router so that hosts in different
VLANs/subnets can obtain IP addresses dynamically from a centralized DHCP server.
Theory:
 DHCP uses broadcast messages to discover a DHCP server
(Discover/Offer/Request/Ack).
 Broadcasts do not cross routers, so hosts in different VLANs cannot reach a
central DHCP server directly.
 To solve this, we configure the router interface with IP helper-address <DHCP-
server-IP>.
 The router will relay DHCP broadcast requests from clients to the DHCP server
as unicast messages.
 The DHCP server then responds, and the router forwards the reply back to the
clients.
Required Equipment:
1. Cisco Router (2811)
2. Cisco Switch (2960)
3. DHCP Server (Packet Tracer Server)
4. End Devices – PCs / IP Phones
5. Copper Straight-through cables
6. Cisco Packet Tracer software
Procedure:
Step 1: Build the Topology
 Connect Router ↔ Switch ↔ PCs/Phones.
 Connect Server to the switch (this will act as DHCP server).
 Assign PCs/Phones to VLANs (optional, if using VLAN-based DHCP).
Step 2: Configure the DHCP Server
On Server1:
1. Go to Desktop → IP Configuration
o IP: [Link]
o Subnet: [Link]
o Gateway: [Link]
2. Go to Services → DHCP
o Enable DHCP
o Pool Name: VLAN10
o Default Gateway: [Link]
o Start IP: [Link]
o Subnet Mask: [Link]
o DNS Server: (optional)
Step 3: Configure Router Interfaces
Example for two VLANs:
Router> enable
Router# configure terminal
!
! Configure VLAN 10 sub-interface
Router(config)# interface g0/0.10
Router(config-subif)# encapsulation dot1Q 10
Router(config-subif)# ip address [Link] [Link]
Router(config-subif)# ip helper-address [Link]
!
! Configure VLAN 20 sub-interface
Router(config)# interface g0/0.20
Router(config-subif)# encapsulation dot1Q 20
Router(config-subif)# ip address [Link] [Link]
Router(config-subif)# ip helper-address [Link]
!
Router(config)# exit
Router(config)# interface g0/0
Router(config-if)# no shutdown
 ip helper-address [Link] → tells the router to forward DHCP requests to
the DHCP server.
Step 4: Configure Switch Ports
Switch> enable
Switch# configure terminal
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
!
Switch(config)# interface fa0/2
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 20
Step 5: Configure Clients (PCs / IP Phones)
 On PC0 / PC1 / IP Phone:
o Go to Desktop → IP Configuration
o Select DHCP
o The device should automatically receive IP, Subnet, Gateway from the
DHCP server.
Testing:
1. On PC0 (VLAN 10), check ipconfig → should get an IP from [Link]+
range.
2. On PC1 (VLAN 20), check → should get an IP from [Link]+.
3. Ping the router gateway and server → should succeed.
4. Cross-VLAN communication works if Router-on-a-Stick is enabled.
Model Output:
DHCP Relay Configuration | IP Helper Address

Result:
DHCP relay was successfully configured using IP Helper Address, enabling clients
in different VLANs/subnets to obtain IP addresses dynamically from a centralized
DHCP server.

You might also like