[Solved] Newbie: Why this opkg fail?

Hi guys, my first post here. I have a lot of Linux and Mac experience but I'm new to working on remote servers via PuTTY.

I just installed LEDE on an out-of-the-box GL.inet MT300A. As per instructions, I linked to the MT300A via an Ethernet cable and used the onboard software to flash the LEDE image. The upgrade went fine and the device is now running on my home network via an Ethernet lead into the house router.

I'm now proceeding with the installation of a LAMP stack as per the instructions on this site. uhttpd was installed during the upgrade and is running well. I moved on to PHP installation, but it seems that opkg can't access the repository, although I can see it fine from the same network. I can't easily copy-paste the PuTTY output on this computer, but what I get is four successive instances of 'Failed to establish connection' -- presumably for four URLs -- plus a 'collected errors' section that confirms the four fails.

Sorry if this is a boring question, but it's pretty live for me (and isn't in the FAQ...)

Best, NP

First guess:
you have defined a static IP address for the new router, but you have forgotten to define DNS and gateway, which likely should be the main router of your network.

Thanks, Hnyman. Like I said, I'm clueless about networking, so I had expected those to be assigned automatically by the house router, as I imagine they are for client PCs. So, I need to explicitly specify DNS and gateway to the MT300A? Best, NP

Depends on your network settings...

Likely all the client devices use DHCP to get the IP address from the main router, and they get DNS and gateway at the same time.

But if you have explicitly defined an IP address for the MT300A and it does nto use DHCP, then you naturally need to specify also the gateway and DNS server address for it.

Hi all and especially Hnyman,

I'm embarrassed to be asking this question, as I could likely answer it for myself with Googling and experimentation. But I imagine that an experienced LEDE user could look at my configuration and tell me the cause of my problem in 30 seconds. So, if anyone wants to save me a couple of hours...

My home network is an out-of-the-box British Telecom router in default settings. It has a local IP address of and is configured for a gateway at and DNS at

I just added a LEDE-equipped GL.inet MT300A at I can see it on the local network, and can access its webserver. But it can't see the LEDE repository on the Internet, despite my careful UCI setup.

Here's the output of uci show network. What am I doing wrong?

network.@switch_vlan[0].ports='1 2 3 4 6t'
network.@switch_vlan[1].ports='0 6t'


  • ...are you saying that the LAN on the British Telecom router AND the LAN on the LEDE are:
  • Did you connect the LEDE via a LAN port, or the WAN port?

If both LANs have the same network range, you will have to renumber one of them.

Hi Ileachii, thank you for your fast reply. I'm in an awkward position, as I understand some server concepts very well but know very little of IP networking. (I think the LEDE documentation assumes that everyone knows IP.) So, in answer to your question:

The IP address of the BT router is presently
The IP address of the GL/LEDE router is
The GL/LEDE router is connected through the LAN port.

I can change the settings on the LEDE easily, but I'm shooting in the dark. Any guidance would be very welcome.

Best, NP

While this configuration allows for a LAN connection with you BT router...your problem will only be solved by setting a gateway in the LEDE LAN interface to (the IP of the BT router's LAN).


You don't have the WAN port of the LEDE connected, and that's the default configuration on most routers for Internet access. Simply add a gateway IP to the LEDE's LAN.

Hi Ileachii,

That would be: network.lan.gateway='’ ...?

I already made that setting. You can see it as part of the output of uci show network above. What am I doing wrong?

I guess I should spell out that the objective is to set up the GL/LEDE as a self-contained LAN webserver for development. But it will need Internet access for the installation of Open WRT components like PHP and so on.

Best, NP

Describe all connections to the LEDE:

  • Where is your computer connected?
  • Where is the BT router connected?

Thanks, Ileachii, you're very patient.

The BT router is connected to the phone line. Until today, that was its only hardware connection -- all devices in the house connected to it via wireless.

As of this afternoon, it is linked via one of its four ethernet ports to the LAN port of the GL/LEDE router.

Any suggestions welcome, and apologies if I'm doing something crass here...

Best, NP

You have not assigned a DNS server address for lan.
Likely it should be the main router,

So, there router itself can't find addresses.

Thanks, Hnyman, that is much appreciated. I'll try to implement now... Best, W.

If I read you explanation correctly, you have the main router at, new LEDE router at, their LAN ports are connected with wired cable. You have set gateway, but not DNS for that LAN in the LEDE router. Otherwise it looks ok at the first glance.

If you connect this way with LAN ports, the WAN port in LEDE router is unused and your config there has no actual impact.

1 Like

Hnyman, that worked first time. Can't thank you enough -- I would have got it eventually, but I reckon you saved me half a day of Googling and experimentation. Good luck and I hope to return the favour sometime. Best, W.

Did you notice that I gave that advice also already in my first message...

It is a rather typical mistake, when somebody adds a new router with statics address to an existing network.

1 Like

Yeah, I did note that. One of the problems about straying into (relatively) specialist territory is not having the basic concepts needed to make sense of the good advice. You just grab what you can and hope not to waste too much of people's time. You've been very patient1 Best, NP.

1 Like