Author Topic: Problem with internet connetcion and 2 gateways in eth0  (Read 2419 times)

Gnutar

  • Zen Apprentice
  • *
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Problem with internet connetcion and 2 gateways in eth0
« on: April 22, 2011, 11:05:08 am »
Hi everybody

I have 2 internet routers connected to the same internal network (eth0).

1 internet router 192.168.1.1,     2 router 192.168.1.2
Internal network is 192.168.1.0

I have Zentyal 2.0.17 with all modules up to date.

I set up two gateways - base one and the backup.
I have set WAN failover and balance traffic. Wan failover works correct.

The problem is that if I set Zentyal as default gateway for all computers in the network. anybody has no internet connection. Zentyal runs DHCP module.

When I change default gateway to one of mentioned router (as default) internet connection works OK, but I have no internet failover, because when Zentyal changes router to 2nd one, anybody has no internet connection.

Could you help me.

Robert


Gnutar

  • Zen Apprentice
  • *
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Problem with internet connetcion and 2 gateways in eth0
« Reply #1 on: April 22, 2011, 03:24:26 pm »
Anybody can help? It is really important for me.

Thanks in advance

Robert

lorenzo

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-1
    • View Profile
Re: Problem with internet connetcion and 2 gateways in eth0
« Reply #2 on: April 23, 2011, 08:15:06 pm »
Hello,

should be nice if you manage your network in a different way:

router 1: 192.168.0.0/24
router 2:192.168.1.0/24
internal network: 192.168.2.0/24

I am using a model like this and all is OK.

Have you added each those routers in Network->Gateway?

Lorenzo

Escorpiom

  • Zen Hero
  • *****
  • Posts: 897
  • Karma: +25/-1
    • View Profile
Re: Problem with internet connetcion and 2 gateways in eth0
« Reply #3 on: April 23, 2011, 08:38:27 pm »
Your problem is that both internal and external interfaces are on the same subnet.
It won't work that way.

Set your external interfaces and internal interfaces to a different subnet, lorenzo's example will do fine.

Cheers.
Marcus' Rule:
Blanks & capitals = avoid it and you'll avoid problems...

Gnutar

  • Zen Apprentice
  • *
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Problem with internet connetcion and 2 gateways in eth0
« Reply #4 on: April 24, 2011, 09:13:46 am »
Thanks for your help, but the problem is, that I have only 1 network card and no possibility to add more.  (really small Atom desktop)

You think it is not possible to set 2 gateways in the same network, working properly?


Robert

lorenzo

  • Zen Apprentice
  • *
  • Posts: 21
  • Karma: +0/-1
    • View Profile
Re: Problem with internet connetcion and 2 gateways in eth0
« Reply #5 on: April 24, 2011, 11:00:18 am »
Sorry but you need to have different network interfaces to manage your gateway!

ghutchi1

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-1
    • View Profile
Re: Problem with internet connetcion and 2 gateways in eth0
« Reply #6 on: April 24, 2011, 01:41:25 pm »
Hi Gnutar,

Have you tried setting up virtual interfaces for each of the modems and setting wan failover up on them

Gnutar

  • Zen Apprentice
  • *
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Problem with internet connetcion and 2 gateways in eth0
« Reply #7 on: April 24, 2011, 03:42:33 pm »
Unfortunately it is not easy. I set 2 virtual interfaces for server 192.168.2.10 and 192.168.3.10 abd add 2 gateways for them (2 routers)

And I can't connect to the internet.
Maybe it is the problem with routing and iptables?

Robert