home *** CD-ROM | disk | FTP | other *** search
/ BURKS 2 / BURKS_AUG97.ISO / BURKS / LINUX / HOWTO / mini / slipparp.txt < prev    next >
Text File  |  1997-07-07  |  7KB  |  187 lines

  1.  
  2.              Using SLIP And Proxy ARP To Connect
  3.       A Local Ethernet LAN To An Internet Connected LAN
  4.  
  5.                Dave Kennedy <davek@Muscle.Net>
  6.                      November 20, 1996
  7.  
  8. ---------------------------------------------------------------
  9. $Id: slip-arp,v 1.3 1996/11/20 16:06:51 davek Exp $
  10. ---------------------------------------------------------------
  11.  
  12. ---------------------------------------------------------------
  13.  
  14. 0. Introduction
  15. 1. Other Options Available
  16. 2. The Final Result
  17. 3. Setting It Up
  18. 4. Kernel And Software
  19. 5. Outstanding Issues And Questions
  20. 6. Acknowledgments
  21. 7. Further Reading
  22.  
  23. ---------------------------------------------------------------
  24.  
  25. 0. Introduction
  26.  
  27. In late 1994 and much of 1995, I had a small Ethernet LAN at home that 
  28. I connected to the Internet.  At the time, I did not have my own 
  29. network address and I wanted to piggyback on my employer's network 
  30. address.  I succeeded using SLIP and proxy ARP.  This document quickly 
  31. describes how I did it at the time.  It also provides information on 
  32. other options available now that were not there in 1993/1994.  More 
  33. than likely, these other options will be your best bet.  But, I'm 
  34. continuing to maintain this document for those who need this type of 
  35. solution.  
  36.  
  37. ---------------------------------------------------------------
  38.  
  39. 1. Other Options Available
  40.  
  41. When I originally wrote this mini-HOWTO, the options to connect via a 
  42. dial-up LAN were more limited than today.  If you want to connect a 
  43. local LAN to the Internet via a dial-up connection, you should look 
  44. at:  
  45.  
  46.     IP Masquerade
  47.         http://www.hwy401.com/achau/ipmasq/
  48.         http://www.indyramp.com/masq/
  49.  
  50.     Use of proxy services
  51.         http://harvest.transarc.com/afs/transarc.com/public/trg/Harvest/
  52.         http://harvest.cs.colorado.edu/
  53.  
  54. All links are current as of the date of this document.  I no longer
  55. use this technique; if I had the same requirements today, I would
  56. use IP Masquerade.
  57.  
  58. ---------------------------------------------------------------
  59.  
  60. 2. The Final Result
  61.  
  62. First, I'll present the final result and then describe how to get there.
  63.  
  64. The final network is all on a Class C network (a.b.c.0):
  65.  
  66.            Internet
  67.               |               
  68.       o-------+---------+----------------o     <- Remote Ethernet
  69.                         | .126
  70.                     NetBlazer
  71.                         | .215                 <- SLIP (via 14.4 modem)
  72.                        gw
  73.                         | .253
  74.       o-----------------+--------+-------o     <- Local Ethernet
  75.                                  | .254 
  76.                                 mus
  77.  
  78. ---------------------------------------------------------------
  79.  
  80. 3. Setting It Up
  81.  
  82. The keys to getting this working are routing and proxy ARP.
  83.  
  84. Here is gw's routing table:
  85.  
  86. Kernel routing table
  87. Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
  88.     a.b.c.254   *               255.255.255.255 UH    0      0     5628 eth0
  89.     a.b.c.253   *               255.255.255.255 UH    0      0        0 eth0
  90.     a.b.c.126   *               255.255.255.255 UH    0      0       22 sl0
  91. 127.0.0.0       *               255.0.0.0       U     0      0       32 lo
  92. default             a.b.c.126   *               UG    0      0        9 sl0
  93.  
  94. This table was created with the following commands:
  95.  
  96.     1. The SLIP connection was established which created the default
  97.        gateway entry and the a.b.c.126 entry.
  98.  
  99.     2. ifconfig eth0 a.b.c.253
  100.  
  101.     3. route add a.b.c.253 eth0
  102.  
  103.     4. route add a.b.c.254 eth0
  104.  
  105. Gw is now set up to talk to both eth0 and sl0.  (This might be a good
  106. time to note that my kernel has IP forwarding configured.)  The reason for
  107. the explicit route of a.b.c.253 may not be needed, but ping .253 from .253
  108. without the route causes the ping to take the default route out the SLIP
  109. link.
  110.  
  111.  
  112. Here is mus's routing table:
  113.  
  114. Kernel routing table
  115. Destination     Gateway         Genmask         Flags MSS    Window Use Iface
  116.     a.b.c.253   *               255.255.255.255 UH    1436   0       59 eth0
  117. 127.0.0.0       *               255.0.0.0       U     1936   0       52 lo
  118. default             a.b.c.253   *               UG    1436   0    21661 eth0
  119.  
  120. This table was created with the following commands:
  121.  
  122.     1. ifconfig eth0 a.b.c.254
  123.  
  124.     2. route add a.b.c.253 eth0
  125.  
  126.     3. route add default gw 192.68.22.253
  127.  
  128. Now, at this point I attempted to ping the NetBlazer.  I could see the
  129. packets being sent out the modem (SD was flashing), but there was no
  130. response.  This was good since it indicated that gw was getting packets
  131. in on eth0 (Ethernet) and sending them out sl0 (SLIP).
  132.  
  133. The next step is to get the other side of the SLIP connection (NetBlazer)
  134. to recognize and know how to talk to me.  This was done by using its
  135. proxy arp command.
  136.  
  137.     Usage: proxy <hostid> ether|token|<interface> <mac-addr>
  138.  
  139.     proxy a.b.c.253 ether 00:c0:6d:11:66:d3
  140.     proxy a.b.c.254 ether 00:c0:6d:11:66:e4
  141.  
  142. At this point I was able to ping the Internet from mus.  And all was well
  143. with the world.  :)
  144.  
  145. NOTE: The 'proxy' command is available only on the NetBlazer.  The
  146. equivalent command under linux is 'arp -s <IP> <HW ADDR> pub'.
  147.  
  148. ---------------------------------------------------------------
  149.  
  150. 4. Kernel And Software
  151.  
  152. The kernel used on gw was 1.1.88 with IP Forwarding configured.  This
  153. is required.  The kernel on mus was also 1.1.88, but IP Forwarding
  154. was not configured.  This does not matter.
  155.  
  156. It's also worth noting that PPP could have been used instead of
  157. SLIP just as easily.  [See, I told you this was a long time ago!]
  158.  
  159. ---------------------------------------------------------------
  160.  
  161. 5. Outstanding Issues And Questions
  162.  
  163. The main question I have came up while writing this.  When I checked 
  164. the ARP table on the NetBlazer, my ARP entries were no longer there, but
  165. everything was still working.  I readded the entry for mus and it made
  166. no difference.  If anyone has ideas on this, let me know.
  167.  
  168. ---------------------------------------------------------------
  169.  
  170. 6. Acknowledgments
  171.  
  172. My thanks to John Garnett <garnett@actlab.rtf.utexas.edu> for his
  173. post Dec 21, 1994 "A Guide on Using SLIP with ProxyARP..."  I'm not
  174. so sure that my document is anything more than a rehash of what he
  175. wrote other than I'm using a NetBlazer on the Internet side and he
  176. had a modem attached to a computer.  Anyway, thanks, John!
  177.  
  178. ---------------------------------------------------------------
  179.  
  180. 7. Further Reading
  181.  
  182. Dawson, Terry; "NET-2-HOWTO."
  183. Garnett, John; "A (client) SLIP Guide for Linux."
  184. Lots of other HOWTO's.
  185.  
  186.  
  187.