[FS#1184] Gateway bug when using multiple network IPs (VLANs)

LEDE Bugs lede-bugs at lists.infradead.org
Wed Nov 22 05:42:51 PST 2017


A new Flyspray task has been opened.  Details are below. 

User who did this - Arjan van Staalduijnen (tibo) 

Attached to Project - LEDE Project
Summary - Gateway bug when using multiple network IPs (VLANs)
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - lede-17.01
Due in Version - Undecided
Due Date - Undecided
Details - Hi,

I'm using LEDE 17.01.4 with the latest stable package updates on a Netgear WNDR3700 v1. I've configured multiple VLANs which each have their own specific IP and gateway assigned on the device.
(I am also using an IP alias. I'm not sure if this is a factor.)


The desired result of a cmdline 'route' would have to be something like:

  root at OpenWrt:~# route
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  default         192.168.100.1   0.0.0.0         UG    0      0        0 br-lan
  192.168.1.0     192.168.1.1     255.255.255.0   U     0      0        0 br-lan
  192.168.2.0     192.168.2.1     255.255.255.0   U     0      0        0 br-vlan2
  192.168.3.0     192.168.3.1     255.255.255.0   U     0      0        0 br-vlan3
  192.168.100.0   *               255.255.255.0   U     0      0        0 br-lan

...where each VLAN has it's own dedicated gateway.

However, when I set a gateway for each VLAN, the output is:

  root at OpenWrt:~# route
  Kernel IP routing table
  Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  default         192.168.2.1     0.0.0.0         UG    0      0        0 br-lan
  192.168.1.0     *               255.255.255.0   U     0      0        0 br-lan
  192.168.2.0     *               255.255.255.0   U     0      0        0 br-vlan2
  192.168.3.0     *               255.255.255.0   U     0      0        0 br-vlan3
  192.168.100.0   *               255.255.255.0   U     0      0        0 br-lan

...where the value of the default gateway seems random, having one of any of the various gateway values, set in /etc/config/network .

To reproduce (/etc/config/network snippet):

config globals 'globals'
        option ipv6 '0'

config interface 'lan'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option delegate '0'
        option _orig_ifname 'eth0.1 wlan0 wlan0-1 wlan1'
        option _orig_bridge 'true'
        option ipv6 '0'
        option ifname 'eth0.1 eth1'
        option ipaddr '192.168.1.2'
        option gateway '192.168.1.1'
        option broadcast '192.168.1.255'

config interface 'vlan2'
        option _orig_ifname 'eth1.2'
        option _orig_bridge 'true'
        option ifname 'eth0.2 eth1.2'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.2.2'
        option netmask '255.255.255.0'
        option broadcast '192.168.2.255'
        option gateway '192.168.2.1'

config interface 'vlan3'
        option type 'bridge'
        option _orig_ifname 'eth1.3'
        option _orig_bridge 'true'
        option proto 'static'
        option netmask '255.255.255.0'
        option ifname 'eth0.3 eth1.3'
        option ipaddr '192.168.3.2'
        option broadcast '192.168.3.255'
        option gateway '192.168.3.1'

config interface 'lan1'
        option ifname 'br-lan'
        option proto 'static'
        option ipaddr '192.168.100.2'
        option netmask '255.255.255.0'
        option gateway '192.168.100.1'
        option broadcast '192.168.100.255'


Regards,

Arjan

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=1184



More information about the lede-bugs mailing list