On Tue, 27 Oct 1998, Chris Evans wrote:

> I have moved my debian machine home from old workplace and am 
> trying to configure it for ppp access to my university ppp entry 
> point.  I have used pppconfig to enter the basic parameters that 
> work for Win95 ppp access and I can see from plog (after pon) that 
> I am getting a connection to the system and it notes the fixed 
> address that it serves to me (which I have put in my /etc/hosts) and 
> the host address that it uses.  plog then shows a complaint:
>     Cannot determine ethernet address for proxy ARP 
> that was linked with a comment about not replacing existing default 
> route for eth0 so I edited out all the eth0 lines in /etc/init.d/network
> leaving only the loopback lines.  I rebooted and that removed the 
> comment about not replacing the existing default route but....

Here's my /etc/init.d/network on a machine at home. All that needs to
change is the gateway and the network. I think Debian ought to put a
test on the NETWORK variable as well as GATEWAY.

Ignore all the aliasing stuff. The first is for a laptop, the second is
to fool my wife's machine into thinking I'm her employer's gateway when 
it's connected to mine at home.

#!/bin/sh

IPADDR=333.444.888.999
NETMASK=255.255.254.0
#NETWORK=333.444.888.0
BROADCAST=333.444.889.255
#GATEWAY=333.444.888.1

IPALIAS1=192.168.69.49
NETMASK1=255.255.255.0
NETWORK1=192.168.69.0

#IPALIAS2=192.555.666.254
#NETMASK2=255.255.255.0
#NETWORK2=192.555.666.0

ifconfig lo 127.0.0.1
route add -net 127.0.0.0

if [ "${IPADDR}" ]
then
  ifconfig eth0 ${IPADDR} netmask ${NETMASK} broadcast ${BROADCAST}
  [ "${NETWORK}" ] && route add -net ${NETWORK}
  [ "${GATEWAY}" ] && route add default gw ${GATEWAY} metric 1
  echo -e "\t IP    ${IPADDR} \t Mask ${NETMASK} \t Net ${NETWORK}"
  echo -e "\t Brcst ${BROADCAST} \t GW   ${GATEWAY}"

  if [ "${IPALIAS1}" ]
  then
    ifconfig eth0:1 ${IPALIAS1}
    route add -net ${NETWORK1} netmask ${NETMASK1} dev eth0:1
    echo -e "\t "
    echo -e "\t Alias ${IPALIAS1} \t Mask ${NETMASK1} \t Net ${NETWORK1}"

    if [ "${IPALIAS2}" ]
    then
      ifconfig eth0:2 ${IPALIAS2}
      route add -net ${NETWORK2} netmask ${NETMASK2} dev eth0:2
      echo -e "\t "
      echo -e "\t Alias ${IPALIAS2} \t Mask ${NETMASK2} \t Net ${NETWORK2}"

    fi
  fi
fi

Cheers,

-- 
Email:  [EMAIL PROTECTED]   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.

Reply via email to