cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1382
Views
0
Helpful
2
Replies

How can I make a host in a VLAN receive an IPv4 from a DHCP router?

Mitrixsen
Level 1
Level 1

Hello, everyone!
I've been learning and trying to configure a router to act as DHCP and provide IPv4 addressing to host devices in Packet Tracer. Here is the topology.

 

obrázok.png
The configuration

Router(config)#ip dhcp pool PRACTISE
Router(dhcp-config)#network 192.168.10.0 255.255.255.0
Router(dhcp-config)#default-router 192.168.10.1
Router(dhcp-config)#exit
Router(config)#int Gig0/0/0
Router(config-if)#ip add 192.168.10.1 255.255.255.0
Router(config-if)#no shutdown

 

Everything went well and the PC obtained its IP addressing.

obrázok.png

 

However, after creating and putting the PC in a VLAN, the PC can no longer obtain its IP addressing information. I've tried setting up a relay agent using "ip helper-address", but it did not work.

 

VLAN Configuration

Switch(config)#vlan 10
Switch(config-vlan)#name Vlan10-TEST
Switch(config-vlan)#int Fa0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10

Switch(config-if)#exit

Switch(config)#int Fa0/1

Switch(config-if)#switchport mode trunk

 

Switch(config-if)#exit
Switch(config)#Int vlan 10
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

Switch(config-if)#ip helper-address 192.168.10.20
Switch(config-if)# exit

obrázok.png

 

Do you have any suggestions on how to resolve this issue? I assume that I am doing something wrong with the relay agent, so any tips will be appreciated! Thank you very much in advance, it's my first time creating a topic here, so I hope that I am doing it right.

1 Accepted Solution

Accepted Solutions

Hi

   ip helper-address 192.168.10.20 must be the IP address of your DHCP server.  In your scenario should be 192.168.10.1.

Also, you need to create an L3 vlan.

 int vlan 10

 ip add x.x.x.x   x.x.x.x

 

Also, if your router and switch are directly connected, you need a trunk between then. 

View solution in original post

2 Replies 2

Hi

   ip helper-address 192.168.10.20 must be the IP address of your DHCP server.  In your scenario should be 192.168.10.1.

Also, you need to create an L3 vlan.

 int vlan 10

 ip add x.x.x.x   x.x.x.x

 

Also, if your router and switch are directly connected, you need a trunk between then. 

Hello,

 

are you doing this in Packet Tracer, using the devices in the picture ?