DHCP Reservation multiple server

werterda

Commendable
Feb 15, 2016
2
0
1,510
Hello everyone. I am doing dhcp reservation application test with 2 server 2008 r2. Program will use web application for company. Code written c# language. There is 2 dhcp 2 different network. Problem is netsh scripts organized with batch file and it is located on working server. When I try to run that batch file with code, its just affect current server. Other server's reservation are not change. The funny part is that, when I run batch file manually, its working. I also tried copy batch file other server and run with code. It's not work again. How can I do reservations for multiple server with code. thank you in advance for your interest.
 
Solution
Just to clarify, you are running the batch file on the first server and then having the same batch file executed by the second server? Or are you putting a copy of the batch file on both servers and each server executes the batch file on its own.

This snippet: "reservedip 192.168.128.2 c81f66487602" is reserving IP 192.168.128.2 for a device with MAC c81f66487602 - correct?

So both servers are reserving the same device for access/use. The first server makes the reservation, the second server sees that reservation and does nothing....

What if you run the code on the second server first. Does the second server make the reservation from a clean start?

Double check the access rights on the second server. Compare to the first...

werterda

Commendable
Feb 15, 2016
2
0
1,510


there is just 2 line on batch file like
netsh dhcp server \\dhcpdevarge.kare.com.tr Scope 192.168.128.0 Add reservedip 192.168.128.2 c81f66487602 "mesut.kutlu.kare.com.tr" "deneme"
and other one. So there is 2 Expected response , which are the reservations. One of them cant work. No error message on code side. I can reach other dhcp server files with admin privileges. Is there any specific access right for reservation command to other server?
 

Ralston18

Titan
Moderator
Just to clarify, you are running the batch file on the first server and then having the same batch file executed by the second server? Or are you putting a copy of the batch file on both servers and each server executes the batch file on its own.

This snippet: "reservedip 192.168.128.2 c81f66487602" is reserving IP 192.168.128.2 for a device with MAC c81f66487602 - correct?

So both servers are reserving the same device for access/use. The first server makes the reservation, the second server sees that reservation and does nothing....

What if you run the code on the second server first. Does the second server make the reservation from a clean start?

Double check the access rights on the second server. Compare to the first server's settings.

You have admin rights to both servers. And your batch file is being permitted to run on the first server.

Anything in place that would block the batch file from running on the second server?

The objective to narrow things down to code/logic, access priviledges, or perhaps some network conflict.

Add some "echo" or "verbose" type lines to help follow the code as it is executed. Really would expect to see some error or other feedback.
 
Solution