cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
619
Views
0
Helpful
2
Replies
Highlighted
Beginner

Change DHCP with command thru web request

I'm trying to write an DMP initializer to get our DMP's set up correctly thru a windows forms program. The DMP's are 4400G using version 5.2.1.

I'm sending a number of commands, and they all work except for disabling DHCP and setting the IP-address.

The commands I'm sending are:

set_param?init.GWY=10.101.0.1&init.DNS=10.101.0.1&init.IP=10.101.0.87&init.DHCP=off&mib.save=1&mng.reboot=1

The gateway and DNS are set, but the DHCP is still there. I tried to disable DHCP thru the web interface and it work. I then sent just the new IP-address, but nothing changed.

I have reset to factory settings and rerun it all. I've run single commands with mib.save and chunks in different orders. Nothing changes.

As I can't find any documentation for the MIB of 5.2.1, I ask for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

Bjoern,

  You are absolutely correct. The DHCP cannot be turned off using the MIBS. In 5.2 code the network configuration is stored using a config file in the DMP rather than the MIBS (like it was in 5.1). It took me two hours to figure it out but here is the solution :

Please use teh hidden command : https://161.44.77.100:7777/get_param?p=network.* to determine the network configuration

This was my configuration before (output is taken from the net.conf file in the DMP) : DHCP was enabled and IP address assigned was 161.44.77.100


[eth0]
dhcp=1
isUp=1
domain=cisco.com
ip=161.44.77.100
mask=255.255.255.0
gwy=161.44.77.1
dns=161.44.124.122 64.102.6.247 171.68.226.120

https://161.44.77.100:7777/set_param?network.eth0.dhcp=0&network.eth0.ip=161.44.77.101&network.eth0.dns=161.44.124.123&network.eth0.mask=255.255.255.0&network.eth0.gwy=161.44.77.1&network.eth0.domain=test.me.com&mng.command=network.saveConfiguration&...


[eth0]
dhcp=0
isUp=1
domain=test.me.com
ip=161.44.77.101
mask=255.255.255.0
gwy=161.44.77.1
dns=161.44.124.123

For your specific case the command should look like this :

set_param?network.eth0.gwy=10.101.0.1&network.eth0.dns=10.101.0.1&network.eth0.ip=10.101.0.87&network.eth0.dhcp=0&mng.command=network.saveConfiguration&mib.save=1&mng.reboot=1

Let me know if you have any questions. Hope this helps. If your concern is addressed please mark this post as "Answered"

Regards,

Sagar Dhanrale

View solution in original post

2 REPLIES 2
Highlighted
Beginner

Bjoern,

  You are absolutely correct. The DHCP cannot be turned off using the MIBS. In 5.2 code the network configuration is stored using a config file in the DMP rather than the MIBS (like it was in 5.1). It took me two hours to figure it out but here is the solution :

Please use teh hidden command : https://161.44.77.100:7777/get_param?p=network.* to determine the network configuration

This was my configuration before (output is taken from the net.conf file in the DMP) : DHCP was enabled and IP address assigned was 161.44.77.100


[eth0]
dhcp=1
isUp=1
domain=cisco.com
ip=161.44.77.100
mask=255.255.255.0
gwy=161.44.77.1
dns=161.44.124.122 64.102.6.247 171.68.226.120

https://161.44.77.100:7777/set_param?network.eth0.dhcp=0&network.eth0.ip=161.44.77.101&network.eth0.dns=161.44.124.123&network.eth0.mask=255.255.255.0&network.eth0.gwy=161.44.77.1&network.eth0.domain=test.me.com&mng.command=network.saveConfiguration&...


[eth0]
dhcp=0
isUp=1
domain=test.me.com
ip=161.44.77.101
mask=255.255.255.0
gwy=161.44.77.1
dns=161.44.124.123

For your specific case the command should look like this :

set_param?network.eth0.gwy=10.101.0.1&network.eth0.dns=10.101.0.1&network.eth0.ip=10.101.0.87&network.eth0.dhcp=0&mng.command=network.saveConfiguration&mib.save=1&mng.reboot=1

Let me know if you have any questions. Hope this helps. If your concern is addressed please mark this post as "Answered"

Regards,

Sagar Dhanrale

View solution in original post

Highlighted

Thanx lots!

It fixed all problems!!

I love it when they hide commands for developers. We're not trustworthy enough.

Content for Community-Ad