Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Jan 2000 09:30:12 -0800
From:      Ron 'The InSaNe One' Rosson <insane@lunatic.oneinsane.net>
To:        freebsd-mobile@freebsd.org
Subject:   Re: ppp dialup question + LAN
Message-ID:  <20000119093012.A42414@lunatic.oneinsane.net>
In-Reply-To: <XFMail.000119001002.freebsd@cybcon.com>; from freebsd@cybcon.com on Wed, Jan 19, 2000 at 12:10:02AM -0800
References:  <XFMail.000119001002.freebsd@cybcon.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--cWoXeonUoKmBZSoM
Content-Type: text/plain; charset=us-ascii

You could write a shell/perl script that will initiate your link. I
wrote a simple perl script that bring up my laptops ethernet interface
with some predetermined services depending on what known network it is
on. If I connect to an unknown network w/o dhcp I configure the
interface by hand. Here is a short example with out a dhcp server.

If you would like to see a copy of my simple perl script that I use just
drop me a line.

TIA
Ron

On Wed, 19 Jan 2000, William Woods was heard blurting out:

> I have a laptop that uses PPP to connect to the net, but also, when connected
> to my LAN uses my other FreeBSD box as a gateway. in rc.conf there is
> an entry for defaultrouter="192.168.0.2" when I am on the LAN, what would be an
> easy to switch from LAN to ppp dialup without editing rc.conf commenting out
> the default router and rebooting ? 
> 
> Thanks
> 
> ----------------------------------
> E-Mail: William Woods <freebsd@cybcon.com>
> Date: 19-Jan-00
> Time: 00:08:04
> 
> This message was sent by XFMail
> ----------------------------------
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-mobile" in the body of the message

-- 
-------------------------------------------------------------------
Ron Rosson              	... and a UNIX user said ...
The InSaNe One                 		   rm -rf *
insane@oneinsane.net      	and all was /dev/null and *void()
-------------------------------------------------------------------
UNIX _is_ user-friendly. It's just not ignorant-friendly and idiot-friendly.
Build a system even a fool can use,and only a fool will want to use it.

--cWoXeonUoKmBZSoM
Content-Type: application/x-sh
Content-Disposition: attachment; filename="example.sh"

#!/bin/sh
#
#  This is an example script to bring up your link manually on a laptop for
#  either a LAN or PPP using a modem

MYNAME=`basename $0`

if [ $# -lt 1 ] ; then
	/bin/echo "Usage $MYNAME [ dialup lan ]"
	exit 2
fi

if (echo "$1" |grep -c "dialup" -) then
	/usr/sbin/ppp -auto myisp
else
	/sbin/ifconfig ed0 inet xxx.xxx.xxx.xxx netmask 255.255.255.0
	/sbin/route add default xxx.xxx.xxx.xxx
fi

--cWoXeonUoKmBZSoM--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000119093012.A42414>