cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
651
Views
2
Helpful
4
Replies

Configuring DHCP client on Cisco CML

timothyc95
Level 1
Level 1

Hi,

I am having issues configuring the Linux client on the CML that uses the Alpine Linux distribution. Can anyone help me with configuring a DHCP client on this Linux distribution? I googled it and tried using the sudo dhclient <interface_name> command in the terminal to request a DHCP lease for a specified interface on the client machine in CML and it doesn't work. Thanks. I really appreciate your response. 

4 Replies 4

Jens Albrecht
Spotlight
Spotlight

Hello @timothyc95,

the easiest way is to modify the shell script that is sourced at boot.
This can be done as follows:

Click on the alpine node and select 'Config'.
Add the following line to the 'node.cfg' file and then click 'Save':

# get IP address on eth0 via DHCP
udhcpc -i eth0 -q

JensAlbrecht_0-1756328459180.png

Then turn on the alpine node and it will get an IP address on eth0 via DHCP provided there is a DHCP server for this network.

Note: If the node is running already, you need to stop it and wipe the config before you can modify the shell script.

HTH!

Hi Jens!

Thanks for this information! I really appreciate it but I am coming across an issue. Once I booted up the Alpine machine after editing the Node.cfg file with the DHCP configuration, I think it went through the process of requesting for an IP address through DHCP. But once I got to the login prompt, my login information no longer worked. Can you help resolve this?

Jens Albrecht
Spotlight
Spotlight

Hi @timothyc95,

do you mean the console login? The default is cisco/cisco as shown in my previous post, unless you changed this.
As usual be careful not to add a space at the end of the password when editing the node.cfg file.
I also noticed that you might not get a login prompt if the node fails to get an IP address.

I used a simple setup for testing:

28-08-2025_18-19-32.png

Only Rtr01, Sw01 and the alpine node are used for this test. DHCP is configured on Rtr01.
Rtr01 and Sw01 are started first to make sure that they are up and running so that the alpine node can get an ip address.

On Rtr01 debugging for DHCP is enabled when the alpine node is started:

28-08-2025_18-09-31.png

Once the alpine node got an IP address, the console login appears shortly thereafter.
Login with the default credentials cisco/cisco:

28-08-2025_18-07-37.png

On the alpine node you can verify the IP address received on eth0.

This IP address can now be used to SSH into the node from Sw01 using the same credentials of cisco/cisco:

28-08-2025_18-14-47.png

Hence everything is working just fine as expected.

So double-check the username/password settings in the node.cfg file and make sure that DHCP is working correctly.

HTH!

 

timothyc95
Level 1
Level 1

Hi Jens

I followed your instructions. I also made sure to not add a space at the end of the password when editing the node.cfg file but nothing seems to be working. What should I do?