When is ppp0 created? - Networking

This is a discussion on When is ppp0 created? - Networking ; I'm trying to write a script for my linux router, i need to add a default route to the ppp0 device even though the link may not have dialed yet (i.e. in the system boot up scenario). The reason is ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: When is ppp0 created?

  1. When is ppp0 created?

    I'm trying to write a script for my linux router, i need to add a
    default route to the ppp0 device even though the link may not have
    dialed yet (i.e. in the system boot up scenario).

    The reason is i wish to make sure *all* packets (apart from route to
    the pptp server itself which will be a host route out of eth0) are
    routed out over ppp0, and if ppp0 is down then they dont go out eth0
    (which connects to the adsl router). I am happy with the fact if ppp0
    is down the packets will fail. However, from running pptp from the
    command line, it seems to only create ppp0 once the link is actually
    up. Can anyone confirm this, or am i able to create routes to ppp0
    shortly after pptp has been called. From my experiements it seems that
    i cant but i would like to be proven wrong!

    Thanks


  2. Re: When is ppp0 created?


    > However, from running pptp from the
    > command line, it seems to only create ppp0 once the link is actually
    > up. Can anyone confirm this, or am i able to create routes to ppp0
    > shortly after pptp has been called. From my experiements it seems that
    > i cant but i would like to be proven wrong!
    >
    > Thanks


    To confirm, running the command below whilst pptp is running but
    before the actual link is established the No Such device error is
    reported.

    root:/etc/ppp/scripts# route add -net 10.19.0.0 netmask 255.255.255.0
    dev ppp0
    route: SIOC[ADD|DEL]RT: No such device

    Checking ifconfig whilst link establishment/negotiation is taking
    place does not show ppp0 either. The command i am using to initiate
    the link is shown below:

    root:~# pptp 200.200.100.100 file /etc/ppp/options.pptp debug nodetach
    using channel 3
    Using interface ppp0
    Connect: ppp0 <--> /dev/pts/1
    sent [LCP ConfReq id=0x1 ]

    As you can see pptp says its using ppp0 yet it doesnt show in ifconfig
    at this point, is there any way to make pptp create the device and
    make it available to the routing table even if it has not fully
    established the link?

    Thanks in advance


+ Reply to Thread