how to set the default gateway

  • Thread starter Thread starter adrian
  • Start date Start date
A

adrian

Hi,
When you use the dial-up connection, you will tick the "use default
gateway on remote network" option. But now I am a server, how can I assign
the default gateway address to the client?
The client can now connection to my computer through the modem-modem
connection, and he can use ICQ, but can't access internet, I know it's
because the default gateway problem, but how can I assign the default
gateway address to my client? Thx.

Adrian
 
adrian said:
Hi,
When you use the dial-up connection, you will tick the "use default
gateway on remote network" option. But now I am a server, how can I assign
the default gateway address to the client?
The client can now connection to my computer through the modem-modem
connection, and he can use ICQ, but can't access internet, I know it's
because the default gateway problem, but how can I assign the default
gateway address to my client? Thx.

Adrian

Depending on how you are distributing a client's ip_address through RAS, a
client will either receive a dhcp specified gateway or inherit the RAS
server's gateway. Note that if DHCP is local to the RAS server, the client
will still inherit the RAS server's gateway (but with metric bumped by one).

The problem is not whether the client gets the gateway, but rather whether
the gateway's metric in the routing table at the server can direct packets
to the network's dns server. Usually, the fix is to "Add Route" a static
entry at server that will redirect packets with a metric of one. A metric is
the number of "hops" a route crosses.
 
Hi,
The following is part of the "ipconifg /all" result from my client's
computer, how come it doesn't have DNS server; and the default gateway is
set to itself, but not the server IP address? It's neither receiving a dhcp
specified gateway nor inherit the RAS server's gateway. I've configured the
DHCP server correctly (i think) and set both the DNS server and default
gateway to 192.168.0.1. Do I need to configure the DHCP Relay agent as
well?
ipconfig /all
PPP adapter adrian:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.3
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 192.168.0.3
NetBIOS over Tcpip. . . . . . . . : Disabled
route print (part of the result as follow:)

Active Routes:
Network Destination Netmask Gateway Interface
Metric
0.0.0.0 0.0.0.0 192.168.0.3
192.168.0.3 1




Thanks.
Adrian
 
Sorry, I forgot to say something
The computer which connect directly to the internet has IP address
192.168.0.1. The RAS server has IP address 192.168.0.2.
Also, is the relay agent doing the same thing as what you said about the
"add route" command which is to direct packets to dns server? Do you mean
add this route:
add route 0.0.0.0 mask 0.0.0.0 192.168.0.1

Actually this route is in the routing table already. What should I add? Thx
 
Sorry I forgot to say something
The computer which directly connect to the internet has IP address
192.168.0.1. The RAS server has IP address 192.168.0.2.

Also, is configuring the relay agent same as what said about the "add route"
command which is to direct packets to dns server? Do you mean add the
following route:
add route 0.0.0.0 mask 0.0.0.0 192.168.0.1

Actually, this route is in the routing table, what should I add? Thx.
 
Most people have the RAS set to use DHCP to assign
the dial in user an IP and any other network specific
things like the gateway. You may want to make sure what
gateway is being given when connected by doing an
ipconfig /all at the command prompt, at least in XP and
2000. You might get 2 listings if you also have a network
card and or using a VPN link. You should spot it though
by it matching an internal IP of your network. Check the
gateway and if you are using DHCP to assign you may want
to make sure that is sending correctly. A second way you
can do this is to have RAS set with specific routes to
destination IP's. There is an area for Static Routes
where you can state for 0.0.0.0 0.0.0.0 10.10.x.x meaning
for any outside or internet based traffic go to 10.10.x.x
which would be your internal gateway. You could then set
a second saying for all 10.10.0.0 255.255.0.0 use
10.10.0.1 which would be the internal IP of your RAS
server. Make sure it is static though or your routes may
not be good after a dhcp lease expires. Again, the IP's I
used are for example and must fit your internal network
and gateways as well as the subnet. All of this though is
set in Routing and Remote Access. Hope this helps some!
 
This is after my last message about RAS and DHCP
settings. I noticed on your IPCONFIG for the dialed in
computer your subnet mask is 255.255.255.255 which means
no other IP's are possible for that link it is set only at
one IP and that DHCP is not enabled. It sounds like you
just have a static IP set for the client side and none of
the DHCP will be passed on to the client dialing or
VPN'ing in! Again, make sure your client's dialing in are
set to use DHCP and not set with static IP's as this one
is.
 
This is after my last message about RAS and DHCP
settings. I noticed on your IPCONFIG for the dialed in
computer your subnet mask is 255.255.255.255 which means
no other IP's are possible for that link it is set only at
one IP and that DHCP is not enabled. It sounds like you
just have a static IP set for the client side and none of
the DHCP will be passed on to the client dialing or
VPN'ing in! Again, make sure your client's dialing in are
set to use DHCP and not set with static IP's as this one
is.
 
Hi,
Thx for the detailed reply ^^
I've tried to set to use DHCP server to assign IP rather assigning a
static IP. And this time, there's some changes in the ipconfig /all :
PPP adapter adrian:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.3
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 192.168.0.3
DNS Servers . . . . . . . . . . . : 192.168.0.1
192.168.0.1
NetBIOS over Tcpip. . . . . . . . : Disabled

I found that the main difference is the DNS servers change to 192.168.0.1
which is not the case before. And I believe that's because of my DHCP server
setting cause it to set to 192.168.0.1 (which is good). However, the default
gateway still stay using client's own IP, normally, with the dial-up
connection, the default gateway would be set to one of the host in server's
internal network. But in the DHCP server setting, I've set the default
gateway (in the scope option > 003 router) to 192.168.0.1, strange?? And
I've checked "Enable IP routing" and "Allow IP based remote access", do I
have to check "enable this computer as a router" (I only got one network
card in this computer though)?

Also, I've tried to set a static route, there's nothing happen in the
client's routing table, but the new entry was found in the server's routing
table (Is that normal? what's that actually?). Also, what's the IP 10.10.x.x
mean?

Sorry about asking so many dummy question ^^"

Adrian
 
From what I see here there are still 2 things that make me
think DHCP is still not truely enabled on the client
side. First, is the DHCP Enabled saying NO. The subnet is
also still at 255.255.255.255 which means the only IP this
unit will talk with is itself. Depending on your subnet
in the network it would normally be something like
255.255.0.0 . What this means is that in your case the
network would have it's first two octets set in stone. IE
the 192.168 The other two octets would then be dynamic
and assigned by DHCP. So, when a client asks for an IP
DHCP would then "Lease" an IP to the computer normally
this is set to 3 days. For demonstration, this first
computer would get 192.168.0.1 . The next would get
192.168.0.2 and so on. As computers keep asking for IP's
DHCP will give out the lower IP's before it gives another
from the pool. So if both of the computers were turned
off for 3 days and then came in but the second one came in
first, it would get the IP of 192.168.0.1 and so on. If
the leases were not released yet and those same machines
come back in a 3 day period they will get their original
IP's that they first got from DHCP. Sorry for this being
so long winded but I want to try to help you understand
some of this better. Now, to try and explain the
255.255.0.0 better. This means that the last two octets
that your DHCP assigns can change. 192.168.0.255 on up to
192.168.255.255 . This does get confusing so hang in
there! :) Now, when I see in your IPCONFIG /ALL the
subnet is 255.255.255.255 which means that IP will only
speak to itself. Again, from what it looks like the IP
you have for this machine is still static and that with
the subnet as it is it can only use itself as it's own
gateway. Now, I am relaying this from a 2000 machine so
if you do this with XP there may be some differences but
it will be close. Go ahead and open the dial up
connection but do not dial. Click properties. When the
properties window opens, the fourth tab should be
Networking. The first selection for a dial in should
normally be PPP/Win 95, 98,NT4, 2000/Internet. Down below
that TCP/IP and Client for Microsoft Networks should be
checked. Highlight the TCP/IP and click that properties.
Here is where Obtain an IP address automatically should be
selected to use DHCP from your server. The other about
DNS should also be set to obtain DNS automatically. And
finally...select Advanced. This will have the use defualt
gateway on remote network so make sure this is selected as
well as IP header compression. As long as were at it,
let's make sure no other settings are static in here
either. Click the DNS tab. There should be no IP's in
those windows and the same if you click the WINS tab.
There will be some other options selected in the DNS and
WINS but we want to make sure there are no Static IP's for
these systems. So at this stage if all is like I said,
you should be able to dial in and do your ipconfig /all
and the gateway should change.
As an aside, you may also want to make sure the "Scope" on
your DHCP has a subnet that allows for growth and open
communications such as a 255.255.0.0 or 255.255.255.0 .
The later being slightly smaller and would then make your
addresses able to go from 192.168.0.0 to 192.168.0.255 and
then stop. I don't mind helping as this really can get
tricky so let me know if this worked.
(e-mail address removed) Good luck! Now I want to make sure
it works! :)
 
HI,
Thx very much for the reply ^^
Actually, i've done all you said, like obtain DNS and DHCP automatically,
no static IP in DNS or WINS tab, use default gateway on the remote network,
and the DHCP scope is set to assign IP with range 192.168.0.3 to
192.168.0.254.
I was wondering whether the correct subnet mask is 255.255.255.255 or not,
coz I got another dial-up account, when I connect to my ISP, the ipconfig
/all is like:

PPP adapter unsw:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 149.171.241.210
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 149.171.240.1
DNS Servers . . . . . . . . . . . : 149.171.96.2
149.171.192.2
Primary WINS Server . . . . . . . : 149.171.96.222
Secondary WINS Server . . . . . . : 149.171.192.222
NetBIOS over Tcpip. . . . . . . . : Disabled

This is a valid one, I can go online with this, and you can see that the
subnet mask is 255.255.255.255 and DHCP is not enabled. All that different
to my client's connection is the default gateway which is set to the host on
the server's network. Also, my client's ip address is changing, it's not
static, sometimes 192.168.0.3, sometimes 192.168.0.x... which I guess my
DHCP is working. And after I changed to obtain DHCP automatically, the DNS
entry is 192.168.0.1, which is good. But I just don't get why the gateway is
not changing. What do you think?

THX.
Adrian ([email protected])
 
I hate to say it but you got me stumped! The subnet on
dial in ipconfig will show as you said at all 255's but on
your local lan should not show as such and be like a
255.255.255.0 or whatever you configured it as. Actually
what do you have the subnet in DHCP set to? If when you
are dialed in on this trouble causer of a machine :) have
you tried doing a tracert to an internet address and see
where it is trying to go to get there? IE tracert
www.yahoo.com and that should but considering the luck we
have had so far I am not sure, tell you the route the
machine is using to get to yahoo.com. As I said earlier,
now I want to get this working as well! :) I do trust
others dialing into this same RAS are able to get on the
web but it is just this one computer that can't? Is the
RAS on a 2000 server using Routing and Remote Access? I
am just thinking of other options to get this working but
that will also keep others working without interuption.
Hang in there! Let me know on these other few questions
and maybe with luck on our side we can get this before
retirement time! :)
 
hi,
actually, my lan is alright, the subnet mask is 255.255.255.0. but my dial
in client's subnet mask is all 255's. I will try some other way to get it
working, i guess the problem lies on the gateway.... but just couldn't solve
it..................................................................


adrian.
 
Hi,
I heard that someone said I need to purchase some add on package in order
to make the remote access working, is that true? since my case is like a
remote client accessing my network, and sharing the internet. Is it doable
without purchasing anything at all?

Adrian
 
It is a workable situation without other software. I have
both VPN and dial in access and our users can work on the
network as well as go on the web and this was all done
from the standard Routing and Remote Access of 2000 server.
 
Dear, Default Getway is actually your server Ip address ( if you are connected through switch )
Or If you are conected through Router and Router IP Address is Default Getway. OK

----- adrian wrote: -----

Hi,
When you use the dial-up connection, you will tick the "use default
gateway on remote network" option. But now I am a server, how can I assign
the default gateway address to the client?
The client can now connection to my computer through the modem-modem
connection, and he can use ICQ, but can't access internet, I know it's
because the default gateway problem, but how can I assign the default
gateway address to my client? Thx.

Adrian
 
Back
Top