2004-10-22 18:32:47

by Arvind Kalyan

[permalink] [raw]
Subject: GPRS on Linux fails due to 255.255.255.255 remote address.

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


2004-10-22 19:07:50

by Richard B. Johnson

[permalink] [raw]
Subject: Re: GPRS on Linux fails due to 255.255.255.255 remote address.

On Fri, 22 Oct 2004, Arvind Kalyan wrote:

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

According to the documentation I've been reading, you set
up your computer for DHCP! It will automatically use one
of those free 192.x.x.x addresses to start if you
don't already have an ISP connection. Otherwise, you
leave your current configuration alone and the ppp link
will work as a remote system.


In no case should an IP address be 255.255.255.255.


> 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
>

[SNIPPED...]

Cheers,
Dick Johnson
Penguin : Linux version 2.6.9 on an i686 machine (5537.79 GrumpyMips).
98.36% of all statistics are fiction.

2004-10-22 19:34:59

by Alan

[permalink] [raw]
Subject: Re: GPRS on Linux fails due to 255.255.255.255 remote address.

On Gwe, 2004-10-22 at 19:21, Arvind Kalyan wrote:
> c. remote IP address: 255.255.255.255

You sure that in fact doesn't mean "pick one" to windows ?

Alan

2004-10-22 19:57:30

by Arvind Kalyan

[permalink] [raw]
Subject: Re: GPRS on Linux fails due to 255.255.255.255 remote address.

I don't know how windows handles 255.255.255.255 ip addresses. When I
do ipconfig under Windows XP, I see a 255.255.255.255 as remote IP.
And also in the Properties (or status) dialog that pops up when I
double click on the blinking icon in the taskbar.

When I dial in Linux , the remote server announces itself to be
255.255.255.255 from what I see in the /var/log/messages - which I
posted to the list as well..

And about DHCP, I don't have DHCP enabled. The ppp is supposed to give
me a new IP address upon connection establishment, which is successful
(I do get a 10.* ip address each time I dial). The only thing that
doesn't seem to be working right is the thing about remote IP. It says
peer is not authorized to use 255.255.255.255 and then it quits.

There are other networking devices present in the system (ipw2100,
ethernet, ieee1394, IrDA) but I did a `/etc/init.d/network stop` to
make sure existing routes and network setup didn't affect this dialup.

If anyone needs any more information, I am willing to provide.

Thanks...



On Fri, 22 Oct 2004 19:27:20 +0100, Alan Cox <[email protected]> wrote:
> On Gwe, 2004-10-22 at 19:21, Arvind Kalyan wrote:
> > c. remote IP address: 255.255.255.255
> You sure that in fact doesn't mean "pick one" to windows ?

--
Arvind Kalyan

2004-10-23 01:58:45

by James Courtier-Dutton

[permalink] [raw]
Subject: Re: GPRS on Linux fails due to 255.255.255.255 remote address.

Arvind Kalyan wrote:
> 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)
>

This is a bug in pppd or the linux kernel.
Can the linux kernel handle un-numbered Point-to-Point links?

This is a point-to-point link, so we should ignore the remote IP
address, and add local routes (e.g. default route) pointing to interface
names, and not IP addresses.

I agree that it would have looked prettier if the remote end used
something other than 255.255.255.255, but pppd should not care about it,
so who cares what number it is.

I do not know if this is a bug in the linux kernel, or just pppd.
Can the linux kernel handle un-numbered Point-to-Point links?

James