All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arvind Kalyan <base16@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: GPRS on Linux fails due to 255.255.255.255 remote address.
Date: Fri, 22 Oct 2004 23:51:22 +0530	[thread overview]
Message-ID: <90c25f2704102211212031af71@mail.gmail.com> (raw)

Hi,

I'm trying to use my Airtel GPRS connection under Linux.


Status: pppd refuses connection due to improper remote IP address
(255.255.255.255)

(what puzzles me: Why on earth would someone use that as an IP address?)

What I did to get GPRS working:

1. Checked for the following details from Windows XP:

a. modem initialization strings
b. authentication type : pap
c. remote IP address: 255.255.255.255
d. gateway address: my own IP is made my gw (10.*.*.*)
e. name servers: automatically assigned numbers...

2. Rebooted into Linux

SuSE Linux 9.1 vanilla kernel (2.6.4-52-default)


3. Ran wvdialconf to see if phone is detected.

GPRS modem (LG G3100 model) was detected at ttyS0

4. Set up ppp options to allow 
defaultroute, 
noauth, 
ipcp-accept-local (and -remote)

Among others that are common.

5. Dialed (tried both direct pppd invocation and through wvdial)

=========================================================
Content of /var/log/messages (without debug)
pppd[14315]: pppd 2.4.2 started by root, uid 0
pppd[14315]: Using interface ppp0
pppd[14315]: Connect: ppp0 <--> /dev/ttyS0
kernel: PPP BSD Compression module registered
kernel: PPP Deflate Compression module registered
pppd[14315]: appear to have received our own echo-reply!
pppd[14315]: Peer is not authorized to use remote address 255.255.255.255
pppd[14315]: Connection terminated.
pppd[14315]: Connect time 0.1 minutes.
pppd[14315]: Sent 97 bytes, received 64 bytes.
pppd[14315]: Connect time 0.1 minutes.
pppd[14315]: Sent 97 bytes, received 64 bytes.
pppd[14315]: Exit.

=========================================================
The thing about "our own echo reply" is to do with GPRS modems - they
don't respond to "hey modem, are you still alive?" queries.
=========================================================
Content of /var/log/messages (with debug)
pppd[4999]: Using interface ppp0
pppd[4999]: Connect: ppp0 <--> /dev/ttyS0
pppd[4999]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x17caa03d>
<pcomp> <accomp>]
pppd[4999]: rcvd [LCP ConfReq id=0x2d <mru 1600> <auth pap> <magic
0x5fb8dec7> <asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfNak id=0x2d <auth eap>]
pppd[4999]: rcvd [LCP ConfReq id=0x2e <mru 1600> <auth pap> <magic
0x5fb8dec7> <asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfNak id=0x2e <auth eap>]
pppd[4999]: rcvd [LCP ConfReq id=0x2f <mru 1600> <auth pap> <magic
0x5fb8dec7> <asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfNak id=0x2f <auth eap>]
pppd[4999]: rcvd [LCP ConfReq id=0x30 <mru 1600> <auth pap> <magic
0x5fb8dec7> <asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfNak id=0x30 <auth eap>]
pppd[4999]: rcvd [LCP ConfReq id=0x31 <mru 1600> <auth pap> <magic
0x5fb8dec7> <asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfNak id=0x31 <auth eap>]
pppd[4999]: rcvd [LCP ConfReq id=0x32 <mru 1600> <auth pap> <magic
0x5fb8dec7> <asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfRej id=0x32 <auth pap>]
pppd[4999]: rcvd [LCP ConfReq id=0x33 <mru 1600> <magic 0x5fb8dec7>
<asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfAck id=0x33 <mru 1600> <magic 0x5fb8dec7>
<asyncmap 0x0> <pcomp> <accomp>]
pppd[4999]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x17caa03d>
<pcomp> <accomp>]
pppd[4999]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x17caa03d>
<pcomp> <accomp>]
pppd[4999]: sent [LCP EchoReq id=0x0 magic=0x17caa03d]
pppd[4999]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15>
<bsd v1 15>]
pppd[4999]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr
0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
pppd[4999]: rcvd [LCP EchoRep id=0x0 magic=0x17caa03d]
pppd[4999]: appear to have received our own echo-reply!
pppd[4999]: rcvd [LCP ProtRej id=0x9 80 fd a4 d9 05 08]
pppd[4999]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
pppd[4999]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0>
<ms-dns3 0.0.0.0>]
pppd[4999]: rcvd [IPCP ConfReq id=0x8 <addr 255.255.255.255>]
pppd[4999]: sent [IPCP ConfAck id=0x8 <addr 255.255.255.255>]
pppd[4999]: rcvd [IPCP ConfNak id=0x2 <addr 10.151.104.192> <ms-dns1
202.56.250.5> <ms-dns3 202.56.250.6>]
pppd[4999]: sent [IPCP ConfReq id=0x3 <addr 10.151.104.192> <ms-dns1
202.56.250.5> <ms-dns3 202.56.250.6>]
pppd[4999]: rcvd [IPCP ConfAck id=0x3 <addr 10.151.104.192> <ms-dns1
202.56.250.5> <ms-dns3 202.56.250.6>]
pppd[4999]: Peer is not authorized to use remote address 255.255.255.255
pppd[4999]: sent [IPCP TermReq id=0x4 "Unauthorized remote IP address"]
pppd[4999]: rcvd [IPCP TermAck id=0x4]
pppd[4999]: sent [LCP TermReq id=0x2 "No network protocols running"]
pppd[4999]: rcvd [LCP TermAck id=0x2]
pppd[4999]: Connection terminated.
pppd[4999]: Connect time 0.1 minutes.
pppd[4999]: Sent 97 bytes, received 64 bytes.
pppd[4999]: Connect time 0.1 minutes.
pppd[4999]: Sent 97 bytes, received 64 bytes.
pppd[4999]: Exit.
=========================================================

6. Tried a few things to "force" it to accept.

a. Edited pap&chap-secrets to "allow" 255.255.255.255

Result: no changes in response.

b. Edited pppd/ipcp.c to disable authentication

if (!auth_ip_addr(f->unit, ho->hisaddr)) {
        error("Peer is not authorized to use remote address %I", ho->hisaddr);
           ipcp_close(f->unit, "Unauthorized remote IP address");
           return;
        }

The above code snippet, which checks the authentication, was commented
out, so I can make the peer use the IP address without
"authentication".

(ps: This was necessary as adding an entry for the IP in pap-secrets
and chap-secrets had no effect on the error message.)

Result: fails when trying to set 255.255.255.255 as remote interface's
address (ioctl failure)

c. Edited pppd/sys-linux.c to set gateway ip=local ip

- SIN_ADDR(ifr.ifr_dstaddr) = his_adr;
+ SIN_ADDR(ifr.ifr_dstaddr) = our_adr;

Result: connection established. But, routing failed miserably. I was
not able to add a `route` so I could do virtually nothing with the
ppp0 link. Because nothing was reachable. (Obvious! But I gave it a
shot)

7. Called Airtel to know what protocol they were using so I can figure
out how to set it up.

Result: they didn't know what they were using on their side.

----------------------------------------------------

If anyone has further information which you think could be of some
help, kindly share. I'd appreciate it.

Thanks!



-- 
Arvind Kalyan
CS Engineering Student. Mobile: (+91)98940 9 345 9

             reply	other threads:[~2004-10-22 18:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22 18:21 Arvind Kalyan [this message]
2004-10-22 18:27 ` GPRS on Linux fails due to 255.255.255.255 remote address Alan Cox
2004-10-22 19:42   ` Arvind Kalyan
2004-10-22 19:01 ` Richard B. Johnson
2004-10-23  1:48 ` James Courtier-Dutton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=90c25f2704102211212031af71@mail.gmail.com \
    --to=base16@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.