Page 1 of 1 1
Topic Options
#6075 - 2001-01-05 01:44 AM Mapping based on IP address
Anonymous
Unregistered


Hi Ya, great board - heaps of great ideas that have made my life a lot easier.

ThanX

My Question:

We are looking at migrating from Netware to NT in the very near (2-3 months) future. We have got lots of remote sites (that will have BDC's) and I am looking at two different ways of mapping network drives. The normal way would be:

IF INGROUP ("GLBUSER")
USE G: "\\GLBBDC01\GROUPS"
ENDIF

IF INGROUP ("MTMUSER")
USE G: "\\MTMBDC01\GROUPS"
ENDIF

but this would mean that if a user roamed to another site they would map their "group" drive back to their "home subnet/bdc". I would like to have the option for them to actually map to the closest BDC/File server no matter where they are just in case our network can't handle the extra traffic. (the file servers have the same apps on them).
The only way I can think of doing this is via IP address (all the sites are subnetted) and was wondering if this is possible. I though of something like:

site (a) IP = 159.69.100.1 - 254
site (b) IP = 159.69.101.1 - 254

so the script would be:

IF substr(@ipaddress)="159.69.100" ; GLB
USE G: "\\GLBBDC01\GROUPS"
ENDIF

IF substr(@ipaddress)="159.69.101" ; MTM
USE G: "\\MTMBDC01\GROUPS"
ENDIF

Could someone let me know if I am on the right track or not. Unfortunately I can't test it as yet because we are still running NW 4.11 and so don't have any BDC's out there yet. Basically I need to get it into my project plan for approval on either one or the other.

Many ThanX in Advance
dephier

Top
#6076 - 2001-01-05 03:29 AM Re: Mapping based on IP address
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Dephier,

Yea you are on the right track! I think that you are traveling a very well worn path

Bryce

Top
#6077 - 2001-01-05 09:36 AM Re: Mapping based on IP address
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
I have said this many times the last couple of days

Take a look at this thread:
http://kixtart.org/board/Forum2/HTML/001059.html

------------------
Greetz,

Roger the Young
------------------------
The code is out there...
------------------------

_________________________
The Code is out there

Top
#6078 - 2001-01-06 12:34 AM Re: Mapping based on IP address
Anonymous
Unregistered


the script looks good but wayyy complicated =]
mind doing some comments on it so some of u know whats it doing really ?

Top
#6079 - 2001-01-06 12:42 AM Re: Mapping based on IP address
BoxKite Offline
Da Box
*****

Registered: 2000-05-17
Posts: 282
Loc: Vacaville,CA,USA
You can cut down on the amount of code by using SELECT/ENDSELECT instead of IF/ENDIF.

------------------
Box
FACTA NON VERBA

_________________________
Box
FACTA NON VERBA

Top
#6080 - 2001-01-06 05:41 AM Re: Mapping based on IP address
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Ok, thanx for the advise,

I'll post the new and improved version and a detailed explanation on monday. (about 10:00 GMT)

------------------
Greetz,

Roger the Young
------------------------
The code is out there...
------------------------

_________________________
The Code is out there

Top
#6081 - 2001-01-08 09:50 AM Re: Mapping based on IP address
DrillSergeant Offline
MM club member
*****

Registered: 2004-07-09
Posts: 1164
Loc: Eijsden, the Netherlands
Ok, I've posted the new script here.
It is filled with 2 Kb of code and about 5Kb of explanation.
http://home.wanadoo.nl/r.s.m.s.dejong/Kixscripts.htm

If you want more info about the IP-calculation, you should take a look at http://home.wanadoo.nl/r.s.m.s.dejong/Scripts/mgroups.doc

------------------
Greetz,

Roger the Young
------------------------
The code is out there...
------------------------

_________________________
The Code is out there

Top
#6082 - 2001-01-10 01:16 AM Re: Mapping based on IP address
Anonymous
Unregistered


Question: where on your script would i define the ips ? like group a=127.0.0.1
group b=0.0.0
also i dont see the script do anymappings like will it do something like
if group a go to whatever
:whatever
use d: \\whatever ..
?
lots of questions ^_^

Top
#6083 - 2001-01-12 02:50 AM Re: Mapping based on IP address
Anonymous
Unregistered


Thanks everyone for your input. Sorry I didn't see any of your other posts DrillSergeant regarding IP but what I have looked at now (from your site) makes a lot more sense.

In answer to your question ARodriguez, I didn't predefine the IP address range anywhere. Just the line's as per the first post.

Anyway thanks everyone again, it's nice to see ppl helping us newbies (or not so newbies) out.

dephier

Top
#6084 - 2001-01-12 02:38 PM Re: Mapping based on IP address
Anonymous
Unregistered


Also check out this thread: http://kixtart.org/board/Forum1/HTML/001508.html

------------------
Jesse
------------------
For more scripting help and examples, click here.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 581 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.059 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org