Solved

overriding dhcp assigned gateway in windows 98

Posted on 2003-11-04
11
398 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
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
extend vlan through a layer 3 connection 31 144
access vs trunk with voice vlan 2 41
Can't ping New Linux Servers 40 64
spanning tree loop even though stp is enabled 10 30
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
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…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
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…

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now