Re: Recent interface/routing changes breaks on-demand PPP (+sppp)

2001-03-30 Thread Alexander Leidinger

On 19 Mr, Ruslan Ermilov wrote:

 3.  The routing code was fixed to delete routes which use non-existent
 interface addresses.  This code will wipe such a route.

 5.  This affects not only ppp(8).  Add default route that points to the
 LAN; change the IP address on interface; observe that the default
 route has gone away.  The reason is that if we don't do this, we
 may end up using the old (now non-existing) local IP address.

A little bit more on my problems with the defaultroute and sppp after
the recent changes:
 - I didn't use ppp(8), I use isdnd(8)
 - my default dial-on-demand interface is isp1
 - my rc.conf contains: defaultrouter="-interface isp1"
 - the interface is down (ifconfig isp1 down) by default and gets turned up
   (ifconfig isp1 up) at a login (which didn't triggers a dial out)
 - if I put the interface down the first time after a login I have to
   readd the defaultroute (only once, after additional "ifconfig
   down/up" I didn't have to readd the defaultroute, it stays)

Bye,
Alexander.

-- 
Give a man a fish and you feed him for a day;
 teach him to use the Net and he won't bother you for weeks.

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP (+sppp)

2001-03-30 Thread Alexander Leidinger

On 30 Mr, Ruslan Ermilov wrote:
  - if I put the interface down the first time after a login I have to
readd the defaultroute (only once, after additional "ifconfig
down/up" I didn't have to readd the defaultroute, it stays)
 
 This is only possible if you have a routing daemon running.

I didn't have a routing daemon running.

 Otherwise, if the default route points to interface X, and
 you execute ``ifconfig X down'', all routes through X will
 be deleted including the default.  Previously, the routing
 code did not delete ``static'' routes, now it does.

What to do in this situation? I didn't want add the defaultroute
everytime (POLA).

Bye,
Alexander.

-- 
   There's no place like ~

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP (+sppp)

2001-03-30 Thread Ruslan Ermilov

On Fri, Mar 30, 2001 at 01:36:39PM +0200, Alexander Leidinger wrote:
 On 30 Mar, Ruslan Ermilov wrote:
   - if I put the interface down the first time after a login I have to
 readd the defaultroute (only once, after additional "ifconfig
 down/up" I didn't have to readd the defaultroute, it stays)
  
  This is only possible if you have a routing daemon running.
 
 I didn't have a routing daemon running.
 
  Otherwise, if the default route points to interface X, and
  you execute ``ifconfig X down'', all routes through X will
  be deleted including the default.  Previously, the routing
  code did not delete ``static'' routes, now it does.
 
 What to do in this situation? I didn't want add the defaultroute
 everytime (POLA).
 
But if we don't do this, we may end up using the wrong source IP
address.  Without my fixes, try this:

1)  ifconfig isp1 X.X.X.1 
2)  route add default -iface isp1
3)  ifconfig isp1 X.X.X.2
4)  ping some outside host
5)  watch the packets will go from the wrong address (X.X.X.1)


Cheers,
-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP (+sppp)

2001-03-30 Thread Alexander Leidinger

On 30 Mr, Ruslan Ermilov wrote:

 What to do in this situation? I didn't want add the defaultroute
 everytime (POLA).
 
 But if we don't do this, we may end up using the wrong source IP
 address.  Without my fixes, try this:
 
 1)  ifconfig isp1 X.X.X.1 
 2)  route add default -iface isp1
 3)  ifconfig isp1 X.X.X.2
 4)  ping some outside host
 5)  watch the packets will go from the wrong address (X.X.X.1)

If I use
  route add default -interface isp1
I wan't to have the packets routed trough isp1. I don't care about how
the routing table is held consistent, but I if the route is discarded
without my interaction it not only violates POLA, in this case it's
prohibits a valid use of the -interface feature (dial on demand via sppp
is broken at the moment).

Bye,
Alexander.

-- 
The dark ages were caused by the Y1K problem.

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP (+sppp)

2001-03-30 Thread Ruslan Ermilov

[Redirected to -net]

On Fri, Mar 30, 2001 at 03:39:40PM +0200, Alexander Leidinger wrote:
 On 30 Mar, Ruslan Ermilov wrote:
 
  What to do in this situation? I didn't want add the defaultroute
  everytime (POLA).
  
  But if we don't do this, we may end up using the wrong source IP
  address.  Without my fixes, try this:
  
  1)  ifconfig isp1 X.X.X.1 
  2)  route add default -iface isp1
  3)  ifconfig isp1 X.X.X.2
  4)  ping some outside host
  5)  watch the packets will go from the wrong address (X.X.X.1)
 
 If I use
   route add default -interface isp1
 I wan't to have the packets routed trough isp1. I don't care about how
 the routing table is held consistent, but I if the route is discarded
 without my interaction it not only violates POLA, in this case it's
 prohibits a valid use of the -interface feature (dial on demand via sppp
 is broken at the moment).
 
OK, finally got it.  When the interface goes down, the address is still
valid, and there is no reason to delete (static?) routes that use this
address, but the new code does.  I was confused by the code comment below
for the rip_ctlinput() function in raw_ip.c.  The old code actually only
deleted dynamically creates routes (ARP cache, etc.).  IOW, that could be
used as some sort of flush.

: /*
:  * This function exists solely to receive the PRC_IFDOWN messages which
:  * are sent by if_down().  It looks for an ifaddr whose ifa_addr is sa,
:  * and calls in_ifadown() to remove all routes corresponding to that address.
  ^^
:  * It also receives the PRC_IFUP messages from if_up() and reinstalls the
:  * interface routes.
:  */

I then modified in_ifadown() so that it deletes static routes as well
that use this address.

I will probably implement in_ifadelete() that will be called when the
interface address is actually deleted (in_control(); SIOCDIFADDR),
and restore the old behavior of in_ifadown().

This will take some time.  Meanwhile, the following patch could be used
as the temporary workaround:

Index: raw_ip.c
===
RCS file: /home/ncvs/src/sys/netinet/raw_ip.c,v
retrieving revision 1.75
diff -u -p -r1.75 raw_ip.c
--- raw_ip.c2001/03/16 20:00:53 1.75
+++ raw_ip.c2001/03/30 14:09:20
@@ -398,7 +398,9 @@ rip_ctlinput(cmd, sa, vip)
 * thing to do, but at least if we are running
 * a routing process they will come back.
 */
+#if 0
in_ifadown(ia-ia_ifa);
+#endif
break;
}
}


Let me know if it works for you.


Cheers,
-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-26 Thread Brian Somers

 On Sun, Mar 25, 2001 at 02:46:22AM +0100, Brian Somers wrote:
On Fri, Mar 23, 2001 at 23:11:56 +, Brian Somers wrote:
 1. Ppp is in -auto mode (or a ``set mode auto'' has been done).  
Here, ppp configures the interface as soon as it sees the ``set 
ifaddr'' line and never undoes that configuration.  An ``add'' 
with a fixed IP number would never have worked if it's before the 
``set ifaddr''.  If it's after the ``set ifaddr'', nothing should 
ever remove it (as the interface will stay configured).
 
 2. Ppp is not in -auto mode.  Here, ppp won't assign the interface 
address 'till IPCP is up.  Any attempt to ``add'' a route with a 
static IP number in ppp.conf should fail.
 
 So, the recent routing changes shouldn't have made a difference.
 
 Anyone know what I'm missing ?  Andre, what does your ppp.conf look 
 like and how are you running ppp ?

ppp in -auto mode, "add" is after "set ifaddr"
   
   In which case your interface should stay configured despite the link 
   coming down and your route should *not* be deleted.
   
   I'll see if I can reproduce this here (I need to upgrade a machine 
   first).
  
  This was happening because ppp was deleting then re-adding the 
  interface address when IPCP came up, causing the new routing code to 
  nuke the static route.  I've added an optimisation to stop this from 
  happening, so your configuration should work ok again with 
  src/usr.sbin/ppp/iface.c 1.17.
  
 You mean, ppp(8) does not do this now if negotiated address does not change?

Yep.

 -- 
 Ruslan ErmilovOracle Developer/DBA,
 [EMAIL PROTECTED] Sunbay Software AG,
 [EMAIL PROTECTED]FreeBSD committer,
 +380.652.512.251  Simferopol, Ukraine
 
 http://www.FreeBSD.orgThe Power To Serve
 http://www.oracle.com Enabling The Information Age

-- 
Brian [EMAIL PROTECTED]brian@[uk.]FreeBSD.org
  http://www.Awfulhak.org   brian@[uk.]OpenBSD.org
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-25 Thread Ruslan Ermilov

On Sun, Mar 25, 2001 at 02:46:22AM +0100, Brian Somers wrote:
   On Fri, Mar 23, 2001 at 23:11:56 +, Brian Somers wrote:
1. Ppp is in -auto mode (or a ``set mode auto'' has been done).  
   Here, ppp configures the interface as soon as it sees the ``set 
   ifaddr'' line and never undoes that configuration.  An ``add'' 
   with a fixed IP number would never have worked if it's before the 
   ``set ifaddr''.  If it's after the ``set ifaddr'', nothing should 
   ever remove it (as the interface will stay configured).

2. Ppp is not in -auto mode.  Here, ppp won't assign the interface 
   address 'till IPCP is up.  Any attempt to ``add'' a route with a 
   static IP number in ppp.conf should fail.

So, the recent routing changes shouldn't have made a difference.

Anyone know what I'm missing ?  Andre, what does your ppp.conf look 
like and how are you running ppp ?
   
   ppp in -auto mode, "add" is after "set ifaddr"
  
  In which case your interface should stay configured despite the link 
  coming down and your route should *not* be deleted.
  
  I'll see if I can reproduce this here (I need to upgrade a machine 
  first).
 
 This was happening because ppp was deleting then re-adding the 
 interface address when IPCP came up, causing the new routing code to 
 nuke the static route.  I've added an optimisation to stop this from 
 happening, so your configuration should work ok again with 
 src/usr.sbin/ppp/iface.c 1.17.
 
You mean, ppp(8) does not do this now if negotiated address does not change?


-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-24 Thread Brian Somers

  On Fri, Mar 23, 2001 at 23:11:56 +, Brian Somers wrote:
   1. Ppp is in -auto mode (or a ``set mode auto'' has been done).  
  Here, ppp configures the interface as soon as it sees the ``set 
  ifaddr'' line and never undoes that configuration.  An ``add'' 
  with a fixed IP number would never have worked if it's before the 
  ``set ifaddr''.  If it's after the ``set ifaddr'', nothing should 
  ever remove it (as the interface will stay configured).
   
   2. Ppp is not in -auto mode.  Here, ppp won't assign the interface 
  address 'till IPCP is up.  Any attempt to ``add'' a route with a 
  static IP number in ppp.conf should fail.
   
   So, the recent routing changes shouldn't have made a difference.
   
   Anyone know what I'm missing ?  Andre, what does your ppp.conf look 
   like and how are you running ppp ?
  
  ppp in -auto mode, "add" is after "set ifaddr"
 
 In which case your interface should stay configured despite the link 
 coming down and your route should *not* be deleted.
 
 I'll see if I can reproduce this here (I need to upgrade a machine 
 first).

This was happening because ppp was deleting then re-adding the 
interface address when IPCP came up, causing the new routing code to 
nuke the static route.  I've added an optimisation to stop this from 
happening, so your configuration should work ok again with 
src/usr.sbin/ppp/iface.c 1.17.

  -- 
  Andrey A. Chernov
  http://ache.pp.ru/

-- 
Brian [EMAIL PROTECTED]brian@[uk.]FreeBSD.org
  http://www.Awfulhak.org   brian@[uk.]OpenBSD.org
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-23 Thread Brian Somers

  Do you mean that "add" PPP command now intentionally broken for any
  address excepting *ADDR? Then, what is the reason to have numeric argument
  there? Or do you mean that PPP must be fixed now? Where is the fix?
  
 I mean that:
 
 1.  If you use HISADDR, ppp(8) will automatically re-add route after link
 is brought down and then back up.
 
 2.  If you use static IP address in ppp.conf, ppp(8) will add that route
 only once.  This route will also cache local interface address at the
 time the route is added.  Execute `route -vn get default' to see what
 I am talking about.
 
 3.  The routing code was fixed to delete routes which use non-existent
 interface addresses.  This code will wipe such a route.
 
 4.  If you need routes with static gateway addresses, put `add!' command
 to ppp.linkup script.  This way, routes will be activated every time
 the link is up, and will use the correct source IP address.
 
 5.  This affects not only ppp(8).  Add default route that points to the
 LAN; change the IP address on interface; observe that the default
 route has gone away.  The reason is that if we don't do this, we
 may end up using the old (now non-existing) local IP address.

I've thought about this quite a bit...  I'm not sure that I 
understand the problem.

I know of two (static IP) scenarios:

1. Ppp is in -auto mode (or a ``set mode auto'' has been done).  
   Here, ppp configures the interface as soon as it sees the ``set 
   ifaddr'' line and never undoes that configuration.  An ``add'' 
   with a fixed IP number would never have worked if it's before the 
   ``set ifaddr''.  If it's after the ``set ifaddr'', nothing should 
   ever remove it (as the interface will stay configured).

2. Ppp is not in -auto mode.  Here, ppp won't assign the interface 
   address 'till IPCP is up.  Any attempt to ``add'' a route with a 
   static IP number in ppp.conf should fail.

So, the recent routing changes shouldn't have made a difference.

Anyone know what I'm missing ?  Andre, what does your ppp.conf look 
like and how are you running ppp ?

Cheers.

 Cheers,
 -- 
 Ruslan ErmilovOracle Developer/DBA,
 [EMAIL PROTECTED] Sunbay Software AG,
 [EMAIL PROTECTED]FreeBSD committer,
 +380.652.512.251  Simferopol, Ukraine
 
 http://www.FreeBSD.orgThe Power To Serve
 http://www.oracle.com Enabling The Information Age

-- 
Brian [EMAIL PROTECTED]brian@[uk.]FreeBSD.org
  http://www.Awfulhak.org   brian@[uk.]OpenBSD.org
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-23 Thread Andrey A. Chernov

On Fri, Mar 23, 2001 at 23:11:56 +, Brian Somers wrote:
 1. Ppp is in -auto mode (or a ``set mode auto'' has been done).  
Here, ppp configures the interface as soon as it sees the ``set 
ifaddr'' line and never undoes that configuration.  An ``add'' 
with a fixed IP number would never have worked if it's before the 
``set ifaddr''.  If it's after the ``set ifaddr'', nothing should 
ever remove it (as the interface will stay configured).
 
 2. Ppp is not in -auto mode.  Here, ppp won't assign the interface 
address 'till IPCP is up.  Any attempt to ``add'' a route with a 
static IP number in ppp.conf should fail.
 
 So, the recent routing changes shouldn't have made a difference.
 
 Anyone know what I'm missing ?  Andre, what does your ppp.conf look 
 like and how are you running ppp ?

ppp in -auto mode, "add" is after "set ifaddr"

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-23 Thread Brian Somers

 On Fri, Mar 23, 2001 at 23:11:56 +, Brian Somers wrote:
  1. Ppp is in -auto mode (or a ``set mode auto'' has been done).  
 Here, ppp configures the interface as soon as it sees the ``set 
 ifaddr'' line and never undoes that configuration.  An ``add'' 
 with a fixed IP number would never have worked if it's before the 
 ``set ifaddr''.  If it's after the ``set ifaddr'', nothing should 
 ever remove it (as the interface will stay configured).
  
  2. Ppp is not in -auto mode.  Here, ppp won't assign the interface 
 address 'till IPCP is up.  Any attempt to ``add'' a route with a 
 static IP number in ppp.conf should fail.
  
  So, the recent routing changes shouldn't have made a difference.
  
  Anyone know what I'm missing ?  Andre, what does your ppp.conf look 
  like and how are you running ppp ?
 
 ppp in -auto mode, "add" is after "set ifaddr"

In which case your interface should stay configured despite the link 
coming down and your route should *not* be deleted.

I'll see if I can reproduce this here (I need to upgrade a machine 
first).

 -- 
 Andrey A. Chernov
 http://ache.pp.ru/

-- 
Brian [EMAIL PROTECTED]brian@[uk.]FreeBSD.org
  http://www.Awfulhak.org   brian@[uk.]OpenBSD.org
Don't _EVER_ lose your sense of humour !



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-20 Thread Alexander Leidinger

On 19 Mr, Ruslan Ermilov wrote:

 You will have to add the following command to the relevant section of
 ppp.conf:
 
   add default HISADDR
 
 for this to work.

I didn't use userland-ppp with I4B.

BTW: After a reboot the first try to dialout succeeded, this time I did
a "netstat -rn" before I tried to dialout. I didn't know if this makes a
difference.

Bye,
Alexander.

-- 
   "One world, one web, one program"  -- Microsoft promotional ad
 "Ein Volk, ein Reich, ein Fuehrer"  -- Adolf Hitler

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Andrey A. Chernov

On Mon, Mar 19, 2001 at 16:33:37 +0200, Ruslan Ermilov wrote:
 On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
  Now
  
  add default 1.1.1.1
  
 Perhaps, 1.1.1.1 should be written as HISADDR?
 

No, it ALWAYS 1.1.1.1 and I have static IP address which not changed after
connection. HISADDR needed only when address changes on the fly.

Moreover, my config works this way all this years.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Ruslan Ermilov

On Mon, Mar 19, 2001 at 05:39:47PM +0300, Andrey A. Chernov wrote:
 On Mon, Mar 19, 2001 at 16:33:37 +0200, Ruslan Ermilov wrote:
  On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
   Now
   
 add default 1.1.1.1
   
  Perhaps, 1.1.1.1 should be written as HISADDR?
  
 
 No, it ALWAYS 1.1.1.1 and I have static IP address which not changed after
 connection. HISADDR needed only when address changes on the fly.
 
 Moreover, my config works this way all this years.
 
Still, could you please try with HISADDR?


-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Andrey A. Chernov

On Mon, Mar 19, 2001 at 16:43:24 +0200, Ruslan Ermilov wrote:
 On Mon, Mar 19, 2001 at 05:39:47PM +0300, Andrey A. Chernov wrote:
  On Mon, Mar 19, 2001 at 16:33:37 +0200, Ruslan Ermilov wrote:
   On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
Now

add default 1.1.1.1

   Perhaps, 1.1.1.1 should be written as HISADDR?
   
  
  No, it ALWAYS 1.1.1.1 and I have static IP address which not changed after
  connection. HISADDR needed only when address changes on the fly.
  
  Moreover, my config works this way all this years.
  
 Still, could you please try with HISADDR?


I try and it works with HISADDR. 
But I see no reason why old working variant now broken. It is clear PPP
incompatibility with new interface way.

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Maxim Sobolev

Ruslan Ermilov wrote:

 On Mon, Mar 19, 2001 at 05:39:47PM +0300, Andrey A. Chernov wrote:
  On Mon, Mar 19, 2001 at 16:33:37 +0200, Ruslan Ermilov wrote:
   On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
Now
   
  add default 1.1.1.1
   
   Perhaps, 1.1.1.1 should be written as HISADDR?
  
 
  No, it ALWAYS 1.1.1.1 and I have static IP address which not changed after
  connection. HISADDR needed only when address changes on the fly.
 
  Moreover, my config works this way all this years.
 
 Still, could you please try with HISADDR?

There is no ``HISADDR'' in the ppp.conf. ``HISADDR'' is ppp.link{up,down} thing.
If I understood Andrey correctly, 1.1.1.1 is the address used to trigger
dial-on-demand.

-Maxim


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Ruslan Ermilov

On Mon, Mar 19, 2001 at 04:55:15PM +0200, Maxim Sobolev wrote:
 Ruslan Ermilov wrote:
 
  On Mon, Mar 19, 2001 at 05:39:47PM +0300, Andrey A. Chernov wrote:
   On Mon, Mar 19, 2001 at 16:33:37 +0200, Ruslan Ermilov wrote:
On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
 Now

   add default 1.1.1.1

Perhaps, 1.1.1.1 should be written as HISADDR?
   
  
   No, it ALWAYS 1.1.1.1 and I have static IP address which not changed after
   connection. HISADDR needed only when address changes on the fly.
  
   Moreover, my config works this way all this years.
  
  Still, could you please try with HISADDR?
 
 There is no ``HISADDR'' in the ppp.conf. ``HISADDR'' is ppp.link{up,down} thing.
 If I understood Andrey correctly, 1.1.1.1 is the address used to trigger
 dial-on-demand.
 
You are mistaken.  HISADDR is allowed everywhere, refer to the MANUAL DIALING
section of ppp(8) manpage for an example.  And no, 1.1.1.1 is the address of
the peer in Andrey's case.


Cheers,
-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Ruslan Ermilov

On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
 Now
 
   add default 1.1.1.1
 
Perhaps, 1.1.1.1 should be written as HISADDR?

 command from /etc/ppp/ppp.conf does nothing interesting (PPP on demand),
 as result I have no route. Here is netstat -r after connection is
 established:
 
 Routing tables
 
 Internet:
 DestinationGatewayFlags Refs Use Netif Expire
 1.1.1.1194.87.16.230  UH  00 tun0
 localhost  localhost  UH  5  107  lo0
 
 I forced to manually enter 
   
   route add default 1.1.1.1
 
 from root after PPP connection is established to make it working. Here is
 netstat -r after it:
 
 Routing tables
 
 Internet:
 DestinationGatewayFlags Refs Use Netif Expire
 default1.1.1.1UGSc00 tun0
 1.1.1.1hermes UH  20 tun0
 localhost  localhost  UH  5  133  lo0
 
 Please fix current kernel interface strategy or PPP.

-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Andrey A. Chernov

On Mon, Mar 19, 2001 at 16:56:40 +0200, Ruslan Ermilov wrote:
 On Mon, Mar 19, 2001 at 05:52:02PM +0300, Andrey A. Chernov wrote:
  On Mon, Mar 19, 2001 at 16:43:24 +0200, Ruslan Ermilov wrote:
   On Mon, Mar 19, 2001 at 05:39:47PM +0300, Andrey A. Chernov wrote:
On Mon, Mar 19, 2001 at 16:33:37 +0200, Ruslan Ermilov wrote:
 On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
  Now
  
  add default 1.1.1.1
  
 Perhaps, 1.1.1.1 should be written as HISADDR?
 

No, it ALWAYS 1.1.1.1 and I have static IP address which not changed after
connection. HISADDR needed only when address changes on the fly.

Moreover, my config works this way all this years.

   Still, could you please try with HISADDR?
  
  
  I try and it works with HISADDR. 
  But I see no reason why old working variant now broken. It is clear PPP
  incompatibility with new interface way.
  
 It's not only with PPP.  Here is the relevant commitlog, read it carefully,
 especially its second part.
 
 

Do you mean that "add" PPP command now intentionally broken for any
address excepting *ADDR? Then, what is the reason to have numeric argument
there? Or do you mean that PPP must be fixed now? Where is the fix?

-- 
Andrey A. Chernov
http://ache.pp.ru/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Ruslan Ermilov

On Mon, Mar 19, 2001 at 06:23:46PM +0300, Andrey A. Chernov wrote:
 On Mon, Mar 19, 2001 at 16:56:40 +0200, Ruslan Ermilov wrote:
  On Mon, Mar 19, 2001 at 05:52:02PM +0300, Andrey A. Chernov wrote:
   On Mon, Mar 19, 2001 at 16:43:24 +0200, Ruslan Ermilov wrote:
On Mon, Mar 19, 2001 at 05:39:47PM +0300, Andrey A. Chernov wrote:
 On Mon, Mar 19, 2001 at 16:33:37 +0200, Ruslan Ermilov wrote:
  On Mon, Mar 19, 2001 at 04:25:14PM +0300, Andrey A. Chernov wrote:
   Now
   
 add default 1.1.1.1
   
  Perhaps, 1.1.1.1 should be written as HISADDR?
  
 
 No, it ALWAYS 1.1.1.1 and I have static IP address which not changed after
 connection. HISADDR needed only when address changes on the fly.
 
 Moreover, my config works this way all this years.
 
Still, could you please try with HISADDR?
   
   
   I try and it works with HISADDR. 
   But I see no reason why old working variant now broken. It is clear PPP
   incompatibility with new interface way.
   
  It's not only with PPP.  Here is the relevant commitlog, read it carefully,
  especially its second part.
  
  
 
 Do you mean that "add" PPP command now intentionally broken for any
 address excepting *ADDR? Then, what is the reason to have numeric argument
 there? Or do you mean that PPP must be fixed now? Where is the fix?
 
I mean that:

1.  If you use HISADDR, ppp(8) will automatically re-add route after link
is brought down and then back up.

2.  If you use static IP address in ppp.conf, ppp(8) will add that route
only once.  This route will also cache local interface address at the
time the route is added.  Execute `route -vn get default' to see what
I am talking about.

3.  The routing code was fixed to delete routes which use non-existent
interface addresses.  This code will wipe such a route.

4.  If you need routes with static gateway addresses, put `add!' command
to ppp.linkup script.  This way, routes will be activated every time
the link is up, and will use the correct source IP address.

5.  This affects not only ppp(8).  Add default route that points to the
LAN; change the IP address on interface; observe that the default
route has gone away.  The reason is that if we don't do this, we
may end up using the old (now non-existing) local IP address.


Cheers,
-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Alexander Leidinger

On 19 Mr, Ruslan Ermilov wrote:

 5.  This affects not only ppp(8).  Add default route that points to the
 LAN; change the IP address on interface; observe that the default
 route has gone away.  The reason is that if we don't do this, we
 may end up using the old (now non-existing) local IP address.

Yesterday I did a buildworld and an installworld with sources which
contain the fixed routing code (cvsup at ~3pm CET). Today I tried to
dialout-on-demand right after boot. I use ISDN and have
  defaultrouter="-interface isp1"
in my rc.conf. It didn't worked and I found the reason withhin a minute.
There wasn't a defaultroute. So I just added the defaultroute and
everything was fine... until the next time my system tried to
dialout-on-demand. There wasn't a defaultroute again. Boring. Ok, I just
added the defaultroute again and the system dialed out. After this
second "route add default -interface isp1" the defaultroute didn't
disappeared for several dialouts. I haven't rebooted yet to try to
reproduce it.

Perhaps some interesting facts:
---snip---
(33) netchild@ttyp2 % ifconfig isp1
isp1: flags=a010POINTOPOINT,LINK1,MULTICAST mtu 1500
inet 0.0.0.0 -- 0.0.0.1 netmask 0x 
ether 00:00:00:00:00:00 
[Yes, it's down at the moment, I didn't want to dialout at the moment.]

(34) netchild@ttyp2 % route -vn get default
u: inet 0.0.0.0; u: inet 0.0.0.0; u: link ; RTM_GET: Report Metrics: len 168, pid: 0, 
seq 1, errno 0, flags:UP,GATEWAY,STATIC
locks:  inits: 
sockaddrs: DST,NETMASK,IFP
 default default 
   route to: default
destination: default
   mask: default
  interface: isp1
  flags: UP,DONE,STATIC,PRCLONING
 recvpipe  sendpipe  ssthresh  rtt,msecrttvar  hopcount  mtu expire
   0 0 0 0 0 0  1500 0 

locks:  inits: 
sockaddrs: DST,GATEWAY,NETMASK,IFP,IFA
 default isp1:0.0.0.0.0.0 default isp1:0.0.0.0.0.0 default

(35) netchild@ttyp2 % netstat -nr
Routing tables

Internet:
DestinationGatewayFlags Refs Use Netif Expire
default0:0:0:0:0:0USc373 isp1
0.0.0.10.0.0.0UH  00 isp1
127.0.0.1  127.0.0.1  UH  231942  lo0
---snip---

Don't worry if this problem is solved by the commit which fixed a PR
(I've seen it on cvs-all, but hadn't time to have a look at it).

Bye,
Alexander.

-- 
   It's not a bug, it's tradition!

http://www.Leidinger.net   Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Recent interface/routing changes breaks on-demand PPP

2001-03-19 Thread Ruslan Ermilov

On Mon, Mar 19, 2001 at 06:34:34PM +0100, Alexander Leidinger wrote:
 On 19 Mar, Ruslan Ermilov wrote:
 
  5.  This affects not only ppp(8).  Add default route that points to the
  LAN; change the IP address on interface; observe that the default
  route has gone away.  The reason is that if we don't do this, we
  may end up using the old (now non-existing) local IP address.
 
 Yesterday I did a buildworld and an installworld with sources which
 contain the fixed routing code (cvsup at ~3pm CET). Today I tried to
 dialout-on-demand right after boot. I use ISDN and have
   defaultrouter="-interface isp1"
 in my rc.conf. It didn't worked and I found the reason withhin a minute.
 There wasn't a defaultroute. So I just added the defaultroute and
 everything was fine... until the next time my system tried to
 dialout-on-demand. There wasn't a defaultroute again. Boring. Ok, I just
 added the defaultroute again and the system dialed out. After this
 second "route add default -interface isp1" the defaultroute didn't
 disappeared for several dialouts. I haven't rebooted yet to try to
 reproduce it.
 
You will have to add the following command to the relevant section of
ppp.conf:

add default HISADDR

for this to work.


Cheers,
-- 
Ruslan Ermilov  Oracle Developer/DBA,
[EMAIL PROTECTED]   Sunbay Software AG,
[EMAIL PROTECTED]  FreeBSD committer,
+380.652.512.251Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message