-1

How to add more gateways? I need to connect public network to my LAN.

Topology now: LAN----->ROUTER<-----LAN

Topology i want: PUBLIC NET------>ROUTER<---->LAN<---->ROUTER<---->LAN

When i set default gateway as the router to public net, I can't reach that last LAN, and if I set default GW as that internal router, I can't reach Internet

How can i accomplish that?

2 Answers2

1

Your last LAN (the outter right one) needs to forward every not-know traffic to the router (first default gateway). The router knows both subnets. Every unknows adress should be sent to the next router.

Therefore your topology should look like this:

WAN -- Router1 -- Router2 -- LAN2
          |
         LAN1
  • LAN2 has Router2 as default gateway.
  • Router2 has Router1 as default gateway.
  • LAN1 has Router1 as default gateway.
  • Router1 is connected to the WAN and forwards the unknown traffic into the WAN.
  • Router1 needs to know the network of LAN2 i.e. route to LAN2 via Router2.
Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
mushr00mer1990
  • 351
  • 4
  • 14
0

You set one default gateway (always upstream in direction of the internet) on each router and add network routes to all attached interfaces.

For this to work the networks have to be unique of course.

If your router is a cheap bluebox customer equipment it might not know about routing tables, in that case it may hide it behind network interface definitions if you are lucky, or you need to get a more advanced model.

eckes
  • 845
  • 9
  • 21