0

I am using ppp via wvdial, script looks like that (commented lines have been removed):

[Dialer t-mobile]
 New PPPD = yes
 Phone = *99#
 Modem = /dev/ttyUSB0
 Modem Type = USB Modem
 Baud = 460800
 ISDN = 0
 Username = “blank”
 Password = “blank”
 Init1 = ATZ
 Init2 = AT+CGDCONT=1,"IP","internet"
 Stupid mode = 1
 Auto DNS = yes

And when I wvdial t-mobile it acts like it would work:

sudo wvdial t-mobile
--> Ignoring malformed input line: "; [Dialer Defaults]"
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Sat Jun 20 16:26:23 2015
--> Pid of pppd: 3228
--> Using interface ppp0
--> pppd: ▒▒v▒▒o
--> pppd: ▒▒v▒▒o
--> pppd: ▒▒v▒▒o
--> pppd: ▒▒v▒▒o
--> pppd: ▒▒v▒▒o
--> pppd: ▒▒v▒▒o
--> local  IP address 100.88.98.150
--> pppd: ▒▒v▒▒o
--> remote IP address 10.64.64.64
--> pppd: ▒▒v▒▒o
--> primary   DNS address 213.158.199.1
--> pppd: ▒▒v▒▒o
--> secondary DNS address 213.158.199.5
--> pppd: ▒▒v▒▒o

ifconfig for this interface:

ppp0      Link encap:Point-to-Point Protocol
          inet addr:100.88.98.150  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:128 (128.0 B)  TX bytes:185 (185.0 B)

So script seems to be working, but it doesn't... no internet either way... not pinging (even ip adresses), HTTP server is not responding on 100.88.98.150.

Any idea what could be wrong?

Btw. 10.* and 100.* are both local/reserved adresses... so I don't really understand that... maybe I just don't have enough money on card? I have no way to check it.

Flash Thunder
  • 56
  • 1
  • 11
  • Can you ping the gateway and have you set it up as your default route? And why would you expect any HTTP server to exist on 100.88.98.150? – qasdfdsaq Jun 20 '15 at 16:22
  • Because Apache is installed. How do I set default route? – Flash Thunder Jun 20 '15 at 16:54
  • Are you trying to run a *server* on your raspberry that you want to access over the internet? If so, that probably won't work - most mobile networks only give you private IPs that are not internet routable. – qasdfdsaq Jun 20 '15 at 16:55
  • Yeah I noticed that... still I need the connection from my Raspberry. You are probably right about this default route, but how do I set it up? Sorry, Im not really familiar with that. – Flash Thunder Jun 20 '15 at 17:08
  • The command is "route add default gw ww.xx.yy.zz" which in your case ought to be 10.64.64.64. You should also check with the "route" command with no arguments to make sure it's not already there. This information may help with setting pppd to do this automatically: https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/608372 – qasdfdsaq Jun 20 '15 at 17:12
  • Thank you, you helped alot. I would accept that as answer. But still got one doubt... When I got 2 different networks (with internet connection), one from eth0 and one from ppp0, only last added default route gw works, second one stops working (for example when binding to ip something). Is that normal? – Flash Thunder Jun 20 '15 at 17:46
  • Yes. By definition, you can only have one default gateway. – qasdfdsaq Jun 21 '15 at 23:45
  • In fact, saw some article where it is doable via iptables2. – Flash Thunder Jun 22 '15 at 05:07
  • Yes, it is doable. It just doesn't work out of the box, and isn't advisable unless you have network administrator level knowledge, and a thorough understanding of what you want to achieve. In most cases, what most people want, is not actually two default gateways. The Windows help on this puts it fairly succinctly : https://support.microsoft.com/en-us/kb/159168 – qasdfdsaq Jun 22 '15 at 12:10
  • I do understand how routing works, even how ethernet works in low level description... (studied physics), but just never had such a problem on debian, so I have no idea what tools to use... Lets face the truth... what kinda' admin has anything to do with GSM networks? – Flash Thunder Jun 23 '15 at 16:04
  • Given your basic questions about how default routes works it's hard to not get the impression that you don't have expert understanding of routing. – qasdfdsaq Jun 23 '15 at 16:19
  • Just had no idea that wvdial doesn't add it automatically... in fact im rather programmer than admin, still adminning few servers. Anyway, you helped me alot, so maybe just paste your comment to answer and I will accept it... – Flash Thunder Jun 23 '15 at 16:20

0 Answers0