#13202 closed defect (fixed)
switch not configured properly on clean flash of WL-500W with daily trunk build
Reported by: | iiordanov@… | Owned by: | hauke |
---|---|---|---|
Priority: | response-needed | Milestone: | Barrier Breaker 14.07 |
Component: | base system | Version: | Trunk |
Keywords: | switch configuration | Cc: |
Description
I am using 12.09-rc1 successfully with my wl-500w. I wanted to test some changes I introduced to the luci-app-pbx and pbx-voicemail by flashing one of the daily build packages, but I found that when I either:
- flash from the ASUS recovery console (losing all settings), or
- flash from OpenWRT 12.09-rc1, resetting to defaults
The result is that the router appears to come up, but it is unpingable. On the other hand, if from a properly working 12.09-rc1 installation, I flash *without* resetting to defaults, the router comes up , but the switch is somehow misconfigured (cannot route packets to WAN). It is at least reachable though.
I do not have a serial port mod to tell you what exactly is happening, unfortunately. I would be happy to test stuff out for you, though.
Attachments (3)
Change History (16)
comment:1 Changed 5 years ago by hauke
- Owner changed from developers to hauke
- Status changed from new to accepted
Changed 5 years ago by iiordanov@…
Changed 5 years ago by iiordanov@…
comment:2 Changed 5 years ago by vaclav.ovsik@…
Hi,
I have soldered serial port on WL500W, so I can do some investigation.
I build trunk today and flash (TFTP in restore mode after power on).
Maybe the problem is in the network config file. Is it generated at first startup?
I have had the following stanza in it:
config switch_vlan eth0_1
option device "eth0"
option vlan 1
option ports "0 1 2 3 4 5u"
I changed this to:
config switch_vlan eth0_0
option device "eth0"
option vlan 0
option ports "0 1 2 3 4 5u"
The networking is functional after reboot.
Cheers
--
Zito
comment:3 Changed 5 years ago by Václav Ovsík <vaclav.ovsik@…>
A complete network config from minicom history:
root@OpenWrt:/etc/config# cat network
#### VLAN configuration
config switch eth0
option enable 1
config switch_vlan eth0_1
option device "eth0"
option vlan 1
option ports "0 1 2 3 4 5u"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0"
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
#### WAN configuration
config interface wan
option ifname "eth1"
option proto dhcp
--
Zito
comment:4 Changed 5 years ago by Václav Ovsík <vaclav.ovsik@…>
I found init script netconfig should generate initial network config file.
I was running script parts by hand, AWK input from nvram not affect the output.
Interesting input is only maybe:
root@OpenWrt:/proc/switch/eth0# cat /proc/diag/model
ASUS WL-500W
root@OpenWrt:/proc/switch/eth0# cat /proc/switch/eth0/cpuport
5
Complete info that can be gathered under /proc/switch/eth0:
root@OpenWrt:/proc/switch/eth0# find -type f -exec sh -c "echo -n '{}: '; echo \$(cat {})" \;
./vlan/15/ports:
./vlan/14/ports:
./vlan/13/ports:
./vlan/12/ports:
./vlan/11/ports:
./vlan/10/ports:
./vlan/9/ports:
./vlan/8/ports:
./vlan/7/ports:
./vlan/6/ports:
./vlan/5/ports:
./vlan/4/ports:
./vlan/3/ports:
./vlan/2/ports:
./vlan/1/ports:
./vlan/0/ports: 0 1 2 3 4 5t*
./port/5/media: Auto
./port/5/enable: 1
./port/4/media: Auto
./port/4/enable: 1
./port/3/media: Auto
./port/3/enable: 1
./port/2/media: Auto
./port/2/enable: 1
./port/1/media: Auto
./port/1/enable: 1
./port/0/media: Auto
./port/0/enable: 1
./dev_name: BCM5325
./vlans: 16
./ports: 6
./cpuport: 5
./version: 0.03
./driver: bcm53xx
./reset: b
./enable_vlan: 1
./enable: 1
The above info is with config file vlan 0.
With original vlan 1 is networking nonfunctional.
Any idea what I should try?
Thanks
--
Zito
comment:5 Changed 5 years ago by jow
- Priority changed from normal to response-needed
Without changing the default vlan configuration, try setting the lan ifname from "eth0" to "eth0.1" and see if it works then.
comment:6 Changed 5 years ago by Václav Ovsík <vaclav.ovsik@…>
Yes it works now.
- I removed /etc/config/network then reboot, networking was nonfunctional.
- I changed over serial console:
--- network.gen 2013-04-29 22:46:08.000000000 +0200 +++ network 2013-04-29 22:46:08.000000000 +0200 @@ -18,7 +18,7 @@ #### LAN configuration config interface lan option type bridge - option ifname "eth0" + option ifname "eth0.1" option proto static option ipaddr 192.168.1.1 option netmask 255.255.255.0
- Reboot and networking is functional again.
I was curious about VLAN list from kernel before. So I tried thing working on stable Debian: cat /proc/net/vlan/config. But there is no such item in the proc filesystem.
Thanks for your time!
--
Zito
comment:7 Changed 4 years ago by marian
It really looks like a misinterpretation of
option vlan 1
This should use eth0, not eth0.1. Unless tagged.
comment:8 Changed 4 years ago by vaclav.ovsik@…
And what about if the output from /proc/switch/eth0/vlan/0/ports, that is "0 1 2 3 4 5t*" means the port 5 (cpuport) is tagged - the t letter?
...only my naive idea ;)
--
Zito
comment:9 Changed 4 years ago by hauke
Does this still happen in recent trunk and if so please provide the bootlog (dmesg), nvram dump (nvram show) and the content of /etc/config/network
comment:10 Changed 4 years ago by vaclav.ovsik@…
Hi,
my son leave home with grandparents, so it is the right time for experiments with his WL500W :). I forget some knowledge about OpenWrt, so excuse maybe my confusion please.
I checkout and build image for WL500W from this revision:
zito@bobek:/data/openwrt/trunk$ svn info Path: . Working Copy Root Path: /data/openwrt/trunk URL: svn://svn.openwrt.org/openwrt/trunk Relative URL: ^/trunk Repository Root: svn://svn.openwrt.org/openwrt Repository UUID: 3c298f89-4303-0410-b956-a3cf2f4a3e73 Revision: 41613 Node Kind: directory Schedule: normal Last Changed Author: nbd Last Changed Rev: 41599 Last Changed Date: 2014-07-13 12:24:34 +0200 (Sun, 13 Jul 2014)
After some problems and remembering I did flashing of a new image and this is the first boot:
CFE version 1.0.37 for BCM947XX (32bit,SP,LE) Build Date: ¥| 7¤ë 26 16:41:16 CST 2007 (root@localhost.localdomain) Copyright (C) 2000,2001,2002,2003 Broadcom Corporation. Initializing Arena Initializing Devices. et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.23.0 rndis0: Broadcom USB RNDIS Network Adapter (P-t-P) et1: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 3.90.23.0 CPU type 0x29006: 264MHz Total memory: 33554432 KBytes Total memory used by CFE: 0x80800000 - 0x8089B840 (636992) Initialized Data: 0x808319B0 - 0x80834090 (9952) BSS Area: 0x80834090 - 0x80835840 (6064) Local Heap: 0x80835840 - 0x80899840 (409600) Stack Area: 0x80899840 - 0x8089B840 (8192) Text (code) segment: 0x80800000 - 0x808319B0 (203184) Boot area (physical): 0x0089C000 - 0x008DC000 Relocation Factor: I:00000000 - D:00000000 Device eth0: hwaddr 00-23-54-05-14-E0, ipaddr 192.168.1.1, mask 255.255.255.0 gateway not set, nameserver not set Null Rescue Flag. Reading :: TFTP Server. Failed.: Timeout occured Loader:raw Filesys:raw Dev:flash0.os File: Options:(null) Loading: .. 3712 bytes read Entry at 0x80001000 Closing network. Starting program at 0x80001000 [ 0.000000] Linux version 3.10.44 (zito@bobek) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r41599) ) #1 Sun Jul 13 16:404 [ 0.000000] CPU revision is: 00029006 (Broadcom BMIPS3300) [ 0.000000] bcm47xx: using ssb bus [ 0.000000] ssb: Found chip with id 0x4704, rev 0x09 and package 0x00 [ 0.000000] Unsupported SPROM revision 0 detected. Will extract v1 [ 0.000000] ssb: Sonics Silicon Backplane found at address 0x18000000 [ 0.000000] MIPS: machine is Asus WL500W [ 0.000000] Determined physical RAM map: [ 0.000000] memory: 02000000 @ 00000000 (usable) [ 0.000000] Initrd not found or empty - disabling initrd [ 0.000000] Zone ranges: [ 0.000000] Normal [mem 0x00000000-0x01ffffff] [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00000000-0x01ffffff] [ 0.000000] Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes. [ 0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 [ 0.000000] Kernel command line: noinitrd console=ttyS0,115200 [ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes) [ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) [ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.000000] Memory: 29128k/32768k available (2311k kernel code, 3640k reserved, 573k data, 180k init, 0k highmem) [ 0.000000] NR_IRQS:128 [ 0.070000] Calibrating delay loop... 262.96 BogoMIPS (lpj=1314816) [ 0.070000] pid_max: default: 32768 minimum: 301 [ 0.070000] Mount-cache hash table entries: 512 [ 0.070000] NET: Registered protocol family 16 [ 0.100000] bio: create slab <bio-0> at 0 [ 0.120000] Switching to clocksource MIPS [ 0.430000] PCI host bridge to bus 0000:00 [ 0.430000] pci_bus 0000:00: root bus resource [mem 0x40000000-0x7fffffff] [ 0.430000] pci_bus 0000:00: root bus resource [io 0x0100-0x07ff] [ 0.430000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff] [ 0.430000] ssb: PCI: Fixing up bridge 0000:00:00.0 [ 0.430000] ssb: PCI: Fixing up device 0000:00:00.0 [ 0.430000] ssb: PCI: Fixing latency timer of device 0000:00:00.0 to 168 [ 0.440000] pci 0000:00:02.0: BAR 0: assigned [mem 0x40000000-0x40003fff] [ 0.440000] pci 0000:00:03.2: BAR 0: assigned [mem 0x40004000-0x400040ff] [ 0.440000] pci 0000:00:03.0: BAR 4: assigned [io 0x0400-0x041f] [ 0.440000] pci 0000:00:03.1: BAR 4: assigned [io 0x0420-0x043f] [ 0.450000] PCI: Enabling device 0000:00:02.0 (0000 -> 0002) [ 0.450000] ssb: PCI: Fixing up device 0000:00:02.0 [ 0.490000] ssb: Found chip with id 0x4321, rev 0x01 and package 0x01 [ 0.580000] ssb: Sonics Silicon Backplane found on PCI device 0000:00:02.0 [ 0.580000] NET: Registered protocol family 2 [ 0.580000] TCP established hash table entries: 512 (order: 0, 4096 bytes) [ 0.580000] TCP bind hash table entries: 512 (order: -1, 2048 bytes) [ 0.580000] TCP: Hash tables configured (established 512 bind 512) [ 0.580000] TCP: reno registered [ 0.580000] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.580000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.590000] NET: Registered protocol family 1 [ 0.600000] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.600000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc. [ 0.600000] msgmni has been set to 56 [ 0.600000] io scheduler noop registered [ 0.600000] io scheduler deadline registered (default) [ 0.600000] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled [ 0.620000] serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A [ 0.970000] console [ttyS0] enabled [ 1.000000] serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A [ 1.010000] physmap platform flash device: 02000001 at 1c000000 [ 1.020000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x001301 [ 1.030000] Amd/Fujitsu Extended Query Table at 0x0040 [ 1.030000] Amd/Fujitsu Extended Query version 1.3. [ 1.040000] number of CFI chips: 1 [ 1.050000] 6 bcm47xxpart partitions found on MTD device physmap-flash.0 [ 1.060000] Creating 6 MTD partitions on "physmap-flash.0": [ 1.070000] 0x000000000000-0x000000040000 : "boot" [ 1.080000] 0x000000040000-0x0000007f0000 : "firmware" [ 1.090000] 0x00000004001c-0x00000004090c : "loader" [ 1.100000] 0x00000004090c-0x000000142000 : "linux" [ 1.100000] mtd: partition "linux" must either start or end on erase block boundary or be smaller than an erase block -- forciny [ 1.120000] 0x000000142000-0x0000007f0000 : "rootfs" [ 1.130000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forciy [ 1.140000] mtd: device 4 (rootfs) set to be root filesystem [ 1.150000] mtd: partition "rootfs_data" created automatically, ofs=0x300000, len=0x4f0000 [ 1.160000] 0x000000300000-0x0000007f0000 : "rootfs_data" [ 1.170000] 0x0000007f0000-0x000000800000 : "nvram" [ 1.190000] libphy: Fixed MDIO Bus: probed [ 1.200000] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled (30 seconds, Software Timer) [ 1.210000] GPIO_WDT: failed to register misc device [ 1.210000] TCP: cubic registered [ 1.220000] NET: Registered protocol family 17 [ 1.220000] 8021q: 802.1Q VLAN Support v1.8 [ 1.240000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4. [ 1.250000] Freeing unused kernel memory: 180K (802d3000 - 80300000) procd: Console is alive procd: - watchdog - [ 4.380000] b44: Broadcom 44xx/47xx 10/100 PCI ethernet driver version 2.0 [ 4.390000] libphy: b44_eth_mii: probed [ 4.470000] b53_common: found switch: BCM5325, rev 0 [ 4.480000] b44 ssb0:0: attached PHY driver [Broadcom B53 (1)] (mii_bus:phy_addr=1:1e) [ 4.480000] b44 ssb0:0 eth0: Broadcom 44xx/47xx 10/100 PCI ethernet driver 00:23:54:05:14:e0 [ 4.500000] libphy: b44_eth_mii: probed [ 4.500000] b44 ssb0:1: could not find PHY at 4, use fixed one [ 4.510000] b44 ssb0:1: attached PHY driver [Generic PHY] (mii_bus:phy_addr=fixed-0:00) [ 4.520000] b44 ssb0:1 eth1: Broadcom 44xx/47xx 10/100 PCI ethernet driver 00:23:54:05:14:e0 procd: - preinit - [ 4.870000] b44 ssb0:0 eth0: Link is down [ 5.880000] b44 ssb0:0 eth0: Link is down [ 6.480000] b44 ssb0:0 eth0: Link is up at 100 Mbps, full duplex [ 6.480000] b44 ssb0:0 eth0: Flow control is off for TX and off for RX Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level jffs2 is not ready - marker found [ 10.770000] b44 ssb0:0 eth0: powering down PHY procd: - early - procd: - watchdog - [ 11.590000] b44 ssb0:0 eth0: Link is down procd: - ubus - procd: - init - Please press Enter to activate this console. [ 15.510000] NET: Registered protocol family 10 [ 16.360000] wl: module license 'unspecified' taints kernel. [ 16.360000] Disabling lock debugging due to kernel taint [ 16.490000] SSB/BCMA glue driver successfully attached [ 16.500000] ssb: PCI: Fixing up device 0000:00:02.0 [ 16.580000] wl0: Broadcom BCM4329 802.11 Wireless Controller 5.10.56.27 [ 16.620000] nf_conntrack version 0.5.0 (457 buckets, 1828 max) [ 16.640000] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 16.680000] ip_tables: (C) 2000-2006 Netfilter Core Team [ 16.950000] xt_time: kernel timezone is -0000 [ 16.980000] PPP generic driver version 2.4.2 [ 16.990000] NET: Registered protocol family 24 [ 23.510000] b44 ssb0:0 eth0: Link is down [ 23.520000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 24.520000] b44 ssb0:0 eth0: Link is down [ 24.760000] b44 ssb0:0 eth0: Link is up at 100 Mbps, full duplex [ 24.760000] b44 ssb0:0 eth0: Flow control is off for TX and off for RX [ 24.780000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 28.870000] b44 ssb0:0 eth0: powering down PHY [ 28.910000] b44 ssb0:0 eth0: Link is down [ 28.930000] b44 ssb0:0 eth0: Link is down [ 28.930000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 28.990000] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready [ 29.010000] device eth0.1 entered promiscuous mode [ 29.010000] device eth0 entered promiscuous mode [ 29.050000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready [ 29.160000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready [ 29.760000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 [ 29.820000] jffs2_build_filesystem(): unlocking the mtd device... done. [ 29.820000] jffs2_build_filesystem(): erasing all blocks after the end marker... [ 29.930000] b44 ssb0:0 eth0: Link is down [ 30.910000] b44 ssb0:0 eth0: Link is up at 100 Mbps, full duplex [ 30.910000] b44 ssb0:0 eth0: Flow control is off for TX and off for RX [ 30.940000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 30.950000] br-lan: port 1(eth0.1) entered forwarding state [ 30.950000] br-lan: port 1(eth0.1) entered forwarding state [ 30.960000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready [ 30.970000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready [ 31.000000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready [ 32.950000] br-lan: port 1(eth0.1) entered forwarding state done. [ 71.910000] jffs2: notice: (738) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 or.
I hit enter then...
BusyBox v1.22.1 (2014-07-13 16:33:59 CEST) built-in shell (ash) Enter 'help' for a list of built-in commands. _______ ________ __ | |.-----.-----.-----.| | | |.----.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M ----------------------------------------------------- BARRIER BREAKER (Bleeding Edge, r41599) ----------------------------------------------------- * 1/2 oz Galliano Pour all ingredients into * 4 oz cold Coffee an irish coffee mug filled * 1 1/2 oz Dark Rum with crushed ice. Stir. * 2 tsp. Creme de Cacao ----------------------------------------------------- root@OpenWrt:/# brctl show bridge name bridge id STP enabled interfaces br-lan 7fff.0023540514e0 no eth0.1 root@OpenWrt:/# cat /etc/config/ dhcp dropbear firewall network system wireless root@OpenWrt:/# cat /etc/config/network config switch 'eth0' option name 'eth0' option reset '1' option enable_vlan '1' config switch_vlan 'eth0_1' option device 'eth0' option vlan '1' option ports '1 2 3 4 5t' config switch_vlan 'eth0_2' option device 'eth0' option vlan '2' option ports '0 5t' config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd6d:5aa5:265d::/48' config interface 'lan' option ifname 'eth0.1' option force_link '1' option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' config interface 'wan' option ifname 'eth0.2' option proto 'dhcp' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6'
I can't ping 192.168.1.1 from my notebook still :(.
nvram show is long - I will attach this as text file without passwords.
--
Zito
comment:11 Changed 4 years ago by vaclav.ovsik@…
Heh,
I have looked at the switch configuration more closely:
root@OpenWrt:/tmp# swconfig dev eth0 show Global attributes: enable_vlan: 1 ports: 0x002f Port 0: pvid: 2 link: port:0 link:up speed:100baseT full-duplex auto Port 1: pvid: 1 link: port:1 link:down Port 2: pvid: 1 link: port:2 link:down Port 3: pvid: 1 link: port:3 link:down Port 4: pvid: 1 link: port:4 link:down Port 5: pvid: 0 link: port:5 link:up speed:100baseT full-duplex VLAN 1: ports: 1 2 3 5t VLAN 2: ports: 0 5t
After unplugging cable from LAN1 (port 0) and plugging it into LAN2 (port 1) I can ping now!
bobek:~# ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. 64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.08 ms 64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.917 ms 64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.934 ms
So I'm a bit confused.
Where is the port 4 (WAN probably?)
I hope 0, 1, 2, 3 should be LAN and 4 should be WAN?
So maybe the original problem is solved, but a bit different problem with port to VLAN assignment is here...
--
Zito
comment:12 Changed 4 years ago by hauke
- Resolution set to fixed
- Status changed from accepted to closed
This should be fixed in r41663.
comment:13 Changed 4 years ago by jow
- Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07
Milestone Attitude Adjustment 12.09 deleted
Could you please attach your network configuration (file /etc/config/network ) and the output of "nvram show" to this ticket from the working OpenWRT 12.09-rc1.