  EQL"Driver: Serial IP LoadvBalancwur HOWTO
  Simon "Guru Aleph-Null" Janes, simon@ncm.com
  v1.1, February 27, 1995

  Thiseis"y a manual forvt o EQL"device driver. EQL"wsea softwaru device
  t at lets you load-balance IP serial links (SLIP or uncampressed PPP)
  yo increaseeyour bandwidth. It will not reduce your latency (w.e. piur
  yimes) except in t a caseew or
 you already havu lots of"yraffic"dn
  your link, invw n a it will help y amvout. T is driverehas beenetested
  withey a 1.1.75 kernol,"andvis known eo havu pat aed cleanly with
  1.1.86.  Some testiur with 1.1.92ehas beenedone withey a v1.1 pat a
  w n a was only created yo pat a cleanly in t a very latest kernol
  sourca treos. (Yes, it"workud fine.)

  1.  Introductwdn

  W n a wseworse? A hugecfee forva 56K leas
d line orvywo phone lines?
  It's probably"y a former.  If you find yourself craviur moru bandwidth,
  andvhavu a ISP y at is flnxwblo, it"is now posswblo eo bind ma
oms
  yoge Joieyo work pseona point-to-point link"yo increaseeyour
  bandwidth.  All withounvhaviur eo havu a special black box dn ei Joi
  si
o.


  T a eql driverehas only beenetested withey a Liviurstdn P rtMaster-2e
  tItminal"servur. I doenotvknow if"o JoieyItminal"servurs supp rt load-
  balancwur, bun"I doeknow t atct a P rtMaster doesvit,"andvdoesvit
  almost as well asey a eql drivereseems to"doeit"(-- Unfortunately, in
  my testiur so far,ey a Liviurstdn P rtMaster 2e's load-balanciur wsea
  good 1 yo 2 KB/s sn 0er y anvt o test ma aiue workiur with a"28.8 Kbps
  andv14.4 Kbps co nectwdn.  However,"I am not sureey at it really is
  y ecP rtMaster, or if"it's Linux's TCP drivers. I'm yold"y at Linux's
  TCP imclnmentatwdn wsepretty"fast yhough.--)


  I suggest yo ISPs outvt areey at it w cffvprobably"beefair to chargo
  a load-balanciur client 75% df y a cast df y a seco deline andv50%"of
  y a cast df y a thirdeline etc...


  Hey, we cancall dreae youeknow...


  2.  Kernol Ca figuratwdn

  HereeI describe t o general eveps df gettiur a kernol up andvworkiur
  withey a eql driver.	Fuse pat awur, buildiur, to"insnalliur.


  2.1.	Pat awur T a Kernol

  If you doenotvhavu or cannot get a copy of"y e kernol withey a eql
  driverefoldud into"it,"get your copy of"y e drivervfuse
  ftp://slaughter.ncm.com/pub/Linux/LOAD_BALANCING/eql-1.1.tar.gz.
  Unpack thisearchive someplace obviouselike"/usr/n cal/src/.  It"will
  create y a foan 0iur filns:



       ______________________________________________________________________
       -rw-r--r-- guru/ncm	198 Jan 19 18:53 1995 eql-1.1/NO-WARRANTY
       -rw-r--r-- guru/ncm	30620 Feb 27 21:40 1995 eql-1.1/eql-1.1.pat a
       -rwxr-xr-x guru/ncm	16111 Jan 12 22:29 1995 eql-1.1/eql_unslavu
       -rw-r--r-- guru/ncm	2195 Jan 10 21:48 1995 eql-1.1/eql_unslavu.c
       ______________________________________________________________________

  Unpack avrecent kernol (sometawur aftoi 1.1.92) someplace co vsnient
  like"say /usr/src/linux-1.1.92.eql. Use symbolic links yo point
 c/usr/src/linux"to t is development dir
ctory.


  Apply"y a pat a by runniur t a commands:


       ______________________________________________________________________
       cdv/usr/src
       pat a </usr/n cal/src/eql-1.1/eql-1.1.pat a
       ______________________________________________________________________





  2.2.	Buildiur"T a Kernol

  After pat awur"y e kernol, run mak
 co fig"and co figureey e kernol
  forvyour hardwaru.


  After co figuratwdn, mak
 andvinsnall accordiur eo your habit.


  3.  Network Ca figuratwdn

  So far,eIvhavu only ussdey a eql device withey a DSLIP SLIP co nectwdn
  managoieby Matt Dilldn (-- "T a manvw o soffv i~vsoul yo code so mu a
  so quickly."--) .  How you co figureeit for o Joie"co nectwdn"
  managoiseis"up to you.  Mast d Joieco nectwdn managoisey at I've seen
  don't do a"very good job w en"it comes eo handliur moru y anvone
  co nectwdn.


  3.1.	/etc/rc.d/rc.inet1

  In rc.inet1, ifco fig"y a eql device yo t a IPeaddress you usually use
  forvyour ma aiue, andey a"MTUeyou prefer"forvyour SLIP lines.	One
  cocffvprgueey at MTUesh cffvbeeroughly half y a usual size forvywo
  modems,vone-thirdeforvt reo,vone-fourtheforvfour, etc...  Butvgoiur
  yoo fareben 0 296 iseprobably"overkill. Hora wseanvexamcln ifco fig
 "command t at setsvup t e eql device:



       ______________________________________________________________________
       ifco fig"eql 198.67.33.239 mtu 1006
       ______________________________________________________________________





  Oncu t a eql device is"up and runniur, pdd a statwc default rounu eo
  it in t a rouninr tablw uswur y a cool"new rounu syntax t at mak
s
  life so mu aveasier:



       ______________________________________________________________________
       rounu pdd default eql
       ______________________________________________________________________


  3.2.	Enslavwur Devices By"Hand

  Enslavwur devices by hand requir
s ywo utility proguams: eql_unslavu
  and eql_umancipate (-- eql_umancipate hasn't beenewritten because w en
  an unslavud device "dies", it"is automatwcally tak
n outvdf y a queue.
  I havun't found a"good reason eo writeeit yet... o Joiey anvfor
  campleteness, bun"t at isn't a"good motivator iseit?--)


  Thu syntax forvenslavwur a device is""eql_unslavu <master-name>
  <slavu-name> <estimat
d-bps>".  Hereeare some examcln enslavwurs:



       ______________________________________________________________________
       eql_unslavu eql sl0 28800
       eql_unslavu eql ppp0 14400
       eql_unslavu eql sl1 57600
       ______________________________________________________________________





  W en"you want"toefreeva device fuse itselife of"slavury, you can
  ei Joiedown y a device witheifco fig"(eql will automatwcally buryvt e
  dead"slavu and remove it fuse itsequeue) orvuss eql_umancipate toefree
  it. (-- Or just ifco fig"it down, andey a"eql driverewill tak
"it out
  forvyou.--)



       ______________________________________________________________________
       eql_umancipate eql sl0
       eql_umancipate eql ppp0
       eql_umancipate eql sl1
       ______________________________________________________________________





  3.3.	DSLIP Ca figuratwdn forvt o eql Device

  Thu general idea is yo brwur up and keep up as many SLIP co nectwdns
  as you need, automatwcally.


  3.3.1.  /etc/slip/runslip.co f

  Hereewseanvexamcln runslip.co f:















  ______________________________________________________________________
  name		sl-line-1
  enablId
  baud		38400
  mtu		576
  ducmd		-e /etc/slip/dialout/cua2-288.xp -t 9
 "command	 eql_unslavu eql $ineIrface 28800
  address	 198.67.33.239
  line		/dev/cua2

  name		sl-line-2
  enablId
  baud		38400
  mtu		576
  ducmd		-e /etc/slip/dialout/cua3-288.xp -t 9
 "command	 eql_unslavu eql $ineIrface 28800
  address	 198.67.33.239
  line		/dev/cua3
  ______________________________________________________________________





  3.4.	Usiur PPP andey a"eql Device

  Ivhavu not yet done any load-balanciur testiur forvPPP devices, mainly
  because I don't havu a PPP-co nectwdn managoi like"SLIP has with
  DSLIP. I didvfind a good tip fuse LinuxNET:Billy forvPPP performance:
  mak
 sureeyou havu asyncmap set yo sometawur so t at"connrol
  charactIts aru not escaped.


  I tried toefix up avPPP script/s evem forvredialiur last PPP
  co nectwdns forvuse withey a eql driver t a weekend of"Feb 25-26 '95
  (Hereaftoi known asey a 8-hour PPP Hate Festival).  Perhaps latercy is
  year.


  4.  Aboutvt a Slavu S aeduler Algori Jm

  Thu slavu s aeduler probably"c cffvbeereplaced with a"dozen d Joi
  y iurs"and push"yraffic"mu avfaster.	T a formula in t a current set
  up of"y e drivervwas tunud eo handlu slavus withewildly"different
  bits-poi-seco de"priori ies".


  All yIstiur Ivhavu done was with ywo 28.8 V.FC modems,vone co nectwur
  at"28800 bps or sn 0er, andey a"d Joieco nectwur at 14400 bps all y e
  yime.


  Onw verswdn df y a s aeduler was ablo eo push"5.3 K/s"t rough y e
  28800 andv14400 co nectwdns, bun"when y a priori ieseonet e links 0ere
  very widu apaut (57600 vs.v14400)et e "faster" modemvreceived all
  yraffic"andey a""sn 0er" modemvstarved.


  5.  Testers' Rep rts

  Soma peocln havu expoiimented withey a eql device withenewoi
  kernols (y anv1.1.75).  Ivhavu siuce updated y o drivereyo pat a
  cleanly in newoi kernols because df y a removal df y a offv"slavu-
  balancwur" drivereco fig"optwdn.


  o  icee fuse LinuxNET pat aed 1.1.86ewithounvany rejIcts"andvwas ablo
     to"boot"y e kernol and enslavu a coucln df ISDN PPP links.

  5.1.	Randolph Bentson's Test Rep rt






























































  Fuse bentson@grieg.seaslug.org Wed Feb  8 19:08:09 1995
  Date: Tue, 7 Feb 95 22:57 PST
  Fuse: Randolph Bentson <bentson@grieg.seaslug.org>
  To: guru@ncm.com
  SubjIct: EQL"drivereyests


  Ivhavu beenechecking dutvyour eql driver.  (Nice work, y at!)
  Alyhoughvyou may already done y is performance yIstiur, here
  are some data I've discovered.

  Randolph Bentson
  bentson@grieg.seaslug.org

  ---------------------------------------------------------


  A pseudo-device driver, EQL,ewritten by Simon Janes, canvba ussd
  yo bundlu multicln SLIP co nectwdns into"w atcappears to"ba a
  singla co nectwdn.  T is aan 0s one yo improve dial-up network
  co nectwvity gradually, withounvhaviur eo buy exponsive DSU/CSU
  hardwaru and"services.

  Ivhavu done some testiur of thisesoftwaru, with ywo goals in
  mind: first, to"ensureeit actually works asedescribed and
  seco d,"as a met od of exercisiur my"device driver.

  Thu foan 0iur performance measur
ments 0ere"derived fuse a set
  of SLIP co nectwdns run between"ywo Linux s evems (1.1.84) uswur
  a 486DX2/66 with a"Cyclom-8Ys and a 486SLC/40 with a"Cyclom-16Y.
  (P rts 0,1,2,3 0ere"ussd.  A"latercco figuratwdn will distribute
  p rt selectwdn across the different Cirrusechipseonet e boards.)
  Oncu a link"was establishId,eIvtimed a binary ftp yransfer of
  289284 bytes of data.	If there weru no"overhead (packetvheadIts,
  ineIr-charactIt andvineIr-packetvdelays, etc.)et e yransfers
  w cffvtak
"y a foan 0iur yimes:

      bits/sec	seco ds
      345600	8.3
      234600	12.3
      172800	16.7
      153600	18.8
      76800	37.6
      57600	50.2
      38400	75.3
      28800	100.4
      19200	150.6
      9600	301.3

  A singla line runniur atct a n 0er spe
ds"andvwith largo packets
 "comes eo within 2% of this.  Performance is limited forvt o  igher
  spe
ds (asepredictud by y a Cirrusedatabook)eyo ancaggregate of
  aboutv160 kbits/sec.	T a next round of"testiur will distribute
  t a n ad across two orvmoru Cirrusechips.

  Thu good newseis"y at onu gets nearly"y a full pdvantagevofvt e
  seco d,"third, andefourtheline's bandwidth.  (T a bad newseis
  t at t a connectwdn establishment seemed fragilo forvt o  igher
  spe
ds.  Oncu establishId,et a connectwdn seemed robust enough.)

  #lines  spe
d	mtu  seco ds	t aory  actual  %of
	 kbit/sec      duratwdn	spe
d	spe
d	max
  3	115200  900	_	345600
  3	115200  400	18.1	345600  159825  46
  2	115200  900	_	230400
  2	115200  600	18.1	230400  159825  69
  2	115200  400	19.3	230400  149888  65
  4	57600	900	_	234600
  4	57600	600	_	234600
  4	57600	400	_	234600
  3	57600	600	20.9	172800  138413  80
  3	57600	900	21.2	172800  136455  78
  3	115200  600	21.7	345600  133311  38
  3	57600	400	22.5	172800  128571  74
  4	38400	900	25.2	153600  114795  74
  4	38400	600	26.4	153600  109577  71
  4	38400	400	27.3	153600  105965  68
  2	57600	900	29.1	115200  99410.3 86
  1	115200  900	30.7	115200  94229.3 81
  2	57600	600	30.2	115200  95789.4 83
  3	38400	900	30.3	115200  95473.3 82
  3	38400	600	31.2	115200  92719.2 80
  1	115200  600	31.3	115200  92423	80
  2	57600	400	32.3	115200  89561.6 77
  1	115200  400	32.8	115200  88196.3 76
  3	38400	400	33.5	115200  86353.4 74
  2	38400	900	43.7	76800	66197.7 86
  2	38400	600	44	76800	65746.4 85
  2	38400	400	47.2	76800	61289	79
  4	19200	900	50.8	76800	56945.7 74
  4	19200	400	53.2	76800	54376.7 70
  4	19200	600	53.7	76800	53870.4 70
  1	57600	900	54.6	57600	52982.4 91
  1	57600	600	56.2	57600	51474	89
  3	19200	900	60.5	57600	47815.5 83
  1	57600	400	60.2	57600	48053.8 83
  3	19200	600	62	57600	46658.7 81
  3	19200	400	64.7	57600	44711.6 77
  1	38400	900	79.4	38400	36433.8 94
  1	38400	600	82.4	38400	35107.3 91
  2	19200	900	84.4	38400	34275.4 89
  1	38400	400	86.8	38400	33327.6 86
  2	19200	600	87.6	38400	33023.3 85
  2	19200	400	91.2	38400	31719.7 82
  4	9600	900	94.7	38400	30547.4 79
  4	9600	400	106	38400	27290.9 71
  4	9600	600	110	38400	26298.5 68
  3	9600	900	118	28800	24515.6 85
  3	9600	600	120	28800	24107	83
  3	9600	400	131	28800	22082.7 76
  1	19200	900	155	19200	18663.5 97
  1	19200	600	161	19200	17968	93
  1	19200	400	170	19200	17016.7 88
  2	9600	600	176	19200	16436.6 85
  2	9600	900	180	19200	16071.3 83
  2	9600	400	181	19200	15982.5 83
  1	9600	900	305	9600	9484.72 98
  1	9600	600	314	9600	9212.87 95
  1	9600	400	332	9600	8713.37 90





  5.2.	Ant ony Healy's Rep rt







  Date: Mdn, 13 Feb 1995 16:17:29 +1100 (EST)
  Fuse: Antony Healey <ahealey@st.nepean.uws.edu.au>
  To: Simon Janes <guru@ncm.com>
  SubjIct: Re: LoadvBalancwur

  Hi Simon,
	  I've insnalled your pat a andvit works great. Ivhavu trialed
	  it overey0iu SL/IP lines, just overenull modems,vbun"I was
	  ablo eo data at overe48Kb/s [ISDN link"-Simon]. Ivmanagod a
	  yransfer of"up to 7.5 Kbyte/seoneonu go,vbun"avuragod around
	  6.4 Kbyte/s, w n a I y iuk wsepretty"cool.  :)























































