Author Topic: Incorrect random gateways assignation.  (Read 2509 times)

Sopalajo de Arrierez

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Incorrect random gateways assignation.
« on: January 05, 2016, 12:57:25 am »
My Zentyal Server has 7 ethX NICs:
Code: [Select]
eth0 --> Embedded motherboard ethernet card.
eth1-6 --> Additional PCI 6xEthernet card.

I have defined at Network --> Network Interfaces like:
Code: [Select]
eth0 --> Internal, DHCP
eth1 --> Not set
eth2 --> Not set
eth3 --> Not set
eth4 --> External WAN
eth5 --> Internal, Static, DHCP Server
eth6 --> External WAN

So, the gateways should be eth4 & eth6, but sometimes the machine seems to boot incorrectly, and the gateways shown at Network --> Gateways are eth0&eth6:

Code: [Select]
luis@threepwood:~$ sudo routel
         target            gateway          source    proto    scope    dev tbl
        default        192.168.1.1    192.168.1.33                     eth6 101
        default       192.168.11.1  192.168.11.110                     eth0 102
        default                                                             default
        nexthop        192.168.1.1                                     eth6
        nexthop       192.168.11.1                                     eth0
   192.168.1.0/ 24                    192.168.1.33   kernel     link   eth6
   192.168.9.0/ 24                     192.168.9.1   kernel     link   eth5
  192.168.10.0/ 24                    192.168.10.3   kernel     link   eth4
  192.168.11.0/ 24                  192.168.11.110   kernel     link   eth0
      127.0.0.0          broadcast       127.0.0.1   kernel     link     lo local
     127.0.0.0/ 8            local       127.0.0.1   kernel     host     lo local
      127.0.0.1              local       127.0.0.1   kernel     host     lo local
      127.0.1.1              local       127.0.0.1   kernel     host     lo local
127.255.255.255          broadcast       127.0.0.1   kernel     link     lo local
    192.168.1.0          broadcast    192.168.1.33   kernel     link   eth6 local
   192.168.1.33              local    192.168.1.33   kernel     host   eth6 local
  192.168.1.255          broadcast    192.168.1.33   kernel     link   eth6 local
    192.168.9.0          broadcast     192.168.9.1   kernel     link   eth5 local
    192.168.9.1              local     192.168.9.1   kernel     host   eth5 local
  192.168.9.255          broadcast     192.168.9.1   kernel     link   eth5 local
   192.168.10.0          broadcast    192.168.10.3   kernel     link   eth4 local
   192.168.10.3              local    192.168.10.3   kernel     host   eth4 local
 192.168.10.255          broadcast    192.168.10.3   kernel     link   eth4 local
   192.168.11.0          broadcast  192.168.11.110   kernel     link   eth0 local
 192.168.11.110              local  192.168.11.110   kernel     host   eth0 local
 192.168.11.255          broadcast  192.168.11.110   kernel     link   eth0 local
        default        unreachable                   kernel              lo unspec
        default        unreachable                   kernel              lo unspec

After rebooting 1-3 times, the gateways appear as correctly assigned on the web interface (eth4&eth6) and the command line shows:

Code: [Select]
luis@threepwood:~$ sudo routel
[sudo] password for luis:
         target            gateway          source    proto    scope    dev tbl
        default        192.168.1.1    192.168.1.33                     eth6 101
        default       192.168.10.1    192.168.10.3                     eth4 102
        default                                                             default
        nexthop        192.168.1.1                                     eth6
        nexthop       192.168.10.1                                     eth4
   192.168.1.0/ 24                    192.168.1.33   kernel     link   eth6
   192.168.9.0/ 24                     192.168.9.1   kernel     link   eth5
  192.168.10.0/ 24                    192.168.10.3   kernel     link   eth4
  192.168.11.0/ 24                  192.168.11.110   kernel     link   eth0
      127.0.0.0          broadcast       127.0.0.1   kernel     link     lo local
     127.0.0.0/ 8            local       127.0.0.1   kernel     host     lo local
      127.0.0.1              local       127.0.0.1   kernel     host     lo local
      127.0.1.1              local       127.0.0.1   kernel     host     lo local
127.255.255.255          broadcast       127.0.0.1   kernel     link     lo local
    192.168.1.0          broadcast    192.168.1.33   kernel     link   eth6 local
   192.168.1.33              local    192.168.1.33   kernel     host   eth6 local
  192.168.1.255          broadcast    192.168.1.33   kernel     link   eth6 local
    192.168.9.0          broadcast     192.168.9.1   kernel     link   eth5 local
    192.168.9.1              local     192.168.9.1   kernel     host   eth5 local
  192.168.9.255          broadcast     192.168.9.1   kernel     link   eth5 local
   192.168.10.0          broadcast    192.168.10.3   kernel     link   eth4 local
   192.168.10.3              local    192.168.10.3   kernel     host   eth4 local
 192.168.10.255          broadcast    192.168.10.3   kernel     link   eth4 local
   192.168.11.0          broadcast  192.168.11.110   kernel     link   eth0 local
 192.168.11.110              local  192.168.11.110   kernel     host   eth0 local
 192.168.11.255          broadcast  192.168.11.110   kernel     link   eth0 local
        default        unreachable                   kernel              lo unspec
        default        unreachable                   kernel              lo unspec

My version is v4.0, as long I have read that v4.1 removed the Balance Traffic feature (Why?!!).

What is going on here and how could I solve it?

Thanks you.

vmb

  • Zen Apprentice
  • *
  • Posts: 46
  • Karma: +5/-0
    • View Profile
Re: Incorrect random gateways assignation.
« Reply #1 on: January 13, 2016, 01:00:59 am »
You can force interface assignment by MAC address in /etc/udev/rules.d/70-persistent-net.rules for reliable interface assignment at each reboot.

Sopalajo de Arrierez

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Incorrect random gateways assignation.
« Reply #2 on: January 17, 2016, 01:22:42 am »
You can force interface assignment by MAC address in /etc/udev/rules.d/70-persistent-net.rules for reliable interface assignment at each reboot.
That sound great, VMB.
Do you have some more details about the process?

vmb

  • Zen Apprentice
  • *
  • Posts: 46
  • Karma: +5/-0
    • View Profile
Re: Incorrect random gateways assignation.
« Reply #3 on: January 22, 2016, 01:47:37 am »