[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

10/19/2009 at 02:59PM PDT, ID: 24825250
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.3

Novell DHCP DB migration to Windows DHCP

Asked by nitin0 in Novell Netware Network Software, Perl Programming Language

Tags: netware. dhcp, windows dhcp, migration dhcp, novell

Hello

We are currently in the process of migrating Novell DHCP to Windows DHCP. I cant find any tool which will easily migrate the Novell Database (which can be exported) to the Windows DHCP Server.

The only way i can find is to create some sort of scripts which formats the novell database to netsh windows command line. I cant find any tool for this and i am not good at perl scripting. I found this script on a blog and it does not work for me either. It gives me the following errors:

ERROR #1 with the Script:
c:\>dhcpscript.pl
Can't modify constant item in scalar assignment at C:\dhcpscript.pl line 1, ne
"use" not allowed in expression at C:\dhcpscript.pl line 11, at end of line
syntax error at C:\dhcpscript.pl line 11, near "use strict"
BEGIN not safe after errors--compilation aborted at C:\dhcpscript.pl line 12.


ERROR#2
After removing the [code='perl'] from the first line (i dont know just tried it, i get the following error]:

c:\>dhcpscript.pl
syntax error at C:\dhcpscript.pl line 28, near "= )"
Global symbol "$line" requires explicit package name at C:\dhcpscript.pl line 29.
syntax error at C:\dhcpscript.pl line 33, near "= ) "
Global symbol "$entry" requires explicit package name at C:\dhcpscript.pl line 35.
Global symbol "$entry" requires explicit package name at C:\dhcpscript.pl line 38.
Global symbol "$entry" requires explicit package name at C:\dhcpscript.pl line 41.
Global symbol "$entry" requires explicit package name at C:\dhcpscript.pl line 44.
syntax error at C:\dhcpscript.pl line 47, near "}"
Global symbol "$entry" requires explicit package name at C:\dhcpscript.pl line 48.
syntax error at C:\dhcpscript.pl line 59, near "}"
C:\dhcpscript.pl has too many errors.

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
[code='perl']
#!C:\Perl\bin\perl.exe
 
# Designed to read in Rservations from a Novell DHCP Tab file and output a NetSH script file
# From http://technet.microsoft.com/en-us/library/cc787375.aspx
# On the destination server, the exec command is used to load and execute the converted reservations:
# netsh exec AdReservations.txt
# After you use the exec command to load the file, you must reconcile all scopes.
# Use net stop dhcpserver to stop the DHCP Server service and net start dhcpserver to restart it. Once the service is restarted, DHCP database changes take effect.
 
use strict; 
use warnings;
 
my $dhcptabName = "DHCP3TAB.txt";
my $outFile = "AdReservations.txt";
my @dhcpServers = ('\\\\kalimdor');
my $scopeName = "172.21.0.0";
 
open F, "< $dhcptabName" or die "Can't open $dhcptabName : $!";
open O, "> $outFile" or die "Can't open $outFile : $!";
 
# File parsing
my $ip;
my $host;
my $mac;
my $type;
my $comment="";
 
while (my $line = ){
if ($line =~ /^\[IP Address Configuration /i) {
# New entry, clear values
$ip="", $host="", $mac="", $type="", $comment="";
 
while ((my $entry = ) !~ /^$/){
# Parse and fill in values
if ($entry =~ /IP Address Number = ([\d.]+)/i){
$ip=$1;
}
elsif ($entry =~ /Assignment Type = (\d+)/i){
$type=$1;
}
elsif ($entry =~ /Host Name = ([\w\-_]+)/i){
$host=$1;
}
elsif ($entry =~ /MAC Address = 1 (.+)/i){
$mac=$1;
$mac=~ s/\s+//g;
}
elsif ($entry =~ /Comment = (.+)/i){
$comment=$1;
}
}
 
# If type != 8 (reservation) discard
next unless ($type == 8);
next if ($mac eq "" or $ip eq "" or $host eq "");
foreach my $server (@dhcpServers){
print O "Dhcp Server $server Scope $scopeName Add reservedip $ip $mac \"$host\" \"$comment\" \"BOTH\"\n";
}
}
}
close O;
close F;
[/code]
[+][-]10/19/09 03:07 PM, ID: 25609450

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Novell Netware Network Software, Perl Programming Language
Tags: netware. dhcp, windows dhcp, migration dhcp, novell
Sign Up Now!
Solution Provided By: oocyte
Participating Experts: 2
Solution Grade: A
 
 
[+][-]10/19/09 03:28 PM, ID: 25609558

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/19/09 03:33 PM, ID: 25609582

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/21/09 04:49 PM, ID: 25629633

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_3_20080625