Question

Novell DHCP DB migration to Windows DHCP

Asked by: nitin0

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.

[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]

                                  
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:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-10-19 at 14:59:36ID24825250
Tags

netware. dhcp

,

windows dhcp

,

migration dhcp

,

novell

Topics

Novell Netware Network Software

,

Perl Programming Language

Participating Experts
3
Points
500
Comments
5

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Perl and Novell web server
    I need create a perl script to send the result of a http based guest book to an e-mail, but i use Novell Web Server, and don´t have the unix sendmail program (sorry my english)
  2. Linux and Novell
    I have a laptop that I use on the Novell network at my office and my Linux / Samba network at home. At work we logon into a "tree". I want to setup my laptop so when I'm at work I can access the network and when I'm at home I can access that network? I have tried s...
  3. Novell
    Anyone know a good tutorial for authenticating against Novell via ASP/COM objects?
  4. Novell 4.11 and DHCP
    I would like to setup DHCP on my Novell 4.11 server at the school. However some tech told me that DHCP doesn't work well with Novell 4.11. Can some one please clarifiy me on that, and walk me through the install and setup of DHCP on it?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: oocytePosted on 2009-10-19 at 15:07:54ID: 25609450

Can you post DHCP3TAB.txt's content?

I believe the script is missing <F> at the following places, but I can't be sure unless I see what's in that file.

while (my $line = <F> )

while ((my $entry = <F> )  !~ /^$/)

 

by: nitin0Posted on 2009-10-19 at 15:28:21ID: 25609558

I cant paste the whole thing as its big, plus i dont want internal IP's on the web, so here is a snippet..

; DHCP3TAB - Please DO NOT delete this signature line. 
[Version]
	Number = 1 
[Globals]
	Config Options = 00 00 00 00 06 08 AC 15 01 02 AC 15 01 07
	Subnet Attributes = \
		"172.21.0.0(Local)" 
[Subnet : "172.21.0.0(Local)"]
	Subnet Address = 172.21.0.0
	Subnet Mask = 255.255.252.0
	Lease Time = 36000
	Config Options = 00 00 00 00 03 04 AC 15 00 01 06 08 AC 15 00 0A AC 15 \
		00 0B 2C 04 AC 15 01 D9 4E 05 01 AC 15 01 08 55 04 AC 15 00 33 8\
		0 04 0A 01 1E 02 81 04 0A 01 1E 02 82 0E 4D 49 54 45 4C 20 49 50 \
		20 50 48 4F 4E 45 84 04 00 00 00 1E 85 04 00 00 00 06
	Zone Reference = Tree
	Domain Name = web.com
	Subnet Type = 1
	Comment = DNS 
[Subnet Address Range : "Subnet Server.Local.Manager"]
	Start Address = 172.21.0.0
	End Address = 172.21.0.0
	DHCP Server Reference = "DHCP.WRT"
	Range Type = 99 
[Subnet Address Range : "Test.Local.DHCP.WRT"]
	Start Address = 172.21.0.1
	End Address = 172.21.0.254
	Range Type = 255
	Comment = Testing Subnet Only 
[Subnet Address Range : "DHCP1.Local.DHCP.WRT"]
	Start Address = 172.21.2.1
	End Address = 172.21.2.255
	DHCP Server Reference = "DHCP_.Manager.WRT"
	Range Type = 2
	DNS Update Option = 2
	Comment = DHCP Address () 
[Subnet Address Range : "DHCP2.Local.Manager.WRT"]
	Start Address = 172.21.3.0
	End Address = 172.21.3.254
	DHCP Server Reference = "DHCP_.Manager.WRT"
	Range Type = 2
	DNS Update Option = 2
	Comment = DHCP Address (Faxware) 
[Subnet Address Range : "Static Address.Local.Manager.WRT"]
	Start Address = 172.21.1.1
	End Address = 172.21.1.254
	Range Type = 255
	Comment = I.S. Dept Static IP Address. 
[IP Address Configuration : "172_21_0_0.Local.Manager.WRT"]
	IP Address Number = 172.21.0.0
	Assignment Type = 128 
[IP Address Configuration : "172_21_0_1.Local.Manager.WRT"]
	IP Address Number = 172.21.0.1
	Assignment Type = 128
	Comment = Main R 
[IP Address Configuration : "172_21_0_10. Local.Manager.WRT"]
	IP Address Number = 172.21.0.10
	Assignment Type = 128
	Comment = Domain Controller

                                              
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:
65:
66:
67:
68:
69:
70:

Select allOpen in new window

 

by: nitin0Posted on 2009-10-19 at 15:33:10ID: 25609582

wow lol looks like it was just missing <F>

it seemed to have worked, i am gonna confirm shortly.

 

by: David_BothamPosted on 2009-10-21 at 16:49:10ID: 25629633

Is your solution confirmed?

 

by: wsmothPosted on 2010-01-27 at 09:58:10ID: 26420034

Guys - GREAT string!

Question though - The PERL script looks like it can only do one DHCP scope at a time, is that correct?

I have about 100 scopes that I need to create and the Novell utility just dumps out all the scopes & their reservations to a single file.

Is there a way this script can be modified to import multiple scopes at one time?

Thanks!

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...