OpenWrt Forum Archive

Topic: Cannot access Internet in a Mesh

The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,


I am runninng  olsr on openwrt rc4 with WEP every things on lan works firm there are about 4 WRT nodes and 20 computers can easily connect to it and play multiplayer games etc.

But the main is none can access the internet only one main node (node_1) connects to the internet via WAN port
the router connecting to the internet that is node one can ping to the internet sites etc and also all the computers connected can ping to the wan port ip address.
But none of the computers can connect to the internet sad .

I have disabled firewall.

Below is some relevnt data do tell me if any other info is required :-


   1.
      -------------------------------------------------------
   2.
      IPTABLES
   3.
      -------------------------------------------------------
   4.

       
   5.
       
   6.
      root@Node_1:/# iptables -t nat -L
   7.
      Chain PREROUTING (policy ACCEPT)
   8.
      target     prot opt source               destination
   9.
       
  10.
      Chain POSTROUTING (policy ACCEPT)
  11.
      target     prot opt source               destination
  12.
       
  13.
      Chain OUTPUT (policy ACCEPT)
  14.
      target     prot opt source               destination
  15.
       
  16.
       
  17.

18.
       
  19.
      -------------------------------------------------------------------
  20.
      FROM THE ROUTER
  21.
      -------------------------------------------------------------------
  22.
   

    
  23.
      root@Node_1:/# ping www.google.com
  24.
      PING www.l.google.com (66.102.7.147): 56 data bytes
  25.
      64 bytes from 66.102.7.147: icmp_seq=0 ttl=237 time=258.1 ms
  26.
      64 bytes from 66.102.7.147: icmp_seq=1 ttl=237 time=260.2 ms
  27.
      64 bytes from 66.102.7.147: icmp_seq=2 ttl=237 time=286.0 ms
  28.
      64 bytes from 66.102.7.147: icmp_seq=3 ttl=237 time=258.3 ms
  29.
      64 bytes from 66.102.7.147: icmp_seq=4 ttl=237 time=258.7 ms
  30.
       
  31.
      --- www.l.google.com ping statistics ---
  32.
      5 packets transmitted, 5 packets received, 0% packet loss
  33.
      round-trip min/avg/max = 258.1/264.2/286.0 ms
  34.
      root@Node_1:/# ping 192.168.20.131
  35.
      PING 192.168.20.131 (192.168.20.131): 56 data bytes
  36.
      64 bytes from 192.168.20.131: icmp_seq=0 ttl=128 time=3.9 ms
  37.
      64 bytes from 192.168.20.131: icmp_seq=1 ttl=128 time=1.5 ms
  38.
      64 bytes from 192.168.20.131: icmp_seq=2 ttl=128 time=1.4 ms
  39.
      64 bytes from 192.168.20.131: icmp_seq=3 ttl=128 time=2.0 ms
  40.
      64 bytes from 192.168.20.131: icmp_seq=4 ttl=128 time=1.8 ms
  41.
       
  42.
      --- 192.168.20.131 ping statistics ---
  43.
      5 packets transmitted, 5 packets received, 0% packet loss
  44.
       
  45.
       
  46.

47.
      --------------------------------------------------------------------
  48.
      FROM MY COMPUTER
  49.
      --------------------------------------------------------------------
  50.

       
  51.
      C:\Documents and Settings\Comp17>ping www.google.com
  52.
       
  53.
      Pinging www.l.google.com [66.102.7.147] with 32 bytes of data:
  54.
       
  55.
      Request timed out.
  56.
       
  57.
      Ping statistics for 66.102.7.147:
  58.
          Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
  59.
       
  60.
       
  61.
      C:\Documents and Settings\Comp17>ping 192.168.20.1
  62.
       
  63.
      Pinging 192.168.20.1 with 32 bytes of data:
  64.
       
  65.
      Reply from 192.168.20.1: bytes=32 time=4ms TTL=63
  66.
      Reply from 192.168.20.1: bytes=32 time=3ms TTL=63
  67.
      Reply from 192.168.20.1: bytes=32 time=3ms TTL=63
  68.
       
  69.
      Ping statistics for 192.168.20.1:
  70.
          Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
  71.
      Approximate round trip times in milli-seconds:
  72.
          Minimum = 3ms, Maximum = 4ms, Average = 3ms
  73.
       
  74.      ------------------------------------------------------------

ROUTEs

root@Node_1:/# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.20.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 vlan0
60.254.58.0     0.0.0.0         255.255.254.0   U     0      0        0 vlan1
0.0.0.0         60.254.58.1     0.0.0.0         UG    0      0        0 vlan1
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 vlan0

Ok that last route was worng so i removed it and now the new route table is :

root@Node_1:/# route -n
Kernel IP routing table
Destination      Gateway         Genmask         Flags    Metric Ref    Use Iface
192.168.20.0    0.0.0.0         255.255.255.0   U           0      0        0    eth1
192.168.1.0      0.0.0.0         255.255.255.0   U           0      0        0    vlan0
60.254.58.0      0.0.0.0         255.255.254.0   U           0      0        0    vlan1
0.0.0.0           60.254.58.1    0.0.0.0             UG         0      0         0   vlan1

Still i cant connect to the internet nor ping to the gateway ip 60.254.58.1 form my computer.
while things are fine with router.
I am using DHCP ip for computer

(Last edited by little_indian on 3 Feb 2006, 14:03)

little_indian wrote:

But none of the computers can connect to the internet sad .

I have disabled firewall.

This is a really bad idea. The firewall script also sets up the dynamic SNAT to your provider IP address which is absolutely required in your setup.

Oh now i have reset the route and done things all over again.firewall on dnsmasq on.

But i now can only access the internet when i have a wired connection to the node_1 which is the router with direct connection to internet.

Also i noticed that my internet stops working when i have seperated lan and wifi and  olsr is not running else things are fine

nvram get lan_ifname
vlan0

nvram get wifi_ifname
eth1

If you seperate LAN from WIFI, you have to add some rules to /etc/firewall.user like:

#!/bin/sh

WIFI=$(nvram get wifi_ifname)

iptables -A forwarding_rule -i $WIFI -o $WAN -j ACCEPT

Hey Thanks jochen,

That really fixed the issue with node_1 now i am trying with node_2 (router) i guess something similar has to e done there too.

If i add my Node_1 ipaddr as the gatway in the subsequent nodes then the subequent nodes can access the
internet.

But if olsr is running is this necessary shouldent the routes be auto configured?

jochen wrote:
little_indian wrote:

But none of the computers can connect to the internet sad .

I have disabled firewall.

This is a really bad idea. The firewall script also sets up the dynamic SNAT to your provider IP address which is absolutely required in your setup.

oh man this post is really help full for us do it i also did it

The discussion might have continued from here.