Hey all.  I've been with Verizon DSL for 3 or 4 months now, and just
when I think I'm getting things right, I start seeing some really
screwy behavior.  ifconfig shows the following for the PPP interface
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492
        inet6 fe80::2a0:c9ff:fe74:12a3%tun0 prefixlen 64 scopeid 0x8 
        inet --> netmask 0xff000000 
        inet --> netmask 0xff000000 
        Opened by PID 67

The weird thing is that the first IP is not valid.  I'm sure this is
not supposed to be the case, but I don't know how I should fix it.  My
/etc/hosts and httpd.conf files were hosed because of it, so I'm going
to have to figure out how to spot this problem in the scripts, and at
least warn about it, if not fix it on the fly.

My domain is served via zoneedit.com, and when a lookup is done of the
domain, it shows the latter IP.  Neither IP is pingable, but the
machine is accessible via the IP in the zoneedit servers, and not the

Is it normal for this to happen?  There was a power cut last week, and
I had to run some manual disk checks before everything came up again.

Is there an easy way to simply release everything and restart ppp,
regrab the IP, and with any luck, restrict it to a single IP?

Right now, I'm grabbing the old and new IP addresses as follows:

OLD_IPADDRESS=`cat /var/db/ppp.ip`
if [ -n "${OLD_IPADDRESS}" ]; then
  echo "Old IP Address: ${OLD_IPADDRESS}"

NEW_IPADDRESS=`/sbin/ifconfig tun0 | grep netmask | awk '{print $2}'`
if [ -n "${NEW_IPADDRESS}" ]; then
  echo "New IP Address: ${NEW_IPADDRESS}"
  echo "Saving New Address"
  echo "${NEW_IPADDRESS}" > /var/db/ppp.ip

if [ "${OLD_IPADDRESS}" != "${NEW_IPADDRESS}" ]; then
. . .

/var/db/ppp.ip had both IPs shown in the ifconfig output shown above,
so I'm probably going to have to change that NEW_IPADDRESS= line to
ensure I only get the last IP.  But can I be sure the last one is
always the right one?

Louis LeBlanc               [EMAIL PROTECTED]
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     ԿԬ

Actual war is a very messy business.  Very, very messy business.
    -- Kirk, "A Taste of Armageddon", stardate 3193.0

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

Reply via email to