What's new

Understanding udhcpc: I'm missing something??

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Theliel

Regular Contributor
Hardware: RT-AC656U
Firmware: Asus Merlin 378.55

Hi all.

I've been playing around with routes, interfaces and DHCP on my router, but I can't get DHCP working correctly.

I'd created a VLAN associated and tagged with WAN and CPU port through robocfg and got up with vconfig and ifconfig:

Code:
robocfg vlan 8 ports "4t 5t"
vconfig add eth0 8
ifconfig vlan8 up

All working fine.

Now, I want assing a DHCP addr to my new interface (no problem on server side), so I attempt with a simple udhcpc:
Code:
udhcpc -i vlan8
udhcpc (v1.20.2) started
Sending discover...
Sending select for 10.5.21.187...
Lease of 10.5.21.187 obtained, lease time 43200

Lease is received correctly, but is not assigned to my iface after all, my iface is not configured with the lease. I can make my iface working fine setting it manually (addr/mask with ifconfig) but i don't accomplishment this with udhcpc.

I'm missing something??
thank in advanced
 
I have the same issuie in 2020. Did you fix your issue?
 
I know this is old post, but found while searching for something else. My understanding is that udhcpc is, by itself only going to handle the communication with the DHCP server. By itself it does not actually configure the interfaces with the info that is returned.
For that, you need to use -s argument to call a script which you will pass the received information into.

You can read here:


One example shown in a certain configuration on my box was:
/sbin/udhcpc -i eth0 -p /var/run/udhcpc0.pid -s /tmp/udhcpc -O33 -O249

I can't give you a lot of implementation detail, but this is where to start.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top