cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2035
Views
0
Helpful
4
Replies

DHCP server and router-on-a-stick are diff devices for dhcp client

chch6597
Level 1
Level 1

Hello all,

 

I have been struggling with a problem I kind of create myself, or my knowledge is still not good enough, hopefully some professionals can help me. Look at my picture:

Screenshot 2019-05-18 15.10.08.png

My PC wants to get IP address from DHCP server, but they are in different vlan so I put a router on a stick with sub-interfaces .10 with 192.168.10.254 and .20 with 192.168.20.254, but my PC doesn't get IP address. I also configured default route on PC and DHCP server that points to the Router. I did some research and people suggest to do ip helper-address on Router or Switch, but I tried both, it's still not working. I can see my DHCP server can get DHCP discover but that's it. Am I missing anything? or this is impossible?

 

Thank you for your answers

 

1 Accepted Solution

Accepted Solutions

I kind of figure it out. Instead of the command, 'network 192.168.20.0 255.255.255.0', I put 'network 192.168.10.0 255.255.255.0', I'm not really sure why, but my best guess is the sub-interface of Router is 192.168.10.254 so it will give out the same subnet from the vlan 10

View solution in original post

4 Replies 4

luis_cordova
VIP Alumni
VIP Alumni

Hi @chch6597 ,

 

Your configurations should be something like this:

 

Switch L3:

g0/0

switchport mode access

switchport access valn 10

g0/2

switchport mode access

switchport access valn 20

g0/1

switchport trunk encapsulation dot1q

switchport mode trunk

 

Router

f0/0

no ip address 

f0/0.10

ip address 192.168.10.254

ip helper-address <ip dhcp server>

f0/0.20

ip address 192.168.20.254

 

Regards

 

@luis_cordova 

Thank you for your reply! That's what I have right now but my DHCP server can only get DHCP DISCOVER message. That's it. I wonder if I missed anything else

can you ping PC<---->DHCP ?

 

I kind of figure it out. Instead of the command, 'network 192.168.20.0 255.255.255.0', I put 'network 192.168.10.0 255.255.255.0', I'm not really sure why, but my best guess is the sub-interface of Router is 192.168.10.254 so it will give out the same subnet from the vlan 10
Review Cisco Networking for a $25 gift card