Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2740 - 19.07 ath79 uclient-fetch defaults fail in IPv4-only environment. #8583

Closed
openwrt-bot opened this issue Jan 15, 2020 · 5 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

gerardr1:

I have a TP-Link Archer C7 v2.0, that's currently running the ath79 19.07. When trying to install other packages after the initial upgrade, 'opkg update' failed on each repository with a 'wget' error. I can work around this with the following commands:

mv /bin/uclient-fetch /bin/uclientfetch echo '#!/bin/sh' > /bin/uclient-fetch echo 'exec /bin/uclientfetch -4 !*' >> /bin/uclient-fetch chmod 755 /bin/uclient-fetch

so I presume that it's trying to operate in IPv6 mode first and failing. After running the commands above, subsequent 'opkg update' commands work without error.

Here's a quick run to illustrate:

root@grdl:~# uclientfetch 'http://www.google.com/' Downloading 'http://www.google.com/' Failed to establish connection root@grdl:~# uclientfetch -4 'http://www.google.com/' Downloading 'http://www.google.com/' Connecting to 172.217.3.100:80 Writing to 'index.html'

Download completed (11751 bytes)
root@grdl:~# uname -a
Linux grdl 4.14.162 #0 Mon Jan 6 16:47:09 2020 mips GNU/Linux

@openwrt-bot
Copy link
Author

bjonglez:

Please share more information on your network setup when uclient-fetch fails:

# ip addr show # ip -6 route show # ip -6 rule show # ifstatus wan6

Make sure to anonymize your IP addresses.

@openwrt-bot
Copy link
Author

gerardr1:

A couple of notes, first.

My router is located behind an ISP-supplied router, so I give my router's LAN interface an IPv4 address of 192.168.2.1. When first started after installing a 'sysupgrade.bin' file (keeping the config), my router does not have an eth1.1 interface. After installing some additional packages and rebooting (and thereafter all following reboots), OpenWRT insists on creating that eth1.1 interface and assigning it 192.168.1.1, confusing the routing, since the ISP-supplied router gives my router's WAN interface an address of 192.168.1.11. I created a startup script that changes eth1.1 to 192.168.3.1, which you'll see in the output below. Hopefully, I don't have to anonymize the 192.168.x.x addresses.

=== ip addr show === 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc fq_codel state UP qlen 1000 link/ether xx:xx:9f:73:4a:7b brd ff:ff:ff:ff:ff:ff inet 192.168.1.11/24 brd 192.168.1.255 scope global eth0 valid_lft forever preferred_lft forever 3: eth1: mtu 1500 qdisc fq_codel master br-lan state UP qlen 1000 link/ether xx:xx:9f:73:4a:7a brd ff:ff:ff:ff:ff:ff 4: eth1.1@eth1: mtu 1500 qdisc noqueue state UP qlen 1000 link/ether xx:xx:9f:73:4a:7a brd ff:ff:ff:ff:ff:ff inet 192.168.3.1/24 brd 192.168.3.255 scope global eth1.1 valid_lft forever preferred_lft forever inet6 fe80::xxxx:9fff:fe73:4a7a/64 scope link valid_lft forever preferred_lft forever 6: wlan1: mtu 1500 qdisc noop state DOWN qlen 1000 link/ether xx:xx:9f:73:4a:7a brd ff:ff:ff:ff:ff:ff 7: br-lan: mtu 1500 qdisc noqueue state UP qlen 1000 link/ether xx:xx:9f:73:4a:7a brd ff:ff:ff:ff:ff:ff inet 192.168.2.1/24 brd 192.168.2.255 scope global br-lan valid_lft forever preferred_lft forever 8: wlan0: mtu 1500 qdisc noqueue master br-lan state UP qlen 1000 link/ether xx:xx:9f:73:4a:79 brd ff:ff:ff:ff:ff:ff inet6 fe80::xxxx:9fff:fe73:4a79/64 scope link valid_lft forever preferred_lft forever === ip -6 route show === fe80::/64 dev eth1.1 metric 256 fe80::/64 dev wlan0 metric 256 anycast fe80:: dev eth1.1 metric 0 anycast fe80:: dev wlan0 metric 0 ff00::/8 dev eth1.1 metric 256 ff00::/8 dev wlan0 metric 256 === ip -6 rule show === 0: from all lookup local 32766: from all lookup main 4200000001: from all iif lo lookup unspec 12 4200000002: from all iif eth0 lookup unspec 12 4200000007: from all iif br-lan lookup unspec 12 === ifstatus wan6 === Interface wan6 not found

@openwrt-bot
Copy link
Author

bjonglez:

I don't see any IPv6 address/route that could explain the issue you have (except that you don't have any link-local IPv6 addresses on WAN and LAN, but I tested this and uclient-fetch works anyway)

I suggest you cleanup your network setup and try again, because it looks like a mess. If eth1.1 appears, it's because it's defined in your network configuration, this is what you need to change, not hack some startup script.

@openwrt-bot
Copy link
Author

gerardr1:

Hmm ... regarding eth1.1, I just found where it is in the /tmp/board.json file. It is not in any file in /etc/config (or /etc/... for that matter, except that startup script I wrote). Even if I edit or delete the /tmp/board.json file (attached), eth1.1 returns there after reboot.

Back to 'uclient-fetch', note that immediately after applying 'sysupgrade.bin', there is no eth1.1, but uclient-fetch still only works with the '-4' flag.

@openwrt-bot
Copy link
Author

gerardr1:

OK, I decided to sysupgrade to 19.07.1 (thanks for that release), but without saving the config. I then changed just the IP address of the LAN to 192.168.2.1 and rebooted. The router became inaccessible. I tried this a couple of times, with the same result. Unfortunately, I cannot get into the router to list the interfaces. So, I then tried a tftp reflash, switching my PC successfully first to the tftpd address 192.168.0.66 and then from there to 192.168.1.66 so I could talk to the reflashed router, using the same mechanism that I used during the sysupgrade/failsafe-mode sequences to shift back and forth from 192.168.2.66 and 192.168.1.66 (basically arguing that the router's handling of 192.168.2.1 was the issue).

After the tftp reflash, I decided to try 192.168.0.1 for the router address. For some reason that works, and it was easy to change the host and domain entries of the dhcp config file to match that network. Note that I did not change the basics of the new dhcp config, just added through 'vi' the modified domain and host entries from the old file. I now have a working environment.

Note that by default there are two VLANs created for TP-Link Archer C7 V2, eth0.2 and eth1.1. Below is the output of the same commands that you requested above. I'm not sure what to do about the 'ip -6 route show' error. 'unreachable fd06:3708:a18d::/48 dev lo metric 2147483647 error -148'. I think I should open a bug on the inaccessibility of 192.168.2.1, though.

=== ip addr show === 1: lo: mtu 65536 qdisc noqueue state UNKNOWN qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: mtu 1500 qdisc fq_codel state UP qlen 1000 link/ether xx:xx:1f:73:4c:7b brd ff:ff:ff:ff:ff:ff inet6 fe80::xxxx:1fff:fe73:4c7b/64 scope link valid_lft forever preferred_lft forever 3: eth1: mtu 1500 qdisc fq_codel state UP qlen 1000 link/ether xx:xx:1f:73:4c:7a brd ff:ff:ff:ff:ff:ff inet6 fe80::xxxx:1fff:fe73:4c7a/64 scope link valid_lft forever preferred_lft forever 6: wlan1: mtu 1500 qdisc noop state DOWN qlen 1000 link/ether xx:xx:1f:73:4c:7a brd ff:ff:ff:ff:ff:ff 7: br-lan: mtu 1500 qdisc noqueue state UP qlen 1000 link/ether xx:xx:1f:73:4c:7a brd ff:ff:ff:ff:ff:ff inet 192.168.0.1/24 brd 192.168.0.255 scope global br-lan valid_lft forever preferred_lft forever inet6 fd06:3708:a18d::1/60 scope global valid_lft forever preferred_lft forever inet6 fe80::xxxx:1fff:fe73:4c7a/64 scope link valid_lft forever preferred_lft forever 8: eth1.1@eth1: mtu 1500 qdisc noqueue master br-lan state UP qlen 1000 link/ether xx:xx:1f:73:4c:7a brd ff:ff:ff:ff:ff:ff 9: eth0.2@eth0: mtu 1500 qdisc noqueue state UP qlen 1000 link/ether xx:xx:1f:73:4c:7b brd ff:ff:ff:ff:ff:ff inet 192.168.1.11/24 brd 192.168.1.255 scope global eth0.2 valid_lft forever preferred_lft forever inet6 fe80::xxxx:1fff:fe73:4c7b/64 scope link valid_lft forever preferred_lft forever 10: wlan0: mtu 1500 qdisc noqueue master br-lan state UP qlen 1000 link/ether xx:xx:1f:73:4c:79 brd ff:ff:ff:ff:ff:ff inet6 fe80::xxxx:1fff:fe73:4c79/64 scope link valid_lft forever preferred_lft forever === ip -6 route show === fd06:3708:a18d::/64 dev br-lan metric 1024 unreachable fd06:3708:a18d::/48 dev lo metric 2147483647 error -148 fe80::/64 dev eth1 metric 256 fe80::/64 dev br-lan metric 256 fe80::/64 dev eth0 metric 256 fe80::/64 dev eth0.2 metric 256 fe80::/64 dev wlan0 metric 256 anycast fd06:3708:a18d:: dev br-lan metric 0 anycast fe80:: dev eth1 metric 0 anycast fe80:: dev eth0.2 metric 0 anycast fe80:: dev br-lan metric 0 anycast fe80:: dev eth0 metric 0 anycast fe80:: dev wlan0 metric 0 ff00::/8 dev eth1 metric 256 ff00::/8 dev br-lan metric 256 ff00::/8 dev eth0 metric 256 ff00::/8 dev eth0.2 metric 256 ff00::/8 dev wlan0 metric 256 === ip -6 rule show === 0: from all lookup local 32766: from all lookup main 4200000001: from all iif lo lookup unspec 12 4200000007: from all iif br-lan lookup unspec 12 4200000009: from all iif eth0.2 lookup unspec 12 === ifstatus wan6 === { "up": false, "pending": true, "available": true, "autostart": true, "dynamic": false, "proto": "dhcpv6", "device": "eth0.2", "data": {
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant