cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1159
Views
4
Helpful
14
Replies

WAN > LAN > VLAN (Application)

Create Share
Level 1
Level 1

Hi!

1. Server with two NICs.

2. WAN (Public IP), connected directly to ISP Router.

3. LAN (192.168.1.2) Default Gateway (192.168.1.1 Cisco Swtich), connected to a cisco switch.

4. The application client installed on the server connects to a Database server at (192.168.2.2) Default Gateway (192.168.2.1 Cisco Switch).

5. The vlans are configured on a cisco switch.

6. If we use default gateways on both of the interfaces then only on network can be accessed. Adding a static route did not work.

Any Solution?

Thanks.

14 Replies 14

Hello,

On server use only one gateway on WAN(public IP)

for internal access, set a route on server toward your client.

Open CMD on your server and type

route add [your clients] mask 255.255.255.0 192.168.1.1

use -p for permanant route

route add -p 192.168.2.0 mask 255.255.255.0 192.168.1.1 

Masoud

I think i added the wrong route.

route add 192.168.2.0 mask 255.255.255.0 192.168.2.1

it should be

route add 192.168.2.0 mask 255.255.255.0 192.168.1.1

Right?

That is right. add option -p to make it permanent.

route add -p 192.168.2.0 mask 255.255.255.0 192.168.1.1

Masoud

will try. Thanks.

Please give me feedback after trying,

Masoud

Didn't work.

After adding the static route i ran

tracert 192.168.2.2 and it tried to reach it through the WAN interface.

There is a default route shown in route print

0.0.0.0 0.0.0.0 wan ip Default

Can it cause this problem?

No, default route is not a problem

Can you ping 192.168.1.1 on server?

Try to see windows routing table with this command and post the output on CMD

Route print

Masoud

This is without adding static route

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    WAN Router IP           Wan IP    276
      wan subnet     255.255.255.0         On-link            Wan IP    276
           Wan IP  255.255.255.255         On-link            Wan IP    276
        wanip.255  255.255.255.255         On-link            Wan IP    276
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      192.168.0.0    255.255.255.0         On-link       192.168.1.2     21
    192.168.0.255  255.255.255.255         On-link       192.168.1.2    276
      192.168.1.0    255.255.255.0         On-link       192.168.1.2    276
      192.168.1.2  255.255.255.255         On-link       192.168.1.2    276
    192.168.1.255  255.255.255.255         On-link       192.168.1.2    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link            Wan IP    276
        224.0.0.0        240.0.0.0         On-link       192.168.1.2    276
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link            Wan IP    276
  255.255.255.255  255.255.255.255         On-link       192.168.1.2    276
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0    wan Route ip   Default

This is after adding gateway also on lan interface

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    WAN Router IP           Wan IP    276
   0.0.0.0          0.0.0.0      192.168.1.1      192.168.1.2    276
      wan subnet     255.255.255.0         On-link            Wan IP    276
           Wan IP  255.255.255.255         On-link            Wan IP    276
        wanip.255  255.255.255.255         On-link            Wan IP    276
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      192.168.0.0    255.255.255.0         On-link       192.168.1.2     21
    192.168.0.255  255.255.255.255         On-link       192.168.1.2    276
      192.168.1.0    255.255.255.0         On-link       192.168.1.2    276
      192.168.1.2  255.255.255.255         On-link       192.168.1.2    276
    192.168.1.255  255.255.255.255         On-link       192.168.1.2    276
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link            Wan IP    276
        224.0.0.0        240.0.0.0         On-link       192.168.1.2    276
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link            Wan IP    276
  255.255.255.255  255.255.255.255         On-link       192.168.1.2    276
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0    wan Route ip   Default
          0.0.0.0          0.0.0.0     192.168.1.1    Default

Remove the LAN gateway. It does not work. I do not see route for 192.168.2.0 in the routing table. Do you get any error when you add it?

route add -p 192.168.2.0 mask 255.255.255.0 192.168.1.1

After disabling Gateway on Lan i was unable to ping 192.168.2.2.

Then i tried to ping 192.168.2.1 and it worked.

Then i tried to ping another pc on the same network 192.168.2.101 and it worked. 

Lastly, i tried 192.168.2.2 again and it also worked without adding static route.

Strange?

Can it be due to the router config?

It might be.

But my suggestion is trying to fix the static route. If it sits inside the routing table, your problem would be solved. It is really easy to add static route. Try that static route one more time and let me know if you get any error.

Masoud

route add -p 192.168.2.0 mask 255.255.255.0 192.168.1.1

Adding to my previous command.

How did you add static route? Please post your command.

Ganesh Hariharan
VIP Alumni
VIP Alumni

Hello ,

You cannot use default gateway for both NIC's, There would be only on default gateway in NIC for production traffic and the other NIC would be having ip address and subnet mask but without gateway.

You need to decide what route shoudl go via second NIC so that the server is maintaing symmterry in traffic communications.

Hope it Helps..

-GI