diff options
author | brian <brian@FreeBSD.org> | 2002-01-10 14:56:47 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2002-01-10 14:56:47 +0000 |
commit | dc79b4b1018280e451928781fc8304acb3ee3aa2 (patch) | |
tree | c4fa20b1510024d4b691337bfe849f01670ab02f /share/examples | |
parent | 53579573894b4e316099ec6f578ab9cb1bbd03f6 (diff) | |
download | FreeBSD-src-dc79b4b1018280e451928781fc8304acb3ee3aa2.zip FreeBSD-src-dc79b4b1018280e451928781fc8304acb3ee3aa2.tar.gz |
Add an example for testing scalability and concurrency
Diffstat (limited to 'share/examples')
-rw-r--r-- | share/examples/ppp/ppp.conf.sample | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/share/examples/ppp/ppp.conf.sample b/share/examples/ppp/ppp.conf.sample index d88c9eb..db6cdf1 100644 --- a/share/examples/ppp/ppp.conf.sample +++ b/share/examples/ppp/ppp.conf.sample @@ -557,9 +557,9 @@ udp-server: # ppploop 6671/tcp # loopback ppp daemon # # and a line in /etc/inetd.conf: -# ppploop stream tcp nowait root /usr/sbin/ppp ppp -direct loop-in +# ppploop stream tcp nowait root /usr/sbin/ppp ppp -direct inet-loop-in # -loop: +inet-loop: set timeout 0 set log phase chat connect lcp ipcp command set device localhost:ppploop @@ -568,7 +568,7 @@ loop: set ifaddr 127.0.0.2 127.0.0.3 set server /var/run/ppp/loop "" 0177 -loop-in: +inet-loop-in: set timeout 0 set log phase lcp ipcp command allow mode direct @@ -580,10 +580,10 @@ loop-in: # You should already have set up ssh using ssh-agent & ssh-add. # sloop: - load loop + load inet-loop # Passive mode allows ssh plenty of time to establish the connection set openmode passive - set device "!ssh whatevermachine /usr/sbin/ppp -direct loop-in" + set device "!ssh whatevermachine /usr/sbin/ppp -direct inet-loop-in" # or a better VPN solution (which doesn't run IP over a reliable @@ -751,3 +751,43 @@ pppoe-in: enable chap pap passwdauth # Force client authentication set ifaddr 10.0.0.1 10.0.0.100-10.0.0.199 # Hand out up to 100 IP numbers accept dns # Allow DNS negotiation + +# It's possible to run ppp back-to-back with itself. This is useful +# for testing. +# +# When testing scalability and concurrency, the following profile might +# be used. +# +# Note, you'll have to make some other machine adjustments: +# +# o Bump maxusers in your kernel configuration to about 256 so that there +# are enough process table slots. +# o Bump system file descriptors with ``sysctl kern.maxfiles=20480''. You'll +# need 3 descriptors per ppp process (assuming no server socket). +# o If you're not using DEVFS, create device notes with +# ``cd /dev; ./MAKEDEV tun5000''. +# +# You can now create 2000 processes (1000 pairs) with: +# +# n=0 +# while [ $n -lt 1000 ]; do ppp -b loop; n=$(($n + 1)); done +# +# If you want to test concurrency, try using ``ppp -dd loop'' instead. +# +loop: + set timeout 0 + set log + set device "!ppp -direct loop-in" + set dial + set login + set ifaddr 10.0.1.1/0 10.0.10.1-10.0.19.255 + disable deflate pred1 mppe + deny deflate pred1 mppe + +loop-in: + set timeout 0 + set log + allow mode direct + set ifaddr 10.0.10.1/0 10.0.1.1-10.0.9.255 + disable deflate pred1 mppe + deny deflate pred1 mppe |