OpenWrt Forum Archive

Topic: network works on vmlinux but not on firmwared router

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, I got a strange issue on my Mikrotik RB951-2hnd. To firmware this device you need to bootp on initramfs-vmlinux, erase partitions, scp rootfs and copy them to device. So I booted on vmlinux and network worked fine without any issues, I was able to copy files over ssh and firmware them and didn't even notice anything suspicious.

When I rebooted to just firmwared router I found out that my laptop didn't acquire an ip address from dhcp router's server. Lucky for me I have the uart port, so I logged via serial and system works properly.  I uncomment wifi in /etc/network/wifi, and surprisingly I'm able to connect the router via wifi, ping, scp files etc. I reboot the router with serial connected and noticed that there were not any kernel error, nor logread errors either. ps shows that all required processes seem to be running.

So I dig a bit deeper. I run tcpdump on openwrt and wireshark on my laptop (previusly scp package over wifi (cause it's the only working thing in my network) and installed it).My laptop sends packages to mikrotik including dhcprequest, but router's tcpdump shows only included in code section bellow. ps. I'm using bleeding edge (latest developers revision)).

I also tried to firmware the router from downloads.openwrt.org image but it has the same issue (vmlinux-initramfs works on it too) . What should I try next? I don't even know where I should be looking for, because there're no errors. I also had been running openwrt on this device before (12.04), but I had some issues with rebooting every 5 hours nevertheless network worked perfectly.  Seems like rebooting issue is gone now.

[09:34:15.779328 IP6 fe80::d6ca:6dff:fe92:a47e > ff02::1: HBH ICMP6, multicast listener querymax resp delay: 10000 addr: ::, length 24
09:34:15.869302 IP6 fe80::d6ca:6dff:fe92:a47e > ff02::1:ff00:0: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::1:ff00:0, length 24
09:34:19.719294 IP6 fe80::d6ca:6dff:fe92:a47e > ff05::1:3: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff05::1:3, length 24
09:34:22.059297 IP6 fe80::d6ca:6dff:fe92:a47e > ff02::2: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::2, length 24
09:34:23.479305 IP6 fe80::d6ca:6dff:fe92:a47e > ff02::1:ff92:a47e: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::1:ff92:a47e, length 24
09:34:23.559283 IP6 fe80::d6ca:6dff:fe92:a47e > ff02::1:ff00:1: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::1:ff00:1, length 24
09:34:24.139291 IP6 fe80::d6ca:6dff:fe92:a47e > ff02::1:2: HBH ICMP6, multicast listener reportmax resp delay: 0 addr: ff02::1:2, length 24

up

Have you checked the switch and network configurations to make sure the ethernet port you are trying to use is in the lan and not the wan?

mk24 wrote:

Have you checked the switch and network configurations to make sure the ethernet port you are trying to use is in the lan and not the wan?

Sure, I even tried to diff rootfs on vmlinux-initramfs and live system. Those are the same. Sometimes I do receive ip address on wan, but ping throw wan doesn't work though. I tried static ip on my laptop, didn't work either. I think I just need to more tests with tcpdump or something (maybe compile image with debug info, but I don't know how to use debugging)

(Last edited by deathangel908 on 17 Feb 2015, 07:29)

up

up

up

Отпишись мне на мыло пожалуйста, есть некоторый опыт в борьбе с этой железякой
metsys@gmx.com

metsys wrote:

Отпишись мне на мыло пожалуйста, есть некоторый опыт в борьбе с этой железякой
metsys@gmx.com

Отписался!

Just firmwared chaos calmer image, Symptoms are the same, though wifi works fine.
I'm able to connect to other network in `sta` client mode and work throw wifi. Everything but physical ethernet works.

It really seems like default configuration is messed up.
iptables -L -n
/etc/config/network - 1 wan. 2-5 lan (wifi in sta client mode)

When I connect a cable kernel tells me what port has been plugged in. So 1 is wan, 2-5 lan. Not sure about 0 - should be the cpu. Just checked again tcpdump, laptop sends dhcprequest but the router didn't receive any. What the heck? Why initramfs works ok and firmwared image is broken?


After plugging laptop (dhcp client) to lan port for 15 seconds ( plug out after) I see the followings:

  • Laptop send:  3 dhcp request and 9 icmpv6

  • Laptop receive: 0 packages

  • router sends: None ? (ifconfig displays 4 packages but tcpdump doesn't catch them) 

  • router receives: 2 icmp packages from Laptop sent list (listed below)

root@OpenWrt:/# tcpdump -vv -i eth0.3
tcpdump: WARNING: eth0.3: no IPv4 address assigned
tcpdump: listening on eth0.3, link-type EN10MB (Ethernet), capture size 65535 bytes
[ 1042.060000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up
09:35:24.172637 IP6 (hlim 1, next-header Options (0) payload length: 36) :: > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, m]
09:35:25.872843 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 16) fe80::b2e3:928a:66b2:ff43 > ff02::2: [icmp6 sum ok] ICMP6, router6
          source link-address option (1), length 8 (1): 5c:f9:dd:48:9e:89
            0x0000:  5cf9 dd48 9e89

5c:f9:dd:48:9e:89 /fe80::b2e3:928a:66b2:ff43 - laptop,  d4:ca:6d:92:a4:7e / fe80::d6ca:6dff:fe92:a47e: - router

Here's the scenario for static ip
openwrt (static 192.168.2.1)

root@OpenWrt:/# ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: seq=4 ttl=64 time=0.505 ms
64 bytes from 192.168.2.2: seq=21 ttl=64 time=0.489 ms
64 bytes from 192.168.2.2: seq=34 ttl=64 time=0.528 ms
64 bytes from 192.168.2.2: seq=39 ttl=64 time=0.512 ms
64 bytes from 192.168.2.2: seq=45 ttl=64 time=0.527 ms
64 bytes from 192.168.2.2: seq=48 ttl=64 time=0.549 ms
64 bytes from 192.168.2.2: seq=51 ttl=64 time=0.813 ms
^C
--- 192.168.2.2 ping statistics ---
56 packets transmitted, 7 packets received, 87% packet loss
round-trip min/avg/max = 0.489/0.560/0.813 ms

laptop (static 192.168.2.2)

14:50:08:andrew:/home/andrew:0
: ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
From 192.168.2.2 icmp_seq=13 Destination Host Unreachable
From 192.168.2.2 icmp_seq=14 Destination Host Unreachable
From 192.168.2.2 icmp_seq=15 Destination Host Unreachable
^C
--- 192.168.2.1 ping statistics ---
100 packets transmitted, 0 received, +3 errors, 100% packet loss, time 99022ms
pipe 3
14:51:53:andrew:/home/andrew:1
: ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
^C
--- 192.168.2.1 ping statistics ---
29 packets transmitted, 0 received, 100% packet loss, time 28080ms

(Last edited by deathangel908 on 1 Jun 2015, 12:56)

Ok i finally found the reason. Initramfs wasn't the key of success It turns out that ethernet ports only work if router was booted with pressed reset button. This is really bizarre...

The discussion might have continued from here.