FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
848 views 3 comments
by anonymous
Hello all,

i have the following setup

Server (ip 10.0.3.1/24) connected to RUT240 A (lan ip 10.0.3.10 / wan ip 10.21.4.10). RUT240 A has only a mobile connection. Firmware version RUT2XX_R_00.01.06.1

Client (ip 10.0.2.73/29) connected to RUT240 B (lan ip 10.0.2.78 / wan ip 10.21.4.250). RUT240 B has only a mobile connection. Firmware version RUT2XX_R_00.01.11.3

RUT240 B can ping 10.21.4.10 (RUT240 A). Client cannot ping Server

Trying to add route in RUT240 B

Routing table : WAN

Interface : WAN (Mobile)

Destination Address : 10.0.3.0

Netmask : 255.255.255.0

Gateway : 10.21.4.10

Metric 1

but nothing happens. On CLI of RUT240 B when it give "ip route list" i get only the following

default via 10.64.64.64 dev 3g-ppp proto static

10.0.2.72/29 dev br-lan proto kernel scope link src 10.0.2.78

10.64.64.64 dev 3g-ppp proto kernel scope link src 10.21.4.250

and not the route i try to add.

Also tried "ip route add 10.0.3.0/24 via 10.21.4.10" on CLI but response was "RTNETLINK answers: Network is unreachable"

Any help setting up the routing tables on both RUT240 would be appreciated

1 Answer

0 votes
by

Hi,

Ip routes should look like this.

Router A routes should be:

ip route add 10.0.2.0/24 via 10.21.4.250 dev yourUsableInterface

Router B routes should be:

ip route add 10.0.3.0/24 via 10.21.4.10 dev yourUsableInterface

by anonymous

Hello, thank you for the quick reply.

Tried it but i get same response "RTNETLINK answers: Network is unreachable"

command i used "ip route add 10.0.3.0/24 via 10.21.4.10 dev 3g-pppp"

ifconfig reply : 



3g-ppp Link encap:Point-to-Point Protocol
inet addr:10.21.4.250 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:47 errors:0 dropped:0 overruns:0 frame:0
TX packets:80 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:3860 (3.7 KiB) TX bytes:4535 (4.4 KiB)
br-lan Link encap:Ethernet HWaddr 00:1E:42:30:6A:8D
inet addr:10.0.2.78 Bcast:10.0.2.79 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13002 errors:0 dropped:0 overruns:0 frame:0
TX packets:12660 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1857467 (1.7 MiB) TX bytes:6016059 (5.7 MiB)
eth0 Link encap:Ethernet HWaddr 00:1E:42:30:6A:8D
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:17539 errors:0 dropped:0 overruns:0 frame:0
TX packets:16991 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2533128 (2.4 MiB) TX bytes:7548521 (7.1 MiB)
Interrupt:5
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1195 errors:0 dropped:0 overruns:0 frame:0
TX packets:1195 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:87293 (85.2 KiB) TX bytes:87293 (85.2 KiB)
by
Try:

ip route add 10.0.3.0/24 via 10.64.64.64 dev 3g-ppp
by anonymous

This worked



root@RUT240:~# ip route add 10.0.3.0/24 via 10.64.64.64 dev 3g-ppp

root@RUT240:~# ip route list

default via 10.64.64.64 dev 3g-ppp proto static

10.0.2.72/29 dev br-lan proto kernel scope link src 10.0.2.78

10.0.3.0/24 via 10.64.64.64 dev 3g-ppp

10.64.64.64 dev 3g-ppp proto kernel scope link src 10.21.4.250


but 10.64.64.64 is the ISPs router and doesn't know where to send the packet.



root@RUT240:~# ping 10.0.3.1

PING 10.0.3.1 (10.0.3.1): 56 data bytes

ping: sendto: Network is unreachable

root@RUT240:~# traceroute 10.0.3.1

traceroute to 10.0.3.1 (10.0.3.1), 30 hops max, 38 byte packets

1traceroute: sendto: Network is unreachable

root@RUT240:~#


I think i have to setup OpenVPN with TUN and route the two networks so 4G network is transparent to server and client.