#---------------------------------------------------------------------------- # /etc/rc.d/rc340.circuits.pppoe - configuration of PPPoE # was file /etc/rc.d/pppoe # # Creation: 09.09.2000 fm # Last Update: $Id$ #---------------------------------------------------------------------------- case $OPT_PPPOE in yes) begin_script CIRCUITS_PPPOE "starting pppoe ..." clampmss="-m 1412" # clamp the MSS lcp_interval=30 # LCP interval lcp_failure=5 # LCP failure count pppoe_timeout=120 # should be 4 * lcp_interval ip link set $PPPOE_ETH mtu 1500 # set mtu to 1500 ip link set $PPPOE_ETH up debug='' usepeerdns='' pppoe_sync='' pppd_sync='' active_filter='' if [ "$PPPOE_TYPE" = "sync" ] then pppoe_sync=-s pppd_sync=sync fi if [ "$PPPOE_DEBUG" = "yes" ] then debug='debug' fi if [ "$PPPOE_USEPEERDNS" = "yes" ] then usepeerdns='usepeerdns' fi # PPPoE invocation PPPOE_CMD="exec /usr/sbin/pppoe -p /var/run/pppoe.pid -I $PPPOE_ETH -T $pppoe_timeout $pppoe_sync $clampmss" echo "\"$PPPOE_USER\" * \"$PPPOE_PASS\" *" >> /etc/ppp/pap-secrets if [ "$PPPOE_TYPE" = "sync" ] then do_modprobe ppp_synctty do_modprobe n_hdlc elif [ "$PPPOE_TYPE" = "async" ] then do_modprobe ppp_async fi if [ "$PPPOE_FILTER" = "yes" ] then active_filter='precompiled-active-filter /etc/ppp/filter' fi if [ "$START_IMOND" = "yes" ] then defaultroute='' # imond handles default route echo $DIALMODE >/var/run/pppoe.dialmode else defaultroute='defaultroute' echo auto >/var/run/pppoe.dialmode fi eval mtu="$PPPOE_MTU" eval mru="$PPPOE_MRU" : ${mtu:=1492} : ${mru:=1492} local=10.112.112.112 remote=10.112.112.113 localll=0::200:0:0:1 remotell=0::200:0:0:2 case "$OPT_IPV6" in yes) ipv6enable='+ipv6' ipv6ifidentifier='ipv6 0::200:0:0:1,0::200:0:0:2' ;; *) ipv6enable='noipv6' ipv6ifidentifier='' ;; esac dev=pppoe echo $local >/var/run/$dev.conf echo $remote >>/var/run/$dev.conf > /var/run/pppoe.HUP cat < /etc/ppp/peers/circuit.$dev $usepeerdns pty "$PPPOE_CMD" noipdefault noauth $defaultroute hide-password nodetach local $debug mtu $mtu mru $mru noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp user "$PPPOE_USER" lcp-echo-interval $lcp_interval lcp-echo-failure $lcp_failure demand persist holdoff 3 maxfail 0 idle $PPPOE_HUP_TIMEOUT $local:$remote $ipv6enable $ipv6ifidentifier ipcp-accept-remote ipcp-accept-local connect true ktune $active_filter $pppd_sync EOF service-restart.sh 1 /usr/sbin/pppd call circuit.$dev & times="$PPPOE_TIMES" usepeerdns="$PPPOE_USEPEERDNS" name="$PPPOE_NAME" chargeint="$PPPOE_CHARGEINT" hup_timeout="$PPPOE_HUP_TIMEOUT" . /etc/rc.d/dsl-circuit-common if [ -f /usr/local/sbin/pppoe-status ] then /usr/local/sbin/pppoe-status >/dev/tty3 & fi end_script ;; esac