Re: in-kernel pppoe and fixed address

2005-11-01 Thread Antoine Jacoutot

Can Erkin Acar wrote:

It is probably a problem with your ISP. It wants to give you a (fixed)
address. It does not allow you to specify an address, even if they are
the same.


Damn... this is exactly what I was afraid of.
Well, I'll be changing ISP in a month or so, I'll check is this is 
happening again then.



As a workaround, if you are using -current, you can use ifstated.
In -current pppoe brings its link state 'up' when the IP layer is open
(ie. has an address).


Well, I will see that in 6 months then ;)
Thanks !

Antoine



Re: in-kernel pppoe and fixed address

2005-11-01 Thread Can Erkin Acar
Antoine Jacoutot wrote:
 Jason McIntyre wrote:
 my hostname.pppoe0 file does this without problem. i guess the problem
 is you specify an exact ip, but a wildcard for your gateway.
 
 Sorry about that. I was not very clear. In fact, I also tried to set the 
 gateway to a fixed IP, but it does not change anything, I still can't 
 connect.

pppoe allows setting of local and peer addresses, and will
request/require these values when it negotiates the address.
0.0.0.0 and 0.0.0.1 are special in that they allow the addresses
sent by the peer to be accepted.

 whether it will fix your problem (app binding in rc.local) i don't know.
 
 Actually I know it does since even when not connected yet, the pppoe0 
 interface has already an IP assigned and the application can start 
 without a problem.
 Anyway, this particular thing is not very important, I just want to know 
 if there's a way to set a fixed IP/gateway in hostname.pppoe0 and be 
 able to connect.

It is probably a problem with your ISP. It wants to give you a (fixed)
address. It does not allow you to specify an address, even if they are
the same.

As a workaround, if you are using -current, you can use ifstated.
In -current pppoe brings its link state 'up' when the IP layer is open
(ie. has an address).

Can



in-kernel pppoe and fixed address

2005-10-31 Thread Antoine Jacoutot

Hi...

I'm trying to use the in-kernel pppoe under 3.8.
It works fine, but there's something I cannot achieve.

Right now, this is what I have in /etc/hostname.pppoe0:

pppoedev rl1
!/sbin/ifconfig rl1 up
!/usr/sbin/spppcontrol \$if \
 myauthproto=pap \
 myauthname=username \
 myauthkey=password
!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0x
!/sbin/route add default 0.0.0.1

It works like a charm. But the thing is that:
- I have a fixed public IP
- I need to start an application from rc.local which will bind on the 
public IP only


If I keep my hostname.pppoe0 like the previous one, then the application 
does not start (since the DSL connexion isn't up yet and the app cannot 
bind to the public IP).
So I though I would change one line in my hostname.pppoe0 (where 1.2.3.4 
is my public IP):


!/sbin/ifconfig \$if inet 1.2.3.4 0.0.0.1 netmask 0x

But this does _not_ work, it just never connects (and I cannot find any 
logs).
Is there a way to specify an IP in hostname.pppoe0 or do one have to put 
0.0.0.0 all the time ? I read the man page but can't find a definitive 
answer.


Thanks.

Antoine



Re: in-kernel pppoe and fixed address

2005-10-31 Thread Jason McIntyre
On Mon, Oct 31, 2005 at 09:20:11PM +0100, Antoine Jacoutot wrote:
 
 If I keep my hostname.pppoe0 like the previous one, then the application 
 does not start (since the DSL connexion isn't up yet and the app cannot 
 bind to the public IP).
 So I though I would change one line in my hostname.pppoe0 (where 1.2.3.4 
 is my public IP):
 
 !/sbin/ifconfig \$if inet 1.2.3.4 0.0.0.1 netmask 0x
 
 But this does _not_ work, it just never connects (and I cannot find any 
 logs).
 Is there a way to specify an IP in hostname.pppoe0 or do one have to put 
 0.0.0.0 all the time ? I read the man page but can't find a definitive 
 answer.
 

my hostname.pppoe0 file does this without problem. i guess the problem
is you specify an exact ip, but a wildcard for your gateway.

pppoe(4) is not ultra clear about this (maybe we can fix that). it says
the only choice is hard coded address or wildcard. but not whether you
can mix.

try specifying your gateway too. let us know.

whether it will fix your problem (app binding in rc.local) i don't know.

jmc



Re: in-kernel pppoe and fixed address

2005-10-31 Thread Antoine Jacoutot

Jason McIntyre wrote:

my hostname.pppoe0 file does this without problem. i guess the problem
is you specify an exact ip, but a wildcard for your gateway.


Sorry about that. I was not very clear. In fact, I also tried to set the 
gateway to a fixed IP, but it does not change anything, I still can't 
connect.



whether it will fix your problem (app binding in rc.local) i don't know.


Actually I know it does since even when not connected yet, the pppoe0 
interface has already an IP assigned and the application can start 
without a problem.
Anyway, this particular thing is not very important, I just want to know 
if there's a way to set a fixed IP/gateway in hostname.pppoe0 and be 
able to connect.


Thanks !

Antoine