Link to home
Start Free TrialLog in
Avatar of zsabbasi
zsabbasi

asked on

Default gateway and NAT

I have two sources of internet
1) SDSL modem connecting to internet ZyXEL Prestige P791R SDSL Router.
2) ADSL connected directly to windows 2000 server which is configured as RRAS server
for routing and PPTP connections.

clients are connected to the internet using ADSL on the server (default gateway is windows 2000 servers ip)

I want to use SDSL line to port forward to a machine on network for using as web server or VNC connection. I configured to the SDSL routers internal interface with a static Ip and configured port forwading.

Everything is ok but it works only when i configure the SDSL line as default gateway.

Clients can browse internet and perform normal functions but i cannot use port forwarding until unless i configure the SDSL line as default gateway.

Point here is i dont want clinets to use SDSL as their defaut gateway. It will be used for dialing in only.(in future) and web hosting.
Whats the problem here???
I understand the way nat works clinets do not need gateway to communicate with routers internal interface.
Avatar of srikrishnak
srikrishnak
Flag of Singapore image

Okie..My understanding is in your network configured two gateways and wanted to use them for diff purposes. Right ?....Just a suggetion. Why dont you try adding a static route in one of your client machine and try to access the services.
For Eg. On your client machine
Target IP subnet mask(255.255.255.255 Idelly) Default Gateway(SDSL Router)
IF not may be one of our Gurus will come up with some better solution
Srikrishna Komatineni
Avatar of ewtaylor
ewtaylor

I do not understand what you are trying to accomplish. What are you trying to access the webserver?
I see your point. You have the following topology:

                   |ADSL       |SDSL
             w2kserver     Router
                     |             |
                Switch or switches
                    | | | | | | |
                  Workstations

and you want the default gateway to be the LAN Nic of the server, except for some special requests that must go to the router.

The W2k Server use ICS for NAT, right?

Why don't you connect the ADSL modem to the router and configure internal table for routing? I don't know the Zyxel router, but I know that for a special address other routers can be configured to use one or other wan connection.
I think srikrishnak's idea to use local route statements is the best idea.  From a command line, type route /? for a list of commands and syntax.
I would just create 2 scops with your DHCP for your subnet each one with a diffrent gateway


Avatar of zsabbasi

ASKER

crissand got the picture 100% the point is everything is working except port forwarding from the SDSL router if i set the default gateway it works but i dont want any one to use it as gateway.
ADSL is ok for outgoing. I just want port forwarding for the webserver or vnc.

The question is for the webserver or vnc server the traffic is comming from the SDSL router (local network interface) so what is the need for a default gateway.
btw static route works or adding another gateway works but its not wanted. It shouldnt be required in theory. local pcs dont need gateways. I need explaination why it required a gateway. i.e portforwarding should be transparent.
Maybe I did'n't understand the question. Do you need to use the ADSL as default gateway, for accessing the Internet, and the SDSL for accessing a special address or what? Can you be more specific? I guess your problem is that when you set gefault gateway the ADSL you cannot go out thru the SDSL, am I right?

Is there a specific computer that must go out thru SDSL, or anyone? If it's a specific computer, it will access the Internet also thru SDSL or thru ADSL?

Now, what's the default gateway: Any request for and address that is not in the local network goes to default gateway. And that's all. Usually, the default gateway is a router, with one or more wan connection, and with internal routing rules.
What i need is that every one browse internet using ADSL. and i connect to my network from outside (web server, VNC, and other server services using SDSL i.e, port forwarding).

I know i have configured everything right. portforwarding does not require the host computer to have the forwarding router set as gateway but in my case thats the only way it works) strange!!
I guess this is not a routing problem. Let's talk about webserver first. When you do the NAT on the sdsl router, the external IP address must connect to the local network address of the webserver.

                    |ADSL       |SDSL (xxx.xxx.xxx.xxx)
             w2kserver     Router
  192.168.0.2 |             |192.168.0.1
                Switch or switches
                    | | | | | | |
                  Workstations

and you must do port forwarding (NAT) between xxx.xxx.xxx.xxx to 192.168.0.2 (these are not real addresses, just samples). Now, when you access http://xxx.xxx.xxx.xxx from outside it must go to 192.168.0.2:80, if the routing is correct. All workstations will have default gateway 192.168.0.2.
i am trying to configure both to NAT and port forward. But i can use one or the other.
by changing the gateway (which should not be required for NAT). NAT has nothing to do with gateway? what u said works only when i setup the gateway i can only set one as gateway. I have set it up the way u said sdsl portforwarding and adsl for vnc. I want to be able to use both. but at the moment i can use only one. if the targed pc has that router set as the gateway it works otherwise it doesnot (why do i need a gateway)? nat pc should look at the router as  a local pc and should not know if its been natted hence no need for a gateway? it could be a bug or Active Directory problem or windows NAT is messing things up interceptng packets and doing something i dont know but it sounds like a bug.
ASKER CERTIFIED SOLUTION
Avatar of crissand
crissand

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Even though the answer did not solve anything i want this question closed.

The answer is NAT only forwards outside traffic to inside port and ip.

the traffic chooses its own way back, since the gateway is another machine the sender gets a reply originating from a different pc.
Correct. And the server respond on default gateway. Maybe the configuration with two nics and two gateways in different network can solve the problem. Every nic will have another default gateway. Let's see:

                       router1                    router2
                             |192.168.0.254/24    |192.168.1.254/24
                             |                             |
                             |192.168.0.1/24       |192.168.1.1/24
                       +            server                 +

192.168.0.1 will have default gateway 192.168.0.254
192.168.1.1 will have default gateway 192.168.1.254

But you'll need another router to connect 192.168.0.0/24 and 192.168.1.0/24.

Do you want to dig more?