On Tue, Apr 18, 2006 at 11:52:47AM +0930, Brendan Grossman wrote:
> Hi everyone
> 
> To bring up a pppoe connection, I use ppp -ddial provider
> 
> But how do I take it down? 
> 
> Also how do I remove old tunx devices? 
> 
> # ifconfig
> tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
>         inet 219.90.xxx.xxx --> 203.2.124.224 netmask 0xffffffff
>         Opened by PID 71830
> tun1: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
> tun2: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
>         inet 219.90.xxx.xxx --> 219.90.174.215 netmask 0xffffffff
> 
> What the? How do I get rid of the others? tun0 seems to be only in use
> there. 

you can force ppp(8) to always use the same interface with
the '-unit' option (see man page). For instance,

        ppp -ddial -unit0 provider

will always use the tun0 interface. Then, to bring down the
connection:

        kill `cat /var/run/tun0.pid`

and wait few seconds. This will bring down the interface and remove
routes.

HTH, 

-- 
Alexandre

Reply via email to