home *** CD-ROM | disk | FTP | other *** search
/ Netware Super Library / Netware Super Library.iso / inet_tcp / freetcp / docs / routeos2.txt < prev    next >
Encoding:
Internet Message Format  |  1995-02-24  |  8.8 KB

  1. Path: fwi.uva.nl!sun4nl!EU.net!howland.reston.ans.net!usc!hookup!news.mathworks.com!uunet!juniper.almaden.ibm.com!trall.almaden.ibm.com!trall
  2. From: trall@trall.almaden.ibm.com (Tony Rall)
  3. Newsgroups: comp.os.os2.networking.tcp-ip
  4. Subject: Re: TCP/IP over Ethernet?
  5. Date: 20 Feb 1995 04:56:27 GMT
  6. Organization: IBM Almaden Research Center
  7. Lines: 191
  8. Message-ID: <3i97dr$fm0@juniper.almaden.ibm.com>
  9. References: <3i8mu6$121q@hearst.cac.psu.edu>
  10. Reply-To: trall@almaden.ibm.com (Tony Rall)
  11. NNTP-Posting-Host: trall.almaden.ibm.com
  12.  
  13. In article <3i8mu6$121q@hearst.cac.psu.edu>,
  14. Patrick Wang <pyw100@wileypost.cac.psu.edu> wrote:
  15. >We're having trouble getting a little 'network' operational.  We have a
  16. >computer acting as a router -> PPP connection to Penn State.  That's fine.  We
  17. >have another computer networked to the router, but how do we get it to work?
  18. >We've installed LAPS and messed with ARP and the routing tables for numerous
  19. >hours to no avail.  What should the routing tables look like?
  20.  
  21. The usual problem in these cases is that the router at the other end
  22. of the serial line does not know you have your own little subnet.
  23. Thus, even though you can get your lan packets to him, he'll never
  24. send anything back to your lan machines.  Now you're in for the full
  25. treatment:
  26.  
  27.                         Routing for OS/2 TCP/IP
  28.  
  29. (Wherever "SLIP" is indicated below, any supported point-to-point
  30. protocol could be substituted.  From the routing standpoint, it makes
  31. no difference.)
  32.  
  33. In the examples below, IP addresses are shown using the following
  34. shorthand:
  35.  
  36.   L1 = IP address for interface 1 on subnet L.  For example, if the
  37.   subnet address is 128.1.2.0 (subnet mask = 255.255.255.0), the IP
  38.   address would be 128.1.2.1.
  39.  
  40. Interfaces and addresses
  41. ------------------------
  42.  
  43. Machines don't have IP addresses - interfaces do.  If you have a
  44. machine with two LAN interfaces, you should have two IP addresses.
  45. Normally these addresses would be on different subnets.
  46. Point-to-point interfaces are an exception to this addressing rule -
  47. the address used can match one of the machine's other addresses.  And
  48. the address of the other end of the link doesn't even have to be on
  49. the same "subnet".
  50.  
  51. Also, you do not need to add routes for destinations that are defined
  52. by your interfaces.  For example, if you have a SLIP connection 
  53. defined as:
  54.   ifconfig sl0 S1 S2
  55. no routing definition (a "route add" command) is needed for S2.
  56.  
  57. Some SLIP routers do not have IP addresses for their SLIP interface.
  58. They do, however, have addresses for any LAN interfaces that they
  59. have.  Remote OS/2 machines require that their SLIP interfaces be
  60. configured with a target address; thus it is necessary to either find
  61. out the router's LAN address or make up an address.  In the latter
  62. case, I suggest an address like 172.1.1.1 (which will not be used by
  63. anyone on the connected Internet); also, you will not be able to send
  64. packets with the router as the destination (i.e., you won't be able to
  65. ping the router), but you will be able to send packets through the
  66. router to some distant destination.
  67.  
  68. Names and addresses
  69. -------------------
  70.  
  71. Routing is only concerned with IP addresses (such as 198.79.74.5) and
  72. not IP names (such as www.ibm.com).  Nameservers (or HOSTS files) are
  73. used to translate between names and addresses.  If you start with an
  74. IP name, it will always have to be converted to an address (since that
  75. is what routing requires).  If you start with an address, the name may
  76. not be required, but some applications require that it be possible to
  77. perform the reverse translation from address to name.  But again, that
  78. isn't a routing issue, and names will not be mentioned in the rest of
  79. this discussion.
  80.  
  81. Where routing is configured
  82. ---------------------------
  83.  
  84. Most, if not all, of the changes suggested below for SETUP.CMD and
  85. TCPSTART.CMD (these are in the TCPIP\BIN directory) can be
  86. accomplished by completing the Network, Routing, and Autostart
  87. sections of the TCP/IP configuration notebook (TCPIPCFG.EXE) rather
  88. than simply editing the indicated files.
  89.  
  90. Routing on a machine with a single interface
  91. --------------------------------------------
  92.  
  93.   --------------- LAN
  94.   |      |      |
  95.   L1     L2     L3-----other subnets
  96.                 router
  97.  
  98.   * Static routing
  99.       Simple, cheap, but no recovery from router failure.  In SETUP.CMD,
  100.       for machines such as L1 and L2, add:
  101.         route -f add default L3 1
  102.       The network administrator should provide you with the router's IP
  103.       address.
  104.   * Dynamic routing
  105.       Not very complicated, some cost (requires another process (demon)
  106.       running on your machine that listens for certain broadcast
  107.       packets), can provide automatic recovery from router failure and
  108.       configuration changes.  To use this, at least one router on your
  109.       network must also support RIP, a routing protocol most commonly
  110.       used on end-user networks.  In TCPSTART.CMD, add (or uncomment):
  111.         start routed -q
  112.       or (to avoid having the demon's window appear on your screen):
  113.         start /min routed -q
  114.       or (to avoid routed even showing up in your window list):
  115.         detach routed -q
  116.       You don't need any route statements in SETUP.CMD.
  117.  
  118. Routing a LAN via SLIP to the internet
  119. --------------------------------------
  120.  
  121.   --------------- LAN
  122.   |      |      |         SLIP link
  123.   L1     L2     L3/S1-------------------S2/I1---(the internet)
  124.  
  125.   In this setup, the administrator of the S2/I1 machine (usually a
  126.   commercial Internet provider) must be aware that you have a "network"
  127.   at your end of the SLIP link and not simply a single machine.  That
  128.   administrator usually must assign you the local network address (L)
  129.   that you will be using (as well as the SLIP addresses (S1 and S2).  In
  130.   some cases, the SLIP addresses will be handled dynamically; this would
  131.   usually be handled in SLIPUP.CMD, rather than in SETUP.CMD, on L3/S1.
  132.   (I hope that the LAN addresses, L1, L2, and L3, are not dynamic - I
  133.   wouldn't know how to handle that.)
  134.  
  135.   * The non-SLIP LAN machines (L1, L2)
  136.       In SETUP.CMD, add:
  137.         route -f add default L3 1
  138.   * The SLIP-LAN machine (two IP addresses:  L3 and S1)
  139.       In SETUP.CMD, add:
  140.         route -f add default S2 1
  141.       In TCPSTART.CMD, you may need to start routed (but without the
  142.       "-q" option) - see below:
  143.         start routed
  144.   * Routing required on the "internet" side
  145.       The S2/I1 machine must do something to enable itself and other
  146.       internet machines to be aware of the L network:
  147.       - Use dynamic routing.  If L3/S1 runs routed (without the -q
  148.         (quiet) option), S2/I1 can run routed or gated (preferably
  149.         quietly) to listen for the routing broadcasts from L3/S1.
  150.       - Use static routing.  L3/S1 need not run routed (and some
  151.         traffic on the SLIP link is avoided).  A network route (on
  152.         S2/I1) is needed to the LAN:
  153.           route add net L S1 1
  154.  
  155. Routing a LAN machine via SLIP to a home machine
  156. ------------------------------------------------
  157.  
  158.          SLIP link
  159.   S1-------------------S2/I1---(the office network)
  160.   home                 office
  161.  
  162.   In this setup, the administrator of the office network must provide
  163.   you with your IP addresses.  You need at least 3 of them:  S1, S2, and
  164.   I1.  Ideally S1 and S2 will be on a different subnet than I1 - ask for
  165.   this configuration.  If your network administrator will only provide
  166.   addresses in the same network, you must use the "proxy arp" solution
  167.   below. 
  168.  
  169.   * The home machine
  170.       In SETUP.CMD, add:
  171.         route -f add default S2 1
  172.   * The office (SLIP-LAN) machine
  173.     * Routing to a SLIP subnet
  174.       You simply must be running a routing protocol out the LAN (I1)
  175.       interface.  In TCPSTART.CMD, you need to start routed (but without
  176.       the "-q" option):
  177.         start routed
  178.     * Proxy arp solution - no separate SLIP subnet
  179.       In this case, all of the IP addresses (S1, S2, I1) that you've
  180.       been assigned are on the same subnet.  Normal routing techniques
  181.       will not work because the S1 address (no other LAN machine needs
  182.       to talk to S2) is not physically on the same network as I1.  So
  183.       we try to use a technique called "proxy arp":  the office machine
  184.       will respond on the I network to arp queries for S1 with its own
  185.       adapter address.
  186.  
  187.       First you have to determine the LAN adapter address of the I1
  188.       interface.  Issue "netstat -n" and copy the displayed "physical
  189.       address" for the I1 interface.  In SETUP.CMD, after the "arp -f"
  190.       statement add:
  191.         arp -s S1 12:34:56:78:90:12 pub
  192.       where 12:34:56:78:90:12 is the adapter address of I1.
  193.  
  194.       This tells TCP/IP that when it receives an arp message for IP
  195.       address S1, that it should respond with its own adapter address.
  196.       Thus other machines on the I subnet, when wanting to send to S1,
  197.       will actually transmit to I1.  The S2/I1 machine should forward
  198.       the packet over the SLIP link to S1.
  199.  
  200.  
  201.  
  202. -- 
  203. Tony Rall    trall@almaden.ibm.com
  204.  
  205.