Here's the deal. A customer wanted the phones to use a certain set of IP addresses on a Class B network. Obviously, you can not use Vendor Class as a DHCP reservation option. So, there are only 2 other options (considering that computers are plugged into the phones).
Option 1: Manually assign the phones, one phone at a time (NO THANK YOU!)
Option 2: Work on a script to create manual reservations within the DHCP scope.
A few things to consider. We addressed the phones within the 'DHCP' scope, but outside of the address pool, so items accidently getting a reserved IP will not be a problem.
The first part of the script, creates a Manual reservation, while the second part of the script sets the gateway to a different address for the IP's within the reservations...(the phones pointed to a dedicated T1 Point-to-point, while the computers pointed to a Cable 2 meg pipe). This "reservedoptionvalue" could be used to add option 156 to phones only as well.
sample of MacList.txt
Sample of Gatewayip.txt
to speed things up, you could use a BarCode scanner to scan the MAC addresses into a text file.
Of course, I hate it when nobody breaks down code, so I will share the sources too.
Batch File Commands:
http://labmice.techtarget.com/articles/batchcmds.htm
The DHCP Commands:
http://technet2.microsoft.com/Window....mspx?mfr=true
Let me know if this helps!!!
Charles
Option 1: Manually assign the phones, one phone at a time (NO THANK YOU!)
Option 2: Work on a script to create manual reservations within the DHCP scope.
A few things to consider. We addressed the phones within the 'DHCP' scope, but outside of the address pool, so items accidently getting a reserved IP will not be a problem.
The first part of the script, creates a Manual reservation, while the second part of the script sets the gateway to a different address for the IP's within the reservations...(the phones pointed to a dedicated T1 Point-to-point, while the computers pointed to a Cable 2 meg pipe). This "reservedoptionvalue" could be used to add option 156 to phones only as well.
for /f "tokens=1-4 delims=;" %%a in (c:\MacList.txt) do (netsh dhcp server 192.168.1.100 scope 192.168.1.0 add reservedip %%a %%b %%c %%d dhcp)
for /f %%a in (c:\Gatewayip.txt) do (netsh dhcp server 192.168.1.100 scope 192.168.1.0 set reservedoptionvalue %%a 003 IPADDRESS 192.168.1.254)
for /f %%a in (c:\Gatewayip.txt) do (netsh dhcp server 192.168.1.100 scope 192.168.1.0 set reservedoptionvalue %%a 003 IPADDRESS 192.168.1.254)
192.168.1.101;00104903c930;Shoretel;ShoreGearT1
192.168.1.102;00104903c666;Shoretel;ShoreGear60
192.168.1.103;00104903c692;Shoretel;ShoreGear60
192.168.1.104;00104903c074;Shoretel;ShoreGear120
192.168.1.105;0010490491c4;Shoretel;ShoreGear120
192.168.1.106;001049042a79;Shoretel;ShoreTel560G
192.168.1.107;001049042a7a;Shoretel;ShoreTel560G
192.168.1.108;001049042a7b;Shoretel;ShoreTel560G
192.168.1.109;001049042a7c;Shoretel;ShoreTel560G
192.168.1.102;00104903c666;Shoretel;ShoreGear60
192.168.1.103;00104903c692;Shoretel;ShoreGear60
192.168.1.104;00104903c074;Shoretel;ShoreGear120
192.168.1.105;0010490491c4;Shoretel;ShoreGear120
192.168.1.106;001049042a79;Shoretel;ShoreTel560G
192.168.1.107;001049042a7a;Shoretel;ShoreTel560G
192.168.1.108;001049042a7b;Shoretel;ShoreTel560G
192.168.1.109;001049042a7c;Shoretel;ShoreTel560G
192.168.1.101
192.168.1.102
192.168.1.103
192.168.1.104
192.168.1.105
192.168.1.106
192.168.1.107
192.168.1.108
192.168.1.109
192.168.1.102
192.168.1.103
192.168.1.104
192.168.1.105
192.168.1.106
192.168.1.107
192.168.1.108
192.168.1.109
Of course, I hate it when nobody breaks down code, so I will share the sources too.
Batch File Commands:
http://labmice.techtarget.com/articles/batchcmds.htm
The DHCP Commands:
http://technet2.microsoft.com/Window....mspx?mfr=true
Let me know if this helps!!!
Charles
Comment