Hi there, i'm new comer. I'm using Newifi D2 Openwrt.
I connected my D2 to main router by LAN port and turned off DHCP. So now i have to install something, the first i need to check update but when i type "opkg update" what i got back then...
Is it "AP mode" cause that errors? Please help me out, thanks so much.
You probably haven't defined the gateway, so the device doesn't know how to get to the internet.
I'm using internet normally when access wifi in D2 or LAN cable, just SSH can't check "opkg update".
right... the issue is that the D2 device (which is serving as an AP) itself does not know how to get to the internet. The devices connected by wifi to this device are probably getting DHCP assignments that include the gateway information, but if you defined the LAN address on the D2 manually, my guess is that you didn't give it the gateway address (it isn't typically necessary in AP mode unless/until you attempt to do something the requires internet access directly on that device)
Hi there, you're right, i got some issue about gateway, some my devices use wifi on D2, can't connect internet, i have to reboot but just minutes everything can't connect again. So can you help me about that, i mean i used 2 router, but in D2 i setup smb to get files from HDD storage.
Hey there, can you help me in private message to me explain clearly my situation.
It's pretty easy, actually. If you are most comfortable with LuCI (web interface), just go to network > interfaces and then click the edit button next to your LAN. You'll see the IPv4 gateway field -- just enter in the LAN address of your main router (frequently 192.168.1.1, but obviously enter the address that is relevant in your situation). Enter the same thing into the DNS server field in most cases (unless you prefer to use an alternate DNS server). And in most cases, your subnet mask will be 255.255.255.0.
I've uploaded an example from my network -- I set the OpenWrt device with an address 10.0.1.250, my main router is 10.0.1.1. You can see from the picture below what it should look like (generally speaking -- your addresses will almost certainly be different).
If you're working with the command line and/or editing the config files directly, the /etc/config/network file will contain the net mask, gateway, and dns entries as shown in the example snippet from LAN section of the file:
config interface 'lan'
option type 'bridge'
option ifname 'eth0.2'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option gateway '10.0.1.1'
option ipaddr '10.0.1.250'
list dns '10.0.1.1'
I'd like CLI config than by GUI, but i don't know how to use, is it just cd /etc/config/network? i can't cd to network or have to use "nano" to edit.
the file is:
the VI editor is installed by default, so if you're okay with VI, you can edit the file that way.
Or copy the file via scp to your computer and then back again after you're done editing.
There are also UCI commands to do this, but I actually just do LuCI or direct editing, depending on the situation.
Thanks so much, i have done. Thanks for your help.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.