On 2021-12-02 12:57, Stuart Henderson wrote:
> On 2021/12/01 20:58, Krzysztof Kanas wrote:
> > On 2021-12-01 10:21, Klemens Nanni wrote:
> > > On Fri, Nov 26, 2021 at 01:35:14PM +0100, Krzysztof Kanas wrote:
> > > > Hi. When remote side in sppp doesn't reply for to PPP IPCP IP-Address 
> > > > sppp will try to negotiate remote IP in endless loop. Instead use 
> > > > 10.64.64.1 + if_index as remote IP.
> > > 
> > > Why add some arbitrary RFC 1918 IP if negotiation fails?  That's not
> > > what users request or expect.
> > > 
> > 
> > I agree that is unexpected but I couldn't find any info in RFC's what to 
> > do if remote side don't reply.  I am not familiar enough with PPP/SPP, 
> > so I tried simples thing I could think of, which is to assign RFC 1918 
> > IP address.
> 
> IMHO: either keep waiting (the other side may complete IPCP later), or
> after X retries then drop the session and reattempt negotiation from scratch.
> 
The problem is that my ISP some time ago decide that it will be in his 
best interest not to reply for IPCP req for remote address.

> A session that is up and stuck with a bogus IP is probably worse than a 
> session
> that keeps trying to negotiate an address isn't it?
> 
All I know if I set bogus IP to remote side I have working PPPOE, albeit 
in bogus way.

> How are you configuring the interface? Due to the race condition with "auto 
> up"
> behaviour on the interface, I would recommend something like this in 
> hostname.pppoeX,
> you need to have the dest address set to 0.0.0.1 *before* the interface comes 
> up
> and if you follow the "clean" example in the manpage that doesn't always work
> 
> inet 0.0.0.0 255.255.255.255 0.0.0.1 pppoedev em1 authproto chap authname 
> "xyz@foo" authkey "fnord" up
> 
My pppoe config is after manpage:

inet 0.0.0.0 255.255.255.255 NONE \
pppoedev em0 authproto chap \
authname 'testcaller' authkey 'secret' up
dest 0.0.0.1
!/sbin/route add default -ifp pppoe0 0.0.0.1

with changes to auth protocol and no IPv6.

I tried the settings:

inet 0.0.0.0 255.255.255.255 0.0.0.1 \
pppoedev em0 authproto chap \
authname 'testcaller' authkey 'secret' up
!/sbin/route add default -ifp pppoe0 0.0.0.1

But that didn't fixed my ICPC negotiation problem.

If I changed first line to (use bougs remote IP)
inet 0.0.0.0 255.255.255.255 10.64.64.33 \
...

Then it works around IPCP problem, but now routing becomes problem as 
!/sbin/route add default -ifp pppoe0 0.0.0.1

So

inet 0.0.0.0 255.255.255.255 10.64.64.33 \
pppoedev em0 authproto chap \
authname 'testcaller' authkey 'secret' up
!/sbin/route add default -ifp pppoe0 10.64.64.33

Seems to be working.

I will test it more, but does this sound correct ?
And if so then is it worth while to add this to man page to bugs section 
?

Thanks for the help.

Reply via email to