Solved

overriding dhcp assigned gateway in windows 98

Posted on 2003-11-04
11
419 Views
Last Modified: 2010-03-19
I have a mixed network of windows 2000 and 98 machines. They are setup for dhcp. I dont have DHCP setup to assign the gateway. I would like to limit access to the gateway per machine by just manually intering in the gateway IP address. This works just fine with windows 2000, I can override the gatway IP address that DHCP is assigning, which in reality is none.

The problem is with the windows 98 machines, I cant override the gateway if DHCP is enabled. What can I do to get this to work?

Can the ROUTE command help me with anything,
Or maybe the hosts file?

Thanks,
AD
0
Comment
Question by:illtbagu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 5

Assisted Solution

by:vtobusman
vtobusman earned 100 total points
ID: 9682498
the route command will work
and you can create a batch file in the startup...


use this

 route -f 0.0.0.0 0.0.0.0 <Gateway>
this will remove your default gateway and if you need to add it back in the command is

 route add 0.0.0.0 0.0.0.0 <Gateway>
simple....

now just create a batch file and place it in the startup group
  good luck
0
 
LVL 1

Author Comment

by:illtbagu
ID: 9683282
ok i have tried to get this to work with no luck. our gateway is 192.168.36.4 our subnet is 255.255.255.0

could you show me exactly what it should be. from what you have said all i need to do is
ROUTE 192.168.36.0 255.255.255.0 192.168.36.4


right now if i type in ROUTE PRINT on a windows 98 machine i get


Microsoft(R) Windows 98
   (C)Copyright Microsoft Corp 1981-1999.

C:\WINDOWS\Desktop>ROUTE PRINT

Active Routes:

  Network Address          Netmask  Gateway Address        Interface  Metric
        127.0.0.0        255.0.0.0        127.0.0.1        127.0.0.1       1
     192.168.36.0    255.255.255.0    192.168.36.60    192.168.36.60       1
    192.168.36.60  255.255.255.255        127.0.0.1        127.0.0.1       1
   192.168.36.255  255.255.255.255    192.168.36.60    192.168.36.60       1
        224.0.0.0        224.0.0.0    192.168.36.60    192.168.36.60       1
  255.255.255.255  255.255.255.255    192.168.36.60    192.168.36.60       1


THANKS FOR YOUR HELP :)
AD
0
 
LVL 4

Expert Comment

by:boxcar7
ID: 9683427
Try this after booting up:

ROUTE CHANGE 0.0.0.0 MASK 0.0.0.0 192.168.36.4
 (I'm assuming you want 192.168.36.4 to be your new gateway).

You can put it in a batch file and either put it in your StartUp Group or, if you are really slick, put it in the RunServices section of your registry (then it will run before you log on).
0
Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

 

Expert Comment

by:andyabra
ID: 9684060
How many clients do you have?  What if you manually assigned IP addresses instead of using DHCP (you could leave it enabled on the router... no harm, no foul)?  Then you could optionally either enter a default gateway or not, per machine.
0
 
LVL 18

Expert Comment

by:chicagoan
ID: 9684925
Are you trying to limit internet access for these machines? Why not assign the gateway via DHCP and null route the machines you don't want to grant access to?
0
 
LVL 1

Author Comment

by:illtbagu
ID: 9695639
boxcar7,

I tried your suggestion and Im getting a error:

---------------------------------------------------------------------------------------
Microsoft(R) Windows 98
   (C)Copyright Microsoft Corp 1981-1999.
C:\WINDOWS\Desktop>ROUTE CHANGE 0.0.0.0 MASK 0.0.0.0 192.168.36.4
Could not find route to CHANGE.
---------------------------------------------------------------------------------------

Thanks,
AD
0
 
LVL 4

Expert Comment

by:boxcar7
ID: 9696078
Must be no default route (as opposed to a bogus one).

Do this instead then:

ROUTE ADD 0.0.0.0 MASK 0.0.0.0 192.168.36.4

0
 
LVL 1

Author Comment

by:illtbagu
ID: 9696213
boxcar7,
Thanks works great :).

Before I close this question out I was hoping someone might answer a simple question for me about using this in the netlogon batch file. I need this to check if its a windows 98 machine and if it is to check what the user name is and run the ROUTE ADD 0.0.0.0 MASK 0.0.0.0 192.168.36.4 according to a list of given user names. That way I can run this command during logon according to a list of approved users.

Thanks,
AD
0
 
LVL 4

Expert Comment

by:boxcar7
ID: 9696307
There are actually a number of ways of tackling this.  It would be difficult in a batch script since you have Win 98 clients, because it has no real concept of %USERNAME% (like NT and above does).  Kix scripts might work.

However, you might consider one of these solutions.

1) If individuals have network home directories, consider placing "personal.bat" files in their home directories and calling it from the batch file.  
e.g. :

call H:\personal.bat

In addition to be able to do the routing, you can set up specific individual mappings or other commands for the users on an individual basis as need be.

2) Create another batch file that is accessible (via permissions) only to the users you want to route.  Call that batch file from the script.  Users who don't have access to the script will get an error--access denied on logon, but it won't pop up.  (What user actually watches their logon script anyhow?)
0
 
LVL 4

Accepted Solution

by:
boxcar7 earned 300 total points
ID: 9696496
Sorry, just reread my post -- a bit unclear (late night last night :) )...

In both of the recommendations, you call the new batch files from the logon script.

0
 
LVL 1

Author Comment

by:illtbagu
ID: 9696725
boxcar7

oooh good idea i like #2. boxcar7 and vtobusman thanks for all of your help :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
For many of us, the  holiday season kindles the natural urge to give back to our friends, family members and communities. While it's easy for friends to notice the impact of such deeds, understanding the contributions of businesses and enterprises i…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question