Opkg update fail (double NAT, same subnet)

Hi All,

The opkg update fails with 'random' packages. Meaning, it fails with the routing pkg. then i run it again, it fails with the luci pkg, or a .sig file. It keeps failing for one or maybe 2 packages at a time.

I already installed the factory.bin, then i installed luci, then sysupgrade through luci, then ssh and install luci again won't work. Now I scp'd the firmware and tried the opkg update but it keeps failing.

I am trying to do this on a DIR-842 C1 with an ISP provided router (PPPOE, gigabit fiber) connected to the WAN port of the Dlink.

Could you please help me figure out the issue here?

What is the specific error message you are seeing?
Can you reach the internet in general from either a device connected to the router or from the router itself?

what do you get if you issue (first from a device connected to the router, and then testing from an ssh session into the router itself):

ping 8.8.8.8
ping downloads.openwrt.org
1 Like

Extra info: I just figured out that my ISP provided router gave the 192.168.1.2 address to the dlink when connected, the same ip I set the eth ipv4 to on the laptop (as per the guide).

When trying to reach the internet (eth through dlink - wifi disabled so not connected to the ISP router) websites open, but some parts mising, or loads slow.

When pinging from laptop through dlink eth:

Pinging 8.8.8.8 with 32 bytes of data:
Request timed out.
Reply from 8.8.8.8: bytes=32 time=3ms TTL=117
Reply from 8.8.8.8: bytes=32 time=3ms TTL=117
Reply from 8.8.8.8: bytes=32 time=3ms TTL=117

Ping statistics for 8.8.8.8:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 3ms, Average = 3ms


Pinging mirror-02.infra.openwrt.org [168.119.138.211] with 32 bytes of data:
Reply from 168.119.138.211: bytes=32 time=35ms TTL=53
Reply from 168.119.138.211: bytes=32 time=35ms TTL=53
Reply from 168.119.138.211: bytes=32 time=35ms TTL=53
Reply from 168.119.138.211: bytes=32 time=34ms TTL=53

Ping statistics for 168.119.138.211:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 34ms, Maximum = 35ms, Average = 34ms

When pinging from ssh on dlink:

--- 8.8.8.8 ping statistics ---
6 packets transmitted, 6 packets received, 0% packet loss
round-trip min/avg/max = 2.914/2.956/2.982 ms
root@OpenWrt:~# ping downloads.openwrt.org
ping: bad address 'downloads.openwrt.org'
root@OpenWrt:~#

This happens when trying to install luci:


Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/snapshots/packages/mips_24kc/luci/luci-lib-base_git-20.232.39649-1f6dc29_all.ipk, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_install_pkg: Failed to download luci-lib-base. Perhaps you need to run 'opkg update'?
 * opkg_install_cmd: Cannot install package luci.

Convert dlink to dumb AP, or change its LAN subnet to something else than 192.168.1, and connect using the WAN port.

2 Likes

Please ellaborate. I am no noob but not exactly a pro either.

Eventually I want to use my ISP router in bridge mode and use the Dlink with openwrt to serve as my router with all its features.

Then change the dlink LAN interface to 192.168.2.0, and keep it connected via the WAN port.

Once it's done, internet should start to work normally again.

2 Likes

You have the same subnet 192.168.1.x on both LAN and wan side of the dlink. That confuses the router (and can lead to intermittent packet loss). Double NAT but incorrectly configured.

The easiest solution is to continue with double NAT but correct the invalid identical subnet, like frollic suggests.

(Note that your problems have nothing to do with opkg but instead with the basic routing settings)

1 Like


After this i save and /etc/init.d/network restart?

Thank you both! Works like a charm!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.