Modify

Opened 6 years ago

Last modified 22 months ago

#11774 reopened defect

wrong wan interface displayed on luci overview page

Reported by: finas Owned by: developers
Priority: response-needed Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

using OpenWrt Attitude Adjustment r32520 and LuCI Trunk trunk+svn8836,

problem:
I have 5 interfaces under the interfaces tab.

  • LAN
  • WAN ( pppoe on interface eth1.10 )
  • IPTV ( dhcp on interface eth1.12 )
  • IP ( pptp connection to a pptp server )
  • SS ( pptp connection to a pptp server )

The real WAN interface, the one that IP and SS need to exist is the WAN interface. This is the interface that get a public ip address from my ISP.

On the luci page, the wan connection displayed is the SS and nothing else.

Attachments (0)

Change History (16)

comment:1 Changed 6 years ago by jow

  • Resolution set to wontfix
  • Status changed from new to closed

LuCI will show the interface carrying the default route as wan interface.

comment:2 Changed 6 years ago by anonymous

but the default route is on the pppoe ( wan ) interface!
the two pptp interfaces don't even set routes ( I have the "use default gw" unticked on those two connections )

this is the "active route table" from the routes page:

{{
Network

Target
IPv4-Gateway
Metric




wan
0.0.0.0/0
194.65.169.238
10




wan
88.157.193.140
194.65.169.238
10




SS
192.168.1.0/24
192.168.1.1
0




SS
192.168.1.1
0.0.0.0
0




lan
192.168.88.0/24
0.0.0.0
0




wan
194.65.169.238
0.0.0.0
0




wan
195.23.184.33
194.65.169.238
10

}}

{{

I have two static routes on the "static routes" page:

interface SS: target net: 192.168.1.0 gw 192.168.1.1
interface IP: target net: 192.168.2.0 gw 192.168.2.253

comment:3 Changed 6 years ago by anonymous

  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:4 Changed 6 years ago by jow

  • Priority changed from normal to response-needed

Attach the output of

ifstatus lan
ifstatus wan
ifstatus SS

comment:5 Changed 6 years ago by anonymous

root@gateway:~# ifstatus lan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "uptime": 15521,
        "l3_device": "br-lan",
        "proto": "static",
        "device": "br-lan",
        "ipv4-address": [
                {
                        "address": "192.168.88.254",
                        "mask": 24
                }
        ],
        "ipv6-address": [

        ],
        "route": [

        ],
        "dns-server": [
                "192.168.88.1"
        ],
        "dns-search": [

        ],
        "data": {

        }
}
root@gateway:~# ifstatus wan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "uptime": 15472,
        "l3_device": "pppoe-wan",
        "proto": "pppoe",
        "device": "eth1.10",
        "ipv4-address": [
                {
                        "address": "188.250.12.169",
                        "mask": 32
                }
        ],
        "ipv6-address": [

        ],
        "route": [
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "194.65.169.238"
                }
        ],
        "dns-server": [

        ],
        "dns-search": [

        ],
        "data": {

        }
}
root@gateway:~# ifstatus SS
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "uptime": 15289,
        "l3_device": "pptp-SS",
        "proto": "pptp",
        "ipv4-address": [
                {
                        "address": "192.168.1.202",
                        "mask": 32
                }
        ],
        "ipv6-address": [

        ],
        "route": [
                {
                        "target": "192.168.1.0",
                        "mask": 24,
                        "nexthop": "192.168.1.1"
                },
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "192.168.1.1"
                }
        ],
        "dns-server": [

        ],
        "dns-search": [

        ],
        "data": {

        }
}

comment:6 Changed 6 years ago by jow

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:7 Changed 5 years ago by choogenboom

Possible this change got blown away? I am having the same problem and in my version of network.lua

./build_dir/target-mips_r2_uClibc-0.9.33.2/luci-0.11+svn9812/libs/core/dist/usr/lib/lua/luci/model/network.lua

I see this code:

				local rt
				for _, rt in ipairs(s.route) do
					if rt.target == addr and rt.mask == mask then
						return net, s
					end
				end
		

which does not match the code shown in the changeset.

comment:8 Changed 5 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:9 Changed 5 years ago by jow

  • Resolution set to worksforme
  • Status changed from reopened to closed

It works fine for me, please only reopen the ticket if you can provide further details - in particular which wrong interface is shown, which one would be the expected to get shown, the ifstatus output of both, the /etc/config/network config too.

comment:10 Changed 5 years ago by John Allen <john@…>

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I have had a similar problem, I have three interfaces WAN pppoe,2 vlans - lan dhcp, dmz static fixed internet facing IPs. With the april 6 build of ar71xx (wndr3700v2) the status page would show the eth0.2 (dmz) interface rather than wan interface.
Rebooting helped, but any change to either the network or the firewall would trigger the effect.

I will see if I have the config files which were in use at the time. I currently on the road so I cannot post them immediately.

comment:11 Changed 5 years ago by John Allen <john@…>

That should have read May 6 NOT April 6.

Sorry for the typo

comment:12 Changed 5 years ago by jow

Still zero detail

comment:13 Changed 5 years ago by nbd

  • Resolution set to no_response
  • Status changed from reopened to closed

comment:14 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:15 Changed 22 months ago by kalethis@…

  • Resolution no_response deleted
  • Status changed from closed to reopened

I am experiencing the same issue. Luci status page displays br-lan (vlan1, eth0.2) as IPv4 WAN status. Router is Netgear WNDR3700v1 ar71xx running current release public build Chaos Calmer (version number available below). My configuration is 2 VLANs (port 0 and 1, and port 2 and 3), with a wifi ssid (2.4ghz ap is on lan, 5ghz is on lin) on each VLAN. Each are configured with own dhcp/dns server (dnsmasq). It might be pertinent to point out that this router has 2 physical interfaces: eth0 (port 0 1 2 3 4 5, 0-3 are physical lan ports, 4 is not usable, 5 is cpu) and eth1 (wan port). From the little info posted by a couple other people, there seems to be a common thing: multiple VLANs. I will provide the output of ifstatus for each of my interfaces, and my /etc/config/network. If you need anything additional, let me know. One more thing... May or may not be related, but having installed the adblock package, it fails to start stating that my wan port is on a lan (it's not. The ip shown below from ifstatus of wan is my public facing ip, direct from my isp's dhcp server, as seen below). I will provide that error message as well, since its a simultaneous issue of the router's belied that interface wan is not my wan connection. It may or may not be related, but it might be useful to know. Anyways, I'm not currently able to test any vlan configuration changes, but I can say for sure that I only noticed the incorrect wan status on luci overview page, after I had split the lan into 2 vlans.


BusyBox v1.23.2 (2015-07-25 15:09:46 CEST) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 CHAOS CALMER (15.05, r46767)
 -----------------------------------------------------
  * 1 1/2 oz Gin            Shake with a glassful
  * 1/4 oz Triple Sec       of broken ice and pour
  * 3/4 oz Lime Juice       unstrained into a goblet.
  * 1 1/2 oz Orange Juice
  * 1 tsp. Grenadine Syrup
 -----------------------------------------------------
root@faszgate:~# ifstatus wan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "uptime": 640,
        "l3_device": "eth1",
        "proto": "dhcp",
        "device": "eth1",
        "updated": [
                "addresses",
                "routes",
                "data"
        ],
        "metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "71.93.187.241",
                        "mask": 22
                }
        ],
        "ipv6-address": [
                
        ],
        "ipv6-prefix": [
                
        ],
        "ipv6-prefix-assignment": [
                
        ],
        "route": [
                {
                        "target": "71.93.184.1",
                        "mask": 32,
                        "nexthop": "0.0.0.0",
                        "source": "71.93.187.241\/32"
                },
                {
                        "target": "0.0.0.0",                        "mask": 0,
                        "nexthop": "71.93.184.1",
                        "source": "71.93.187.241\/32"
                }
        ],
        "dns-server": [
                "71.10.216.1",
                "71.10.216.2"
        ],
        "dns-search": [
                
        ],
        "inactive": {
                "ipv4-address": [
                        
                ],
                "ipv6-address": [
                        
                ],
                "route": [
                        
                ],
                "dns-server": [
                        
                ],
                "dns-search": [
                        
                ]
        },
        "data": {
                "leasetime": 20452
        }
}
root@faszgate:~# ifstatus lan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "uptime": 717,
        "l3_device": "br-lan",
        "proto": "static",
        "device": "br-lan",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "172.20.1.1",
                        "mask": 24
                }
        ],
        "ipv6-address": [
                
        ],
        "ipv6-prefix": [
                
        ],
        "ipv6-prefix-assignment": [
                
        ],
        "route": [
                {
                        "target": "0.0.0.0",                        "mask": 0,
                        "nexthop": "172.20.1.1",
                        "source": "0.0.0.0\/0"
                }
        ],
        "dns-server": [
                "172.20.1.1"
        ],
        "dns-search": [
                
        ],
        "inactive": {
                "ipv4-address": [
                        
                ],
                "ipv6-address": [
                        
                ],
                "route": [
                        
                ],
                "dns-server": [
                        
                ],
                "dns-search": [
                        
                ]
        },
        "data": {
                
        }
}
root@faszgate:~# ifstatus lin
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "uptime": 742,
        "l3_device": "br-lin",
        "proto": "static",
        "device": "br-lin",
        "updated": [
                "addresses",
                "routes"
        ],
        "metric": 0,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "172.20.2.1",
                        "mask": 24
                }
        ],
        "ipv6-address": [
                
        ],
        "ipv6-prefix": [
                
        ],
        "ipv6-prefix-assignment": [
                
        ],
        "route": [
                {
                        "target": "0.0.0.0",                        "mask": 0,
                        "nexthop": "172.20.2.1",
                        "source": "0.0.0.0\/0"
                }
        ],
        "dns-server": [
                "172.20.2.1"
        ],
        "dns-search": [
                
        ],
        "inactive": {
                "ipv4-address": [
                        
                ],
                "ipv6-address": [
                        
                ],
                "route": [
                        
                ],
                "dns-server": [
                        
                ],
                "dns-search": [
                        
                ]
        },
        "data": {
                
        }
}
root@faszgate:~# 
root@faszgate:~# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config switch
        option device 'eth0'
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'
        option blinkrate '2'
        option enable_vlan4k '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 1 5t'

config switch_port
        option device 'switch0'
        option port '1'
        option led '6'

config switch_port
        option device 'switch0'
        option port '2'
        option led '9'

config switch_port
        option device 'switch0'
        option port '5'
        option led '2'

config interface 'wan'
        option ifname 'eth1'
        option proto 'dhcp'
        option broadcast '1'
        option peerdns '1'
#       option type 'bridge'

config interface 'lan'
        option ifname 'eth0.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '172.20.1.1'
        option netmask '255.255.255.0'
        option gateway '172.20.1.1'
        option dns '172.20.1.1'
        option broadcast '172.20.1.255'
        option force_link '1'

config interface 'lin'
        option ifname 'eth0.2'
        option type 'bridge'
        option proto 'static'
        option ipaddr '172.20.2.1'
        option netmask '255.255.255.0'
        option gateway '172.20.2.1'
        option dns '172.20.2.1'
        option broadcast '172.20.2.255'
        option stp '1'
        option force_link '1'
root@faszgate:~# ip route
default via 71.93.184.1 dev eth1  proto static  src 71.93.187.241 
71.93.184.0/22 dev eth1  proto kernel  scope link  src 71.93.187.241 
71.93.184.1 dev eth1  proto static  scope link  src 71.93.187.241 
172.20.1.0/24 dev br-lan  proto kernel  scope link  src 172.20.1.1 
172.20.2.0/24 dev br-lin  proto kernel  scope link  src 172.20.2.1 
root@faszgate:~# 
root@faszgate:~# /etc/init.d/adblock restartadblock[2448] info : domain adblock processing started (1.0.3, 15.05, 12.04.2016 05:11:16)
adblock[2448] error: LAN only (lan) network, no valid IPv4/IPv6 wan update interface found, rc: 125
adblock[2448] info : domain adblock processing failed (1.0.3, 15.05, 12.04.2016 05:11:16)
root@faszgate:~#

comment:16 Changed 22 months ago by kalethis@…

It seems I resolved the issue I was having. In my /etc/config/network file, I removed the gateway and broadcast option entries for both vlans (lin and lan), and after rebooting, luci overview status correctly displayed and identified my wan interface. Adblock did as well. I had been under the impression that the gateway, dns, and broadcast entries were to be passed on or offered to connecting clients. If someone has the time and correct knowledge, I would welcome an email that clarified the gateway option here, as I'm certain that this option was causing the problem. Perhaps because I was attempting to define multiple gateways.

As I'm writing this, it makes sense that you wouldn't set gateways for these interfaces, because it is up to iptables to process packets received by the ip set for each (v)lan interface and and forward them out thru the default route, drop, reject, or respond to the packet itself. Anyways, I hope this info proves useful for anyone else landing on this ticket whose experiencing this issue.

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.