No internet connection! please advise me on this issue

I have an issue on internet connection.
I got an OpenWrt Router from our partner for our project.

  1. I am able to access to router through ssh.
  2. There is no issue on LAN side because I am able to ping.
  3. However, there is no internet connection.
    I connected WAN port to our internal local network for the internet.

I am not a network guy. I need your advice.
I know that WAN and LAN IP has to be in the same range.
Current setting is 192.168.1.254 / 192.168.0.254.
I attached the screenshot of the configuration.

Please let me know what I have to do.

Best regards,
Thanks.

1 Like

Thank you for your advice.
But I cannot access to to /etc/config/network to change my network configuration. Is there any other way?

Best regards

fwiw, it may help if you tell us what router you are using?

As 18.06.0 is installed, is LuCI web ui working with a web browser to enable you to manage the router at its LAN IP address ?

If you must use SSH and are familiar with 'vi' editor, you can execute:

vi /etc/config/network

https://openwrt.org/docs/guide-user/base-system/user.beginner.cli

2 Likes

Thank you for your advice.
The name of the Router is RG450G, and I can access to router through the only ssh.
As you suggested, I executed vi /etc/config/network as below.

And my computer's ip configuration is as below.
I want to connect my computer to this router for some experiment (traffic control)

  • I connected LAN port of Router to my laptop (Enthernet 4)
  • I keep the internet cable on my computer to show you what is our local ip address for internet.

  1. My question is that do I have to set my router's gateway ip as 10.157.8.1 (Standardgateway)?
  2. As you know that my access to /etc/config/network is denied. Is there any other way to change network configuration?

Thank you again.

Best Regards
Seongsu Byeon

As suggested above, you need to edit your /etc/config/network file e.g. using the vi editor. Here's some intro to the vi editor that might be useful.

1 Like

If you wish to assign a valid static IP address to the WAN interface of the router (if DHCP is not available). The current 192.168.1.254 may be invalid without knowing more about your infrastructure.

You just need to add a valid 'option gateway' entry, and you probably need a 'option dns' too.

Example:

config interface 'wan'
        option ifname 'eth0'
        option proto 'static'
        option netmask '255.255.255.0'
        option gateway '10.157.8.1' # gateway address
        option dns '8.8.8.8' # example DNS
        option ipaddr '10.157.8.200' # example static IP address

I don't know why you think you have no access to /etc/config/network file. If you are a Windows user, you may wish to download the HH5a install guide and study section 10 for beginners advice to using 'vi' editor or 'WinSCP' to edit the file.
https://openwrt.ebilan.co.uk/viewtopic.php?f=7&t=266

The Windows command 'ipconfig /all' will reveal more information btw.

1 Like

I really thank you for your advice. I was able to learn many things
As you suggested, I added option gateway ip and dns on WAN as below!

However, this update is now shown on the routing table as below. And there is still no internet connection.

Is there anything I missed?
I believe that I inserted correct IP address for gateway and dns.
I checked DNS IP as below.

dns

I need your advice.
Thank you for your time
Best regards
Byeon seongsu

service network restart

Thank you for your comment.
I restarted network and updated routing table.
But There is no still internet connection.

Thank you again for your comment
Best regards
Seongsu byeon

can you ping the gateway 192.168.1.1 ?

fwiw, are you sure 192.168.1.1 is the gateway?

Can you remove & replace your router with your Windows PC and provide output from 'ipconfig /all' command to see how it connects to internet?

1 Like

Thank you again for your reply.

  1. its not possible to ping to 192.168.1.1.

  2. I set this gateway ip address within WAN range. As far as I know, gateway ip range has to be within WAN range. If I am wrong, please let me know.

  3. There was no any default gateway ip on the router when I received it.

  4. I attached screen shot from my window pc.

I really thank you for your feedback.

Best regards
Byeon seongsu

Which Ethernet interface of your Windows PC is wired to your internal LAN router which provides your internet access ?

I cannot see any reference to 192.168.1.x subnet.

If it is 'Ethernet 2', the PC is obtaining IP address info using DHCP using LAN address subnet 10.157.8.x.

You therefore may wish to considering seeing if DHCP works (instead of static IP) on the openwrt router if it is to be connected to same 10.157.8.x subnet.

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'

Thank you for your advice!!

yes! Ethernet2 is connected to internal LAN rounter.
Should I delete all config from 'wan interface' and rewrite only ifname and proto ?

Best Regards
Byeon Seongsu

yes, delete all config info in wan interface section, if you wish to try DHCP. (It assumes DHCP client is available on the openwrt router).

Alternatively, as a quick test, try these static settings. Make sure 10.157.8.200 is not in use!

config interface 'wan'
        option ifname 'eth0'
        option proto 'static'
        option netmask '255.255.255.0'
        option gateway '10.157.8.1' # gateway address
        option dns '10.157.8.10' 
        option ipaddr '10.157.8.200' # example static IP address

I cannot find any info about RG450G (Microtik make a RB450G)

Thank you!
I followed second option with static ip address as below.
I am able to ping gateway and google public DNS server (8.8.8.8)
But not a web-page.
I have one question.
Can I update packages with this setting?

Thank you very much for your feedback.
My mistake was to set wrong default ip address.

Best regars
Byeon Seongsu

When using SSH, if 'ping 8.8.8.8' is successful but 'ping dns.google' fails, there seems to be a problem with DNS on the openrouter? I presume you tried turning router off and on :slight_smile:

Can you try using this in 'wan interface' to see if it makes any difference?

option dns '8.8.8.8' 

I can't find any info about RG450G so cannot comment on your 'update package' question, but you need to fix the DNS issue in first instance.

Did you perhaps have a Microtik RB450G? Someone much more knowledgeable may be able to answer your question.

I am also puzzled why LuCI web ui is not working if OpenWrt 18.06.0 is installed unless it is a 'custom built' image and is missing features....

Thank you!

I set dns as 8.8.8.8.
Before I change dns, it was possible to ping both 8.8.8.8 and www.google.com
However, it is not possible to ping with dns 8.8.8.8.
I am trying to find a way :sob::sob:

Best regards
Byeon Seongsu

head -n -0 /etc/resolv.* /tmp/resolv.*
1 Like

Thank you for your comment.

As you suggested, I checked that command as below.

Best regards
Thanks