home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / SATRIANI / tcpadmin.txt < prev    next >
Text File  |  2000-05-25  |  180KB  |  3,472 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                              Introduction
  10.                                   to
  11.                             Administration
  12.                                 of an
  13.                             Internet-based
  14.                             Local Network
  15.  
  16.  
  17.  
  18.                       C                       R
  19.  
  20.                               C       S
  21.                   Computer Science Facilities Group
  22.                               C       I
  23.  
  24.                       L                       S
  25.  
  26.  
  27.                                RUTGERS
  28.                   The State University of New Jersey
  29.             Center for Computers and Information Services
  30.                Laboratory for Computer Science Research
  31.  
  32.  
  33.                             3 October 1988
  34.  
  35. This  is an introduction for people who intend to set up or administer
  36. a network based on the Internet networking protocols (TCP/IP).
  37.  
  38. Copyright (C) 1988, Charles L. Hedrick.   Anyone  may  reproduce  this
  39. document,  in  whole  or  in  part,  provided  that:   (1) any copy or
  40. republication of the entire document must show Rutgers  University  as
  41. the  source,  and  must  include this notice; and (2) any other use of
  42. this material must reference this manual and Rutgers  University,  and
  43. the fact that the material is copyright by Charles Hedrick and is used
  44. by permission.
  45.  
  46.  
  47.  
  48. Unix is a trademark of AT&T Technologies, Inc.
  49.  
  50.  
  51.  
  52.                           Table of Contents
  53.  
  54.  
  55.    1. The problem                                                    1
  56.        1.1 Some comments about terminology                           2
  57.    2. Routing and Addressing                                         2
  58.    3. Choosing an addressing structure                               5
  59.        3.1 Should you subdivide your address space?                  6
  60.        3.2 Subnets vs. multiple network numbers                      6
  61.        3.3 How to allocate subnet or network numbers                 8
  62.        3.4 Dealing with multiple "virtual" subnets on one network    9
  63.            3.4.1 Dealing with Multiple  Subnets  by  Turning  off   10
  64.                  Subnetting
  65.            3.4.2 Multiple Subnets: Implications for Broadcasting    11
  66.        3.5 Choosing an address class                                11
  67.        3.6 Dialup  IP  and  Micro  gateways: Dynamically assigned   12
  68.            addresses
  69.            3.6.1 Dialup IP                                          12
  70.            3.6.2 Micro gateways                                     14
  71.    4. Network-wide Services, Naming                                 15
  72.    5. Setting up routing for an individual computer                 19
  73.        5.1 How datagrams are routed                                 21
  74.        5.2 Fixed routes                                             23
  75.        5.3 Routing redirects                                        24
  76.        5.4 Other ways for hosts to find routes                      26
  77.            5.4.1 Spying on Routing                                  26
  78.            5.4.2 Proxy ARP                                          27
  79.            5.4.3 Moving to New Routes After Failures                32
  80.    6. Bridges and Gateways                                          35
  81.        6.1 Alternative Designs                                      36
  82.            6.1.1 A mesh of point to point lines                     36
  83.            6.1.2 Circuit switching technology                       37
  84.            6.1.3 Single-level networks                              37
  85.            6.1.4 Mixed designs                                      38
  86.        6.2 An introduction to alternative switching technologies    39
  87.            6.2.1 Repeaters                                          40
  88.            6.2.2 Bridges and gateways                               41
  89.            6.2.3 More about bridges                                 43
  90.            6.2.4 More about gateways                                44
  91.        6.3 Comparing the switching technologies                     45
  92.            6.3.1 Isolation                                          45
  93.            6.3.2 Performance                                        46
  94.            6.3.3 Routing                                            47
  95.            6.3.4 Network management                                 49
  96.            6.3.5 A final evaluation                                 52
  97.    7. Configuring Gateways                                          52
  98.        7.1 Configuring routing for gateways                         55
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.                                   i
  108.  
  109.  
  110.  
  111. This document is intended to help people who are planning to set up  a
  112. new  network  based  on  the  Internet  protocols, or to administer an
  113. existing one.    It  assumes  a  basic  familiarity  with  the  TCP/IP
  114. protocols,  particularly  the  structure  of  Internet  addresses.   A
  115. companion paper, "Introduction to the Internet Protocols", may provide
  116. a  convenient introduction.  This document does not attempt to replace
  117. technical  documentation  for  your  specific  TCP/IP  implementation.
  118. Rather, it attempts to give overall background that is not specific to
  119. any  particular  implementation.    It  is  directed  specifically  at
  120. networks  of "medium" complexity.  That is, it is probably appropriate
  121. for a network involving several dozen buildings.   Those  planning  to
  122. manage  larger networks will need more preparation than you can get by
  123. reading this document.
  124.  
  125. In a number of cases, commands  and  output  from  Berkeley  Unix  are
  126. shown.    Most  computer  systems  have  commands  that are similar in
  127. function to these.  It seemed more useful to give some actual examples
  128. that  to  limit  myself to general talk, even if the actual output you
  129. see is slightly different.
  130.  
  131.  
  132.  
  133. 1. The problem
  134.  
  135.  
  136. This document will emphasize primarily "logical" network architecture.
  137. There  are many documents and articles in the trade press that discuss
  138. actual network media, such as Ethernet, Token  Ring,  etc.    What  is
  139. generally  not  made  clear  in  these  articles is that the choice of
  140. network media is generally not  all  that  critical  for  the  overall
  141. design  of  a  network.   What can be done by the network is generally
  142. determined more by the network protocols supported, and the quality of
  143. the  implementations.  In practice, media are normally chosen based on
  144. purely pragmatic grounds: what media are supported by  the  particular
  145. types  of  computer that you have to connect, the distance you have to
  146. go, and the logistics of installing various kinds of cable.  Generally
  147. this means that Ethernet is used for medium-scale systems, Ethernet or
  148. a network  based  on  twisted-pair  wiring  for  micro  networks,  and
  149. specialized high-speed networks (typically token ring) for campus-wide
  150. backbones, and for local networks involving super-computer  and  other
  151. very high-performance applications.
  152.  
  153. Thus  this  document  assumes  that  you  have  chosen  and  installed
  154. individual networks such as Ethernet or token ring,  and  your  vendor
  155. has  helped  you connect your computers to these network.  You are now
  156. faced with the interrelated problems of
  157.  
  158.    - configuring the software on your computers
  159.  
  160.    - finding a way to connect individual Ethernets, token rings, etc.,
  161.      to form a single coherent network
  162.  
  163.    - connecting your networks to the outside world
  164.  
  165. My  primary  thesis in this document is that these decisions require a
  166.                                   1
  167.  
  168.  
  169.  
  170. bit  of  advance  thought.    In   fact,   most   networks   need   an
  171. "architecture".   This consists of a way of assigning addresses, a way
  172. of doing routing, and various choices about how  hosts  interact  with
  173. the  network.  These decisions need to be made for the entire network,
  174. preferably when it is first being installed.
  175.  
  176.  
  177.  
  178. 1.1 Some comments about terminology
  179.  
  180.  
  181. I am going to use the term "IP" throughout this document to  refer  to
  182. networks  designed  to carry TCP/IP.  IP is the network-level protocol
  183. from the Internet (TCP/IP) family of protocols.   Thus  it  is  common
  184. practice  to  use  the term "IP" when referring to addresses, routing,
  185. and other network-layer items.  In fact the distinction is not  always
  186. very  clear.    So  in practice the terms Internet, TCP/IP, and IP may
  187. appear to be almost interchangeable.
  188.  
  189. The terms "packet" and "datagram"  are  also  almost  interchangeable.
  190. Ideally,  "packet" is used for the lowest-level physical unit, whereas
  191. "datagram" refers to a unit of data at the level of IP.  However these
  192. are identical for most media, so people have nearly stopped making the
  193. distinction.  I have tried to use the  terms  correctly,  even  though
  194. these days it may sound a bit pedantic.  The term "packet" seems to be
  195. winning out in  common  speech.    For  example,  gateway  speeds  are
  196. generally  given  in  "packets  per  second."    I  have used the more
  197. technically accurate  "datagrams  per  second,"  since  it  is  really
  198. datagrams that are being counted.
  199.  
  200. I  use  the  term  "gateway"  where  some  other authors use "router."
  201. "Gateway" is the original  Internet  term.    Unfortunately,  the  ISO
  202. community  has  begun  using  the  same  word  with a rather different
  203. meaning.  People have started using "router" because it  doesn't  have
  204. this  ambiguity.    I am continuing to use "gateway" because, like the
  205. companion Introduction to the Internet  Protocols,  this  document  is
  206. intended to help you make sense of the Internet specifications.  Those
  207. specifications use "gateway."
  208.  
  209.  
  210.  
  211. 2. Routing and Addressing
  212.  
  213.  
  214. Many of the decisions that you need  to  make  in  setting  up  an  IP
  215. network  depend  upon  routing,  so  it  will be best to give a bit of
  216. background on that topic now.  I will return to  routing  in  a  later
  217. section  when  discussing  gateways  and  bridges.    In  general,  IP
  218. datagrams pass through many networks as they  are  going  between  the
  219. source and destination.  Here's a typical example.  (Addresses used in
  220. the examples are taken from Rutgers University.)
  221.  
  222.  
  223.  
  224.  
  225.                                   2
  226.  
  227.  
  228.  
  229.               network 1               network 2     network 3
  230.                128.6.4                 128.6.21      128.121
  231.         ============================  ==========  ================
  232.           |              |        |    |      |    |         |
  233.        ___|______   _____|____  __|____|__  __|____|____  ___|________
  234.        128.6.4.2    128.6.4.3   128.6.4.1   128.6.21.1    128.121.50.2
  235.                                 128.6.21.2  128.121.50.1
  236.        __________   __________  __________  ____________  ____________
  237.        computer A   computer B   gateway R    gateway S    computer C
  238.  
  239.  
  240. This diagram shows three normal computer systems,  two  gateways,  and
  241. three  networks.  The networks might be Ethernets, token rings, or any
  242. other sort.  Network 2 could even be a  single  point  to  point  line
  243. connecting gateways R and S.
  244.  
  245. Note  that computer A can send datagrams to computer B directly, using
  246. network 1.  However it can't reach computer  C  directly,  since  they
  247. aren't  on  the  same  network.    There  are  several ways to connect
  248. separate networks.  This diagram assumes that gateways are used. (In a
  249. later  section,  we'll look at alternatives.)  In this case, datagrams
  250. going between A and C must be sent through gateway R, network  2,  and
  251. gateway   S.   Every  computer  that  uses  TCP/IP  needs  appropriate
  252. information and algorithms to allow it to know when datagrams must  be
  253. sent through a gateway, and to choose an appropriate gateway.
  254.  
  255. Routing  is  very  closely tied to the choice of addresses.  Note that
  256. the address of each computer begins with the  number  of  the  network
  257. that  it's  attached  to.    Thus  128.6.4.2 and 128.6.4.3 are both on
  258. network 128.6.4.  Next, notice that gateways, whose job is to  connect
  259. networks,  have  an  address  on each of those networks.  For example,
  260. gateway R connects networks 128.6.4 and 128.6.21.  Its  connection  to
  261. network  128.6.4 has the address 128.6.4.1.  Its connection to network
  262. 128.6.21 has the address 128.6.21.2.
  263.  
  264. Because of this association between addresses  and  networks,  routing
  265. decisions  can  be  based  strictly  on  the  network  number  of  the
  266. destination.  Here's what the routing information for computer A might
  267. look like:
  268.  
  269.        network    gateway     metric
  270.  
  271.        128.6.4    none        0
  272.        128.6.21   128.6.4.1   1
  273.        128.121    128.6.4.1   2
  274.  
  275. From  this  table, computer A can tell that datagrams for computers on
  276. network 128.6.4 can be sent directly, and datagrams for  computers  on
  277. networks  128.6.21  and  128.121  need  to  be  sent  to gateway R for
  278. forwarding.  The "metric" is used by  some  routing  algorithms  as  a
  279. measure  of how far away the destination is.  In this case, the metric
  280. simply indicates how many gateways the datagram  has  to  go  through.
  281. (This is often referred to as a "hop count".)
  282.  
  283. When  computer  A  is  ready  to  send  a  datagram,  it  examines the
  284.                                   3
  285.  
  286.  
  287.  
  288. destination address.  It gets the network number from the beginning of
  289. the  address,  and  then  looks in the routing table.  The table entry
  290. indicates  whether  the  datagram  should  be  sent  directly  to  the
  291. destination or to a gateway.
  292.  
  293. Note  that  a  gateway  is  simply a computer that is connected to two
  294. different networks, and is prepared to forward datagrams between them.
  295. In  many  cases  it is most efficient to use special-purpose equipment
  296. that are designed as gateways.  However it is  perfectly  possible  to
  297. use  ordinary  computers,  as  long as they have more than one network
  298. interface, and their software is prepared to forward datagrams.   Most
  299. major TCP/IP implementations (even for microcomputers) are designed to
  300. let you use your computer as a gateway.  However some of this software
  301. has limitations that can cause trouble for your network.
  302.  
  303. Note that a gateway has several addresses -- one for each network that
  304. it's attached to.  This is a difference  between  IP  and  some  other
  305. network  protocols: each interface from a computer to a network has an
  306. address.  With some  other  protocols,  each  computer  has  only  one
  307. address,  which  applies  to all of its interfaces.  A gateway between
  308. networks 128.6.4 and 128.6.21 will have an address  that  begins  with
  309. 128.6.4  (for  example,  128.6.4.1).    This  address  refers  to  its
  310. connection to network 128.6.4.  It will  also  have  an  address  that
  311. begins  with  128.6.21  (for example, 128.6.21.2).  This refers to its
  312. connection to network 128.6.21.
  313.  
  314. The term "network" probably makes you think of things  like  Ethernet,
  315. which  can  have  many  machines attached.  However it also applies to
  316. point to point lines.  In the diagram above, networks 1 and 3 could be
  317. in different cities.  Then network 2 could be a serial line, satellite
  318. link, or other long-distance point to point connection between the two
  319. locations.    A  point to point line is treated as a network that just
  320. happens to have only two computers on it.  As with any other  network,
  321. the  point to point line has a network number (in this case 128.6.21).
  322. The systems connected by the line (gateways R and S) have addresses on
  323. that network (in this case 128.6.21.1 and 128.6.21.2).
  324.  
  325. It  is  possible  to  design  routing software that does not require a
  326. separate network number for each point to point line.  In  that  case,
  327. the  interface between the gateway and the point to point line doesn't
  328. have an address.  This can be useful if your network is so large  that
  329. you  are  in  danger  of running out of network numbers.  However such
  330. "anonymous interfaces"  can  make  network  management  somewhat  more
  331. difficult.    If  there is no address, network management software may
  332. have no way to refer to the interface.  Thus you may not  be  able  to
  333. get data on throughput and errors for that interface.
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.                                   4
  344.  
  345.  
  346.  
  347. 3. Choosing an addressing structure
  348.  
  349.  
  350. The  first  comment  to  make about addresses is a warning: Before you
  351. start using an IP network, you must get one or more  official  network
  352. numbers.    IP  addresses  look like this: 128.6.4.3.  This address is
  353. used by one computer at Rutgers University.  The  first  part  of  it,
  354. 128.6,  is  a  network  number,  allocated  to  Rutgers  by  a central
  355. authority.  Before you start allocating addresses to  your  computers,
  356. you  must  get an official network number.  Unfortunately, some people
  357. set up networks using either a randomly-chosen number,  or  a  generic
  358. number  supplied by the vendor.  While this may work in the short run,
  359. it is a very bad idea for the long run.  Eventually, you will want  to
  360. connect  your  network  to some other organization's network.  Even if
  361. your organization is highly secret and very concerned about  security,
  362. somewhere  in  your  organization  there  is  going  to  be a research
  363. computer that ends up being connected to a nearby  university.    That
  364. university  will  probably  be  connected  to  a  large-scale national
  365. network.  As soon as one of your datagrams escapes your local network,
  366. the  organization you are talking to is going to become very confused,
  367. because the addresses that  appear  in  your  datagrams  are  probably
  368. officially allocated to someone else.
  369.  
  370. The  solution  to this is simple: get your own network number from the
  371. beginning.  It costs nothing.  If you delay it,  then  sometime  years
  372. from  now  you  are  going  to be faced with the job of changing every
  373. address on a large network.  Network numbers are currently assigned by
  374. the  DDN Network Information Center, SRI International, 333 Ravenswood
  375. Avenue, Menlo Park, California 94025 (telephone: 800-235-3155).    You
  376. can  get  a  network  number no matter what your network is being used
  377. for.  You do not need authorization to connect  to  the  Defense  Data
  378. Network  in order to get a number.  The main piece of information that
  379. will be needed when you apply for a  network  number  is  the  address
  380. class that you want.  See below for a discussion of this.
  381.  
  382. In  many ways, the most important decision you have to make in setting
  383. up a network is how you will assign IP addresses  to  your  computers.
  384. This  choice  should be made with a view of how your network is likely
  385. to grow.  Otherwise, you will find that you have to change  addresses.
  386. When you have several hundred computers, address changes can be nearly
  387. impossible.
  388.  
  389. Addresses are critical because IP datagrams are routed on the basis of
  390. their  address.    For example, addresses at Rutgers University have a
  391. 2-level structure.  A typical address is 128.6.4.3.  128.6 is assigned
  392. to  Rutgers  University.    As  far as the outside world is concerned,
  393. 128.6 is a single network.  Other universities send any datagram whose
  394. address  begins  with  128.6  to the nearest Rutgers gateway.  However
  395. within Rutgers, we divide up our address space into "subnets".  We use
  396. the next 8 bits of address to indicate which subnet a computer belongs
  397. to.    128.6.4.3  belongs  to  subnet  128.6.4.    Generally   subnets
  398. correspond  to physical networks, e.g. separate Ethernets, although we
  399. will see some exceptions later.  Systems inside Rutgers, unlike  those
  400. outside,  contain  information about the Rutgers subnet structure.  So
  401. once a datagram for 128.6.4.3 arrives at Rutgers, the Rutgers  network
  402.                                   5
  403.  
  404.  
  405.  
  406. will  route  it to the departmental Ethernet, token ring, or whatever,
  407. that has been assigned subnet number 128.6.4.
  408.  
  409. When you start a network, there are several addressing decisions  that
  410. face you:
  411.  
  412.    - Do you subdivide your address space?
  413.  
  414.    - If so, do you use subnets or class C addresses?
  415.  
  416.    - How big an address space do you need?
  417.  
  418.  
  419.  
  420. 3.1 Should you subdivide your address space?
  421.  
  422.  
  423. It  is  not  necessary  to  use  subnets  at  all.   There are network
  424. technologies that allow an entire campus or company to act as a single
  425. large  logical Ethernet, so that no internal routing is necessary.  If
  426. you use this technology, then  you  do  not  need  to  subdivide  your
  427. address  space.    In that case, the only decision you have to make is
  428. what class of address to apply for.  However we recommend using either
  429. a  subnet  approach  or  some other method of subdividing your address
  430. space in most networks:
  431.  
  432.    - In section 6.2 we will argue that internal gateways are desirable
  433.      for all networks beyond the very simplest.
  434.  
  435.    - Even if you do not need gateways now, you may find later that you
  436.      need to  use  them.  Thus  it  probably  makes  sense  to  assign
  437.      addresses  as  if  each Ethernet or token ring were going to be a
  438.      separate subnet.  This will allow for conversion to real  subnets
  439.      later if it proves necessary.
  440.  
  441.    - For  network  maintenance  purposes,  it  is  convenient  to have
  442.      addresses whose structure corresponds to  the  structure  of  the
  443.      network.   For example, when you see a stray datagram from system
  444.      128.6.4.3, it is nice to know that all addresses  beginning  with
  445.      128.6.4 are in a particular building.
  446.  
  447.  
  448.  
  449. 3.2 Subnets vs. multiple network numbers
  450.  
  451.  
  452. Suppose  that  you have been convinced that it's a good idea to impose
  453. some structure on your addresses.  The  next  question  is  what  that
  454. structure should be.  There are two basic approaches.  One is subnets.
  455. The other is multiple network numbers.
  456.  
  457. The Internet  standards  specify  the  format  of  an  address.    For
  458. addresses  beginning  with  128  through  191 (the most common numbers
  459. these days), the first two octets form the network number.    E.g.  in
  460. 140.3.50.1, 140.3 is the network number.  Network numbers are assigned
  461.                                   6
  462.  
  463.  
  464.  
  465. to a particular organization.  What you do with the next two octets is
  466. up  to  you.    You  could  choose  to make the next octet be a subnet
  467. number, or you could use some other scheme entirely.  Gateways  within
  468. your  organization  must  be set up to know the subnetting scheme that
  469. you are using.  However outside your organization, no  one  will  know
  470. that 140.3.50 is one subnet and 140.3.51 is another.  They will simply
  471. know that 140.3 is your organization.  Unfortunately, this ability  to
  472. add additional structure to the address via subnets was not present in
  473. the original IP specifications.  Thus some older software is incapable
  474. of being told about subnets.
  475.  
  476. If  enough of the software that you are using has this problem, it may
  477. be impractical for you to use subnets.  Some organizations have used a
  478. different  approach.   It is possible for an organization to apply for
  479. several network numbers.  Instead of dividing a single network number,
  480. say  140.3,  into  several subnets, e.g. 140.3.1 through 140.3.10, you
  481. could apply for 10 different network  numbers.    Thus  you  might  be
  482. assigned  the  range  140.3 through 140.12.  All IP software will know
  483. that these are different network numbers.
  484.  
  485. While using separate network numbers will work just fine  within  your
  486. organization,  it  has two very serious disadvantages.  The first, and
  487. less serious, is that it wastes address space.  There are  only  about
  488. 16,000  possible  class  B addresses.  We cannot afford to waste 10 of
  489. them on your organization, unless it is very large.  This objection is
  490. less  serious because you would normally ask for class C addresses for
  491. this  purpose,  and  there  are  about  2  million  possible  class  C
  492. addresses.
  493.  
  494. The  more  serious  problem  with using several network numbers rather
  495. than subnets is that it overloads the routing tables in  the  rest  of
  496. the Internet.  As mentioned above, when you divide your network number
  497. into subnets, this division is known within your organization, but not
  498. outside  it.    Thus  systems  outside your organization need only one
  499. entry in their tables in order to be able to reach you.    E.g.  other
  500. universities  have entries in their routing tables for 128.6, which is
  501. the Rutgers network number.  If you use a  range  of  network  numbers
  502. instead  of  subnets,  that  division  will  be  visible to the entire
  503. Internet.  If we used 128.6  through  128.16  instead  of  subdividing
  504. 128.6, other universities would need entries for each of those network
  505. numbers in their routing tables.   As  of  this  writing  the  routing
  506. tables  in many of the national networks are exceeding the size of the
  507. current  routing  technology.    It  would  be  considered   extremely
  508. unfriendly  for  any organization to use more than one network number.
  509. This may not be a problem if your network is going  to  be  completely
  510. self-contained,  or if only one small piece of it will be connected to
  511. the  outside  world.    Nevertheless,  most  TCP/IP  experts  strongly
  512. recommend  that  you  use  subnets rather than multiple networks.  The
  513. only reason for considering multiple networks is to deal with software
  514. that  cannot  handle subnets.  This was a problem a few years ago, but
  515. is currently less serious.   As  long  as  your  gateways  can  handle
  516. subnets,  you  can deal with a few individual computers that cannot by
  517. using "proxy ARP" (see below).
  518.  
  519. One warning about subnets: Your subnets must all be "adjacent".   That
  520.                                   7
  521.  
  522.  
  523.  
  524. is,  you  can't have a configuration where you get from subnet 128.6.4
  525. to subnet 128.6.5 by going through some other network  entirely,  e.g.
  526. 128.121.    For  example,  Rutgers  has  campuses in New Brunswick and
  527. Newark.  It is perfectly OK for the networks  in  both  cities  to  be
  528. subnets  of  128.6.    However  in  that  case,  the  lines beween New
  529. Brunswick and Newark must also be part of 128.6.  Suppose  we  decided
  530. to  use  a  regional  network  such as JvNCnet to talk between our two
  531. campuses, instead of providing  our  own  lines.    Since  JvNCnet  is
  532. 128.121,  the  gateways  and serial lines that they provide would have
  533. addresses that begin with 128.121.  This violate the rules.  It is not
  534. allowable  to  have  gateways  or  lines  that  are  part  of  128.121
  535. connecting two parts of 128.6.  So if we wanted to use JvNCnet between
  536. our  two  campuses, we'd have to get different network numbers for the
  537. two campuses.  (This rule  is  a  result  of  limitations  in  routing
  538. technology.    Eventually  gateway software will probably be developed
  539. that can deal with configurations whose networks are not contiguous.)
  540.  
  541.  
  542.  
  543. 3.3 How to allocate subnet or network numbers
  544.  
  545.  
  546. Now that you have decided to use subnets or multiple network  numbers,
  547. you  have  to  decide  how  to allocate them.  Normally this is fairly
  548. easy.  Each physical network, e.g. Ethernet or token ring, is assigned
  549. a  separate  subnet  or  network  number.    However  you do have some
  550. options.
  551.  
  552. In some cases it may make sense to assign several subnet numbers to  a
  553. single  physical  network.   At Rutgers we have a single Ethernet that
  554. spans three buildings, using repeaters.  It is very clear to  us  that
  555. as  computers  are  added  to this Ethernet, it is going to have to be
  556. split into several separate Ethernets.  In order to  avoid  having  to
  557. change  addresses when this is done, we have allocated three different
  558. subnet numbers to this Ethernet, one per building.    (This  would  be
  559. handy  even  if  we didn't plan to split the Ethernet, just to help us
  560. keep track of where computers are.)  However before doing  this,  make
  561. very  sure  that  the  software  on all of your computers can handle a
  562. network that has three different network numbers on it.  This issue is
  563. discussed in more detail in section 3.4.
  564.  
  565. You also have to choose a "subnet mask".  This is used by the software
  566. on your systems to separate the subnet from the rest of  the  address.
  567. So  far  we  have  always  assumed  that  the first two octets are the
  568. network number, and the next octet is the subnet number.  For class  B
  569. addresses,  the  standards  specify  that the first two octets are the
  570. network number.  However we are free to choose  the  boundary  between
  571. the  subnet  number  and the rest of the address.  It's very common to
  572. have a one-octet subnet number,  but  that's  not  the  only  possible
  573. choice.  Let's look again at a class B address, e.g. 128.6.4.3.  It is
  574. easy to see that if the third octet is used for a subnet number, there
  575. are 256 possible subnets and within each subnet there are 256 possible
  576. addresses.  (Actually, the numbers are more  like  254,  since  it  is
  577. generally a bad idea to use 0 or 255 for subnet numbers or addresses.)
  578. Suppose you know that you will never have more than 128 computers on a
  579.                                   8
  580.  
  581.  
  582.  
  583. given subnet, but you are afraid you might need more than 256 subnets.
  584. (For example, you might have a campus with lots of  small  buildings.)
  585. In that case, you could define 9 bits for the subnet number, leaving 7
  586. bits for addresses within each subnet.  This choice is expressed by  a
  587. bit  mask,  using  ones  for  the  bits used by the network and subnet
  588. number, and 0's for the bits  used  for  individual  addresses.    Our
  589. normal  subnet  mask  choice is given as 255.255.255.0.  If we chose 9
  590. bit subnet numbers and 7 bit  addresses,  the  subnet  mask  would  be
  591. 255.255.255.128.
  592.  
  593. Generally  it is possible to specify the subnet mask for each computer
  594. as part of configuring its IP software.  The IP protocols  also  allow
  595. for computers to send a query asking what the subnet mask is.  If your
  596. network supports broadcast queries, and there is at least one computer
  597. or  gateway  on  the  network  that  knows  the subnet mask, it may be
  598. unnecessary to set it on the other computers.  However this capability
  599. brings  with  it a whole new set of possible problems.  One well-known
  600. TCP/IP implementation would answer with the  wrong  subnet  mask  when
  601. queried,  thus  leading causing every other computer on the network to
  602. be misconfigured.  Thus it may  be  safest  to  set  the  subnet  mask
  603. explicitly on each system.
  604.  
  605.  
  606.  
  607. 3.4 Dealing with multiple "virtual" subnets on one network
  608.  
  609.  
  610. Most  software  is written under the assumption that every computer on
  611. the local network has the same subnet number.  When traffic  is  being
  612. sent  to  a  machine with a different subnet number, the software will
  613. generally expect to find  a  gateway  to  handle  forwarding  to  that
  614. subnet.  Let's look at the implications.  Suppose subnets 128.6.19 and
  615. 128.6.20 are on the same Ethernet.  Consider the way things look  from
  616. the point of view of a computer with address 128.6.19.3.  It will have
  617. no problem sending to other machines with addresses 128.6.19.x.   They
  618. are on the same subnet, and so our computer will know to send directly
  619. to them on the local Ethernet.  However suppose it is asked to send  a
  620. datagram  to  128.6.20.2.    Since  this  is  a different subnet, most
  621. software will expect to find a gateway that handles forwarding between
  622. the  two  subnets.    Of  course there isn't a gateway between subnets
  623. 128.6.19 and 128.6.20, since they are on the same Ethernet.  Thus  you
  624. have  to find a way to tell your software that 128.6.20 is actually on
  625. the same Ethernet.
  626.  
  627. Most common TCP/IP implementations can deal with more than one  subnet
  628. on  a  network.    For  example,  Berkeley  Unix lets you use a slight
  629. modification of the command used to define gateways.  Suppose that you
  630. get  from  subnet  128.6.19  to  subnet  128.6.4 using a gateway whose
  631. address is 128.6.19.1.  You would use the command
  632.  
  633.   route add 128.6.4.0 128.6.19.1 1
  634.  
  635. This says that to reach subnet 128.6.4, traffic should be sent via the
  636. gateway  at  128.6.19.1, and that the route only has to go through one
  637. gateway.  The "1" is referred to as the "routing metric".  If you  use
  638.                                   9
  639.  
  640.  
  641.  
  642. a  metric  of  0, you are saying that the destination subnet is on the
  643. same network, and no gateway is needed.  In  our  example,  on  system
  644. 128.6.19.3, you would use
  645.  
  646.   route add 128.6.20.0 128.6.19.1 0
  647.  
  648. The  actual  address  used  in place of 128.6.19.1 is irrelevant.  The
  649. metric of 0 says that no gateway is actually going to be used, so  the
  650. gateway  address  is  not used.  However it must be a legal address on
  651. the local network.
  652.  
  653. Note that the commands in this section are simply examples. You should
  654. look  in  the  documentation for your particular implementation to see
  655. how to configure your routing.
  656.  
  657.  
  658.  
  659. 3.4.1 Dealing with Multiple Subnets by Turning off Subnetting
  660.  
  661.  
  662. There is another  way  to  handle  several  subnets  on  one  physical
  663. network.    This  method  involves  intentionally  misconfiguring your
  664. hosts, so it is potentially dangerous if you don't watch what you  are
  665. doing.    However  it may be easier to deal with when you have lots of
  666. subnets on one physical network.  An example of this is  a  site  that
  667. uses  bridges, and uses subnets simply for administrative convenience.
  668. The trick is to configure the software on your hosts as  if  you  were
  669. not  using  subnets at all.  In this case your hosts will not make any
  670. distinction between the subnets, and they'll have no  trouble  dealing
  671. with all of them.  Now the only problem is how to talk to subnets that
  672. are not on this multi-subnet network.  However if your gateways handle
  673. proxy  ARP,  they  will  solve that problem for you.  This approach is
  674. likely to be  convenient  when  the  same  network  is  carrying  many
  675. subnets, particularly if additional ones are likely to be added later.
  676. However it has two problems:
  677.  
  678. If you have any hosts with multiple interfaces, you will  have  to  be
  679. very careful.  First, only one interface should be on the multi-subnet
  680. network.  For example, suppose you have a "network" that is made up of
  681. several Ethernets connected by bridges.  You can't have a machine with
  682. interfaces on two of those Ethernets.  However you can have  a  system
  683. with  one  interface  on  the multi-subnet network and another on some
  684. totally separate subnet.  Second, any machine with multiple interfaces
  685. will  have  to  know  the  real  subnet mask, and will need to be told
  686. explicitly which subnets are  on  the  multi-subnet  network.    These
  687. restrictions  come about because a system with multiple interfaces has
  688. to know which interface to use in any given case.
  689.  
  690. You will have to be careful about the ICMP subnet mask facility.  This
  691. is a facility that allows systems to broadcast a query asking what the
  692. subnet mask is.  If most of  your  hosts  think  the  network  is  not
  693. subnetted,  but  your  gateways and multi-interface hosts think it is,
  694. you've got a potential for confusion.  If a gateway or multi-interface
  695. host  happens to send an ICMP subnet mask reply giving the real subnet
  696. mask, some of your other hosts  may  pick  it  up.    The  reverse  is
  697.                                   10
  698.  
  699.  
  700.  
  701. possible as well.  This means that you will either have to
  702.  
  703.    - disable  ICMP subnet mask replies on all of the systems that know
  704.      the real subnet mask.  (This may be easy if  only  gateways  know
  705.      it.)
  706.  
  707.    - make sure that your hosts ignore ICMP replies
  708.  
  709. According  to the most recent documents, as long as you set the subnet
  710. mask explicitly, hosts are supposed to ignore  the  ICMP  subnet  mask
  711. mechanism.   So you should be able to set different masks on different
  712. hosts without causing any  problem,  as  long  as  you  set  the  mask
  713. explicitly  for  all  of  them.   However we have noticed that some IP
  714. implementations will change their subnet mask when they  see  an  ICMP
  715. subnet mask reply.
  716.  
  717.  
  718.  
  719. 3.4.2 Multiple Subnets: Implications for Broadcasting
  720.  
  721.  
  722. When  you  have more than one subnet on the same physical network, you
  723. need to give some thought to broadcast addresses.   According  to  the
  724. latest  standards,  there  are two different ways for a host on subnet
  725. 128.6.20 to send a broadcast on the local network.    One  is  to  use
  726. address  128.6.20.255.    The other is to use address 255.255.255.255.
  727. 128.6.20.255  says  explicitly  "all  hosts   on   subnet   128.6.20".
  728. 255.255.255.255  says "all hosts on my local network".  Normally these
  729. have the same effect.  However they do  not  when  there  are  several
  730. subnets  on  one  physical network.  If subnet 128.6.19 is on the same
  731. Ethernet,  it  is   also   going   to   receive   messages   sent   to
  732. 255.255.255.255.    However  hosts  with  numbers  128.6.19.x will not
  733. listen to broadcasts to 128.6.20.255.  The  result  is  that  the  two
  734. different  forms  of  broadcast  address  will have somewhat different
  735. meanings.  This means that you will have  to  exercise  some  care  in
  736. configuring  software  on  networks  such  as  this, to make sure that
  737. broadcasts go where you intend them to go.
  738.  
  739.  
  740.  
  741. 3.5 Choosing an address class
  742.  
  743.  
  744. When you apply for an official network number, you will be asked  what
  745. class  of network number you need.  The possible answers are A, B, and
  746. C. This affects how large an address  space  you  will  be  allocated.
  747. Class  A addresses are one octet long, class B addresses are 2 octets,
  748. and class C addresses are 3  octets.    This  represents  a  tradeoff:
  749. there are a lot more class C addresses than class A addresses, but the
  750. class C addresses don't allow as many hosts.  The idea was that  there
  751. would  be  a few very large networks, a moderate number of medium-size
  752. ones, and a lot of mom-and-pop stores with small networks.  Here is  a
  753. table showing the distinction:
  754.  
  755.  
  756.                                   11
  757.  
  758.  
  759.  
  760.        class  range of first octet   network  rest  possible addresses
  761.          A       1 - 126               p      q.r.s    16777214
  762.          B       128 - 191             p.q      r.s    65534
  763.          C       192 - 223             p.q.r      s    254
  764.  
  765. For  example  network  10,  a  class  A network, has addresses between
  766. 10.0.0.1 and 10.255.255.254.  So it allows 254**3, or about 16 million
  767. possible  addresses.    (Actually,  network 10 has allocated addresses
  768. where some of the octets are zero, so there are a few  more  addresses
  769. possible.)    Network  192.12.88,  a class C network has hosts between
  770. 192.12.88.1 and 192.12.88.254, i.e. 254 possible hosts.
  771.  
  772. In general, you will be expected to choose the lowest class that  will
  773. provide  you with enough addresses to handle your growth over the next
  774. few years.  Organizations that have computers in many  buildings  will
  775. probably need and be able to get a class B address, assuming that they
  776. are going to use subnetting.  (If you are going to use  many  separate
  777. network  numbers,  you  would  ask for a number of class C addresses.)
  778. Class A addresses are normally used only for large public networks and
  779. for a few very large corporate networks.
  780.  
  781.  
  782.  
  783. 3.6 Dialup IP and Micro gateways: Dynamically assigned addresses
  784.  
  785.  
  786. In  most  cases, each of your computers will have its own permanent IP
  787. address.  However there are a few situations where it makes more sense
  788. to  allocate  addresses  dynamically.    The most common cases involve
  789. dialup IP, and gateways intended primarily for microcomputers.
  790.  
  791.  
  792.  
  793. 3.6.1 Dialup IP
  794.  
  795.  
  796. It is possible to run IP over dialup lines.  The protocol for doing so
  797. is  called  SLIP  ("serial  line IP").  SLIP is useful in at least two
  798. different circumstances:
  799.  
  800.    - As a low-cost alternative to permanent point to point lines,  for
  801.      cases  where  there  isn't  enough  traffic  to justify dedicated
  802.      lines.
  803.  
  804.    - As a way to connect individual PC's into a network when they  are
  805.      located  in  buildings  that  don't  have  Ethernets or other LAN
  806.      technology.
  807.  
  808. I am going to use the term "SLIP server" to refer to a computer system
  809. that  has  modems  attached,  which other systems can connect to using
  810. SLIP.  Such a system will provide a gateway into your network  for  PC
  811. users or for other networks that connect using SLIP.
  812.  
  813. If  you  have  a number of individual PC's dialing up with SLIP, it is
  814. often not practical to assign each PC its own IP  address.    For  one
  815.                                   12
  816.  
  817.  
  818.  
  819. thing,  there  may just not be enough addresses.  In order to keep the
  820. routing straight, the dialup systems have to get addresses on the same
  821. subnet  as  the  SLIP  server.    Generally  there  are only 256 or so
  822. addresses available on each subnet.  If you have more PC's than  that,
  823. you  can't give each one its own address.  If you have SLIP servers on
  824. more than one subnet, this will make  permanent  addresses  even  more
  825. difficult.    If a user wanted to be able to call both servers, his PC
  826. would need two addresses, one for each subnet.
  827.  
  828. In order to avoid these problems,  many  SLIP  implementations  assign
  829. addresses  dynamically.   When a PC first connects to the SLIP server,
  830. the server finds an unused IP address and assigns it to the PC.    The
  831. simplest  way to manage this is to give each SLIP server a range of IP
  832. addresses that it keeps track of and can assign.
  833.  
  834. When you use such a scheme, your SLIP software has to include some way
  835. for  the  server to tell the PC what address to use.  If each PC has a
  836. permanent address, you have the reverse problem:  when a  PC  connects
  837. to  a server, there has to be a way for the PC to tell the server what
  838. its address is.  Some care is needed.  Otherwise  someone  could  have
  839. his PC claim to be yours and steal all your files.
  840.  
  841. Unfortunately,  there  is  no  standard way to manage these addressing
  842. issues with SLIP.  There are several SLIP implementations that  handle
  843. them, but there isn't a single standard yet.  Until such a standard is
  844. developed, you need to check out SLIP software carefully.   Make  sure
  845. that  it assigns addresses the way you want, and that your SLIP server
  846. and your PC's agree on how to figure out the PC's address.
  847.  
  848. I recommend giving the PC's permanent addresses in cases  where  other
  849. computers  have to be able to tell which PC they are talking to.  This
  850. would be the case if the PC is going to receive private computer mail,
  851. or  engage in other sensitive transactions.  I recommend using dynamic
  852. addresses where you have a lot of PC's,  and  where  the  applications
  853. that they access over the network do their own security checking.
  854.  
  855. When  you  are  using  SLIP  to  connect  two networks, you have three
  856. choices for handling addressing (although not all  SLIP  software  can
  857. handle all three choices):
  858.  
  859.    - Treat  SLIP connections like point to point lines that just don't
  860.      happen to be up all  the  time.    If  you  call  more  than  one
  861.      computer,  each  pair  of  computers  that  talks  has a separate
  862.      network number which they use only when they talk to each other.
  863.  
  864.    - Use routing software that allows anonymous interfaces.   In  that
  865.      case no address is needed at all.
  866.  
  867.    - Assign  addresses dynamically when the connection is opened, just
  868.      as you would for a PC that is dialing up.
  869.  
  870. If you make connections only to one or two other systems, it is  quite
  871. reasonable  to  use a network number for each connection.  This method
  872. makes it easy to keep usage and error statistics.
  873.  
  874.                                   13
  875.  
  876.  
  877.  
  878. If you have many different connections, it is  probably  best  to  use
  879. anonymous   interfaces.    You  would  probably  use  dynamic  address
  880. allocation only if your routing technology did not  support  anonymous
  881. interfaces.
  882.  
  883.  
  884.  
  885. 3.6.2 Micro gateways
  886.  
  887.  
  888. It  is  perfectly  possible for microcomputers to participate in an IP
  889. network.  However there seems to be  a  tendency  for  micros  to  use
  890. somewhat  different  network  technology than larger systems.  This is
  891. because many micro users start with specialized network software whose
  892. design  is  tailored specifically to the needs of micros, or even some
  893. particular type of micro.  Micro users quite naturally want to be able
  894. to  start  using  TCP/IP  without  having to abandon any special micro
  895. network that they are already using.   For  that  reason  there  is  a
  896. growing number of gateway products that allow PC's to access both some
  897. micro-oriented network product and TCP/IP.
  898.  
  899. In this section, Apple's AppleTalk is used as an  example.    This  is
  900. because  gateways  for  it  have  existed  for  some  time, and are in
  901. widespread use.  However similar  products  exist  for  several  other
  902. micro  network  technologies.   Note that the term AppleTalk refers to
  903. the Apple network protocols, whereas LocalTalk refers to the  specific
  904. twisted-pair  technology on which AppleTalk was initially implemented.
  905. Thus AppleTalk is analogous to the TCP/IP protocols, whereas LocalTalk
  906. is analogous to the Ethernet medium.
  907.  
  908. Several  vendors  supply  gateways to connect AppleTalk running over a
  909. LocalTalk network with IP running over Ethernet.  Although  there  are
  910. several  products  of  this  kind,  most  of them supply the following
  911. services:
  912.  
  913.    - TCP/IP applications on the PC can connect to  TCP/IP  systems  on
  914.      the  Ethernet.    Special  facilities  are  defined  to  allow IP
  915.      datagrams to be carried over LocalTalk between  the  PC  and  the
  916.      gateway.   TCP/IP applications on the PC have to be written using
  917.      a special library that uses a mixture of  AppleTalk  and  TCP/IP.
  918.      The  AppleTalk  facilities are needed to get the datagrams to the
  919.      gateway, where they are transformed into pure TCP/IP before being
  920.      put  out  onto  the  Ethernet.    Thus  the TCP/IP systems on the
  921.      Ethernet don't know they are talking to micros.
  922.  
  923.    - AppleTalk applications can be written for larger systems, so that
  924.      PC's  can  use  them  as servers.  These applications are written
  925.      using a special library that is more or less the reverse  of  the
  926.      one  just  described.   Again, it uses a mixture of AppleTalk and
  927.      TCP/IP.  But this time TCP/IP facilities are needed  to  get  the
  928.      datagrams  to  the  gateway, where they are transformed into pure
  929.      AppleTalk  before  being  put  onto  the  LocalTalk  network   to
  930.      communicate with the PC's.  Thus the PC's can access applications
  931.      on the larger systems, without  knowing  that  they  are  on  the
  932.      Ethernet rather than an Apple network.
  933.                                   14
  934.  
  935.  
  936.  
  937.    - A campus or corporate IP network can be used to connect AppleTalk
  938.      networks at different locations.  Gateways at each location  wrap
  939.      up  AppleTalk  datagrams  inside IP datagrams, and send them over
  940.      the main IP network.
  941.  
  942. In addition, some newer gateways will  translate  at  the  application
  943. level.    For  example  one  gateway  will translate between the Apple
  944. filing protocol and Sun's Network File System.  This allows  a  PC  to
  945. access  a  Unix  file  system,  with  the  PC  using  the Apple filing
  946. protocol, and the final access to the Unix  system  being  done  using
  947. Sun's Network File System.
  948.  
  949. Unfortunately  the  flexibility  of products like this also means that
  950. they are complex.  Addressing  issues  are  particularly  complicated.
  951. For  the  same  reasons  as  SLIP, these gateways often use dynamic IP
  952. address allocation. A range  of  IP  addresses  is  assigned  to  each
  953. gateway.   When a PC attempts to open its first TCP/IP connection, the
  954. gateway picks a free IP address and assigns it  to  the  PC.  As  with
  955. SLIP,  you  will often need to choose whether you want addresses to be
  956. assigned this way, or you want  each  PC  to  have  its  own  address.
  957. Again,  this  depends upon how many PC's you have and whether you have
  958. applications which must be able to use the IP address to identify  the
  959. particular PC that is talking to it.
  960.  
  961. Addressing  is  further complicated by the fact that AppleTalk has its
  962. own addressing structure.   So  you  must  define  a  mapping  between
  963. AppleTalk  and  IP  network  numbers.    There  must also be a mapping
  964. between individual IP addresses  and  AppleTalk  addresses,  but  this
  965. mapping is maintained dynamically by the gateways.
  966.  
  967.  
  968.  
  969. 4. Network-wide Services, Naming
  970.  
  971.  
  972. If  you  are  going to have a TCP/IP network, there are certain things
  973. that you are going to have to do centrally.  Some of them  are  simply
  974. administrative.    The  most  important  is  that  you  will a central
  975. registry of names and IP  addresses.    The  DDN  Network  Information
  976. Center performs this role for the Internet network as a whole.  If you
  977. are connected to the international Internet, your  administrator  will
  978. need  to  register  with  the  DDN Network Information Center, so that
  979. queries from other institutions about your hosts are forwarded to your
  980. servers.
  981.  
  982. You will want to maintain a database containing information about each
  983. system on your network.  At a minimum, you need to have the host  name
  984. and  IP  address  for each system.  Probably the central registry will
  985. assign IP addresses.  If your network is  subnetted,  or  if  you  use
  986. multiple  class  C  network numbers, the registry will probably assign
  987. network numbers to new networks or subnets.  Most commonly, individual
  988. host  administrators  will  be allowed to choose their own host names.
  989. However the registry must at least verify that there are no  duplicate
  990. names.    If you have a very large network, you may choose to delegate
  991. some  of  these  tasks  to  subregistries,  possibly  one   for   each
  992.                                   15
  993.  
  994.  
  995.  
  996. department.
  997.  
  998. We  suggest that you assign numbers in the simplest way: starting from
  999. 1.  Thus if your network is 128.6, you would assign  128.6.1  as  your
  1000. first subnet, 128.6.2 as the second, etc.  IP addresses for individual
  1001. hosts should probably start at 2.  This allows you  to  reserve  1  on
  1002. each  subnet  for  use  by  a  gateway.  Thus the first host on subnet
  1003. 128.6.4 would be 128.6.4.2, the next  128.6.4.3,  etc.    There  is  a
  1004. specific  reason  for  keeping addresses as small as possible.  If you
  1005. have a large organization, you may run out of subnet numbers.  If  you
  1006. do, and if your host numbers are small, you can assign another bit for
  1007. the subnet.  For example, we use the entire third octet  as  a  subnet
  1008. number.  As long as all of our host numbers are less than 128, we will
  1009. be able to expand to  9-bit  subnet  numbers.    For  example,  subnet
  1010. 128.6.4  would  be  split  into  two  separate  subnets, 128.6.4.0 and
  1011. 128.6.4.128.  If we had assigned host numbers above  128,  this  split
  1012. would be impossible.
  1013.  
  1014. Host  names need not be so systematic.  They can start with almost any
  1015. word made up of letters numbers, and hyphens.  It is  safest  for  the
  1016. first  character  to  be a letter.  It will be easier for users if the
  1017. name is fairly short.  (We have seen software that has trouble dealing
  1018. with  names  longer  than  16  characters.)  Many times departments or
  1019. projects choose a theme, and pick names that are consistent with them.
  1020. For  example,  the machines used by computer science graduate students
  1021. at Rutgers are named after rock bands:  STEELEYE,  BAND,  TREX,  DEVO,
  1022. etc.    Our math department uses famous mathematicians: GAUSS, FERMAT,
  1023. etc.  If your institution  does  not  have  any  connection  with  the
  1024. outside world, such one-word names are all you need.
  1025.  
  1026. If  you  are  connected  to  with  the  international  Internet,  your
  1027. organization will need to get a "domain name."  This  is  assigned  to
  1028. you by the DDN Network Information Center, just as your network number
  1029. is.  Unlike the network number, you can get along without one if  your
  1030. network  is isolated.  If you find later that you need one, it is easy
  1031. to add a domain name.  (We recommend that you start with  an  official
  1032. network  number  from  the  beginning because changing network numbers
  1033. later can be traumatic.)   Domain  names  normally  end  in  .EDU  for
  1034. educational  institutions,  .COM  for  companies,  etc.   For example,
  1035. Rutgers  University  has  a  domain  name  of  .RUTGERS.EDU   A   full
  1036. domain-style  host  name  consists  of  your  one-word  internal  name
  1037. followed by  your  organization's  domain  name.    For  example,  the
  1038. computer  I normally use is known internally as ATHOS.  It's full name
  1039. is ATHOS.RUTGERS.EDU If you have a large organization, it is  possible
  1040. to have sub-domains.  For example, you might have a subdomain for each
  1041. department.  This adds another period to your names.  For example, the
  1042. computer  science department might have decided to create a subdomain.
  1043. In   this   case,   my   computer    would    probably    be    called
  1044. ATHOS.CS.RUTGERS.EDU Once you get a domain name assigned to you, it is
  1045. wise to change all of your configuration files so that the  full  form
  1046. of  name  is  used.    However your software can be set up so that the
  1047. one-word versions are accepted as nicknames.    That  way  your  users
  1048. don't have to type out the long form.
  1049.  
  1050. If  you  have more than one or two systems, you are going to need some
  1051.                                   16
  1052.  
  1053.  
  1054.  
  1055. way to keep host information up  to  date  on  all  of  your  systems.
  1056. TCP/IP  software  needs  to  be  able  to translate host names into IP
  1057. addresses.  When a user tries to connect to another system,  he  wants
  1058. to  be able to refer to it by name.  The software has to translate the
  1059. name into the IP address in  order  to  open  the  connection.    Most
  1060. software  provides two ways to do this translation:  a static table or
  1061. a name server.  The  table  approach  is  probably  easier  for  small
  1062. organizations, as long as they are not connected to any other network.
  1063. You simply create a file that lists the names  and  addresses  of  all
  1064. your hosts.  Here's part of our host table:
  1065.  
  1066.     HOST: 128.6.4.2, 128.6.25.2 : ARAMIS.RUTGERS.EDU,ARAMIS : SUN-3-28
  1067.     HOST: 128.6.4.3 : GAUSS.RUTGERS.EDU,GAUSS : SUN-3-180 : UNIX ::
  1068.     HOST: 128.6.4.4, 128.6.25.4 : ATHOS.RUTGERS.EDU,ATHOS : SUN-4-280 
  1069.  
  1070. This  format  has  one  line for each system, and lists its addresses,
  1071. names, and other information about it.  Note that aramis and athos are
  1072. both  on  two  networks,  so  they have two addresses.  They have both
  1073. primary names, e.g. ARAMIS.RUTGERS.EDU, and nicknames, e.g.    ARAMIS.
  1074. Since  we  are  attached  to  the Internet, our primary name is a full
  1075. domain name.  We supply brief nicknames to  make  it  easier  for  our
  1076. users.    There  is one other commonly-used format for the host table.
  1077. Here's an example of that format:
  1078.  
  1079.     128.6.4.2   aramis.rutgers.edu aramis
  1080.     128.6.25.2  aramis.rutgers.edu aramis
  1081.     128.5.4.3   gauss.rutgers.edu gauss
  1082.     128.6.4.4   athos.rutgers.edu gauss
  1083.     128.6.25.4  athos.rutgers.edu gauss
  1084.  
  1085. In this format, each line represents a single IP address. If a  system
  1086. has  two  interfaces,  there  are  two lines in the table for it.  You
  1087. should try to put the address first that is likely  to  be  used  more
  1088. often.  The documentation for your systems should indicate what format
  1089. they want the host information to use.
  1090.  
  1091. In the simplest setup, every computer has its own  copy  of  the  host
  1092. table.    If  you  choose  to  use  the setup, you will want to set up
  1093. procedures to make sure that systems get updated copies  of  the  host
  1094. table regularly.
  1095.  
  1096. Larger sites, and all sites that are connected to the Internet, should
  1097. use name servers instead of individual host tables.  A name server  is
  1098. a  program  that  you  run  on  a few of your systems to keep track of
  1099. names.  When a program needs to look up a name, instead of looking for
  1100. a copy of the host table, it sends a network query to the name server.
  1101. This approach has two advantages:
  1102.  
  1103.    - For a large site, it is easier to keep tables up to date on a few
  1104.      name servers than on every system.
  1105.  
  1106.    - If  your site is connected to the Internet, your name server will
  1107.      be able to talk to name servers at other organizations, and  look
  1108.      up names elsewhere.
  1109.  
  1110.                                   17
  1111.  
  1112.  
  1113.  
  1114. Using  a  name  server is the only way to have access to complete host
  1115. information about the rest of the Internet.
  1116.  
  1117. It is important to understand the difference between a name server and
  1118. a resolver.  A name server is a program that accesses a host database,
  1119. and answers queries from other programs.   A  resolver  is  a  set  of
  1120. subroutines  that  can  be  loaded  with  your  program.  It generates
  1121. queries to the name server, and processes the responses.  Every system
  1122. should  use the resolver.  (Actually, the resolver is generally loaded
  1123. with each program that uses the network, since it's simply  a  set  of
  1124. subroutines.)   You only need a few name servers.  Many people confuse
  1125. these two concepts, and come to believe that every computer  needs  to
  1126. run a name server.
  1127.  
  1128. In  order  to  use a resolver, each computer will need a configuration
  1129. file or other option that specifies the address of a name server where
  1130. queries  should  be  sent.   Generally you should specify several name
  1131. servers, in case one of them is down.  If your system cannot reach any
  1132. name  server,  much of your software is likely to misbehave.  Thus you
  1133. should be very careful to have enough name servers around  that  every
  1134. system can always reach at least one name server.
  1135.  
  1136. Name servers generally have a number of configuration options.  Rather
  1137. than giving advice here on setting up a name server,  I  am  going  to
  1138. refer  you  to  two  official  Internet standards documents.  Both are
  1139. available from the DDN Network Information Center, SRI  International,
  1140. 333  Ravenswood  Avenue,  Menlo  Park,  California  94025  (telephone:
  1141. 800-235-3155).  RFC 1032 contains instructions for  getting  a  domain
  1142. name  from  the  Network  Information  Center, including the necessary
  1143. forms.  RFC 1033 contains instructions on how to set up a name server.
  1144. Like  this  document,  these  documents are conceptual.  You will also
  1145. need documentation for the specific name server software that you  are
  1146. going  to use.  [This paragraph is a cop-out.  Future editions of this
  1147. document will contain  some  advice  on  setting  up  a  name  server.
  1148. However  RFC  1033  is  almost  unique  in  that  it  is  directed  at
  1149. administrators rather than networking experts.  Thus it is  reasonable
  1150. to direct people there for the moment.]
  1151.  
  1152. In  some cases you may need to use both fixed tables and name servers.
  1153. If you have some TCP/IP implementations that do not include resolvers,
  1154. then  you  will  have  to have host tables for those systems.  If your
  1155. network is connected to the international Internet, you are  going  to
  1156. have problems with systems that don't have resolvers.  The Internet is
  1157. too big for there to be a host table that  lists  all  of  its  hosts.
  1158. Thus you will have to put together a host table that lists those hosts
  1159. that your users tend to use.    The  DDN  Network  Information  Center
  1160. maintains a host table that will be a good starting point.  However it
  1161. is by no means complete.  So you will have to add your users' favorite
  1162. hosts  to it.  Systems that use a resolver will not have this problem,
  1163. since the name servers are able to translate any legal host name.
  1164.  
  1165. Host name and number allocation is the only facility that  has  to  be
  1166. done centrally.  However there are other things that you may prefer to
  1167. do centrally.  It is very common to have one  or  two  computers  that
  1168. handle  all  computer  mail.    If are on the Internet, it is easy for
  1169.                                   18
  1170.  
  1171.  
  1172.  
  1173. every one of your computers to talk directly to any other computer  on
  1174. the  Internet.    However  most  institutions want to communicate with
  1175. systems on other networks, such as  Bitnet  and  Usenet.    There  are
  1176. gateways  between  the  various  networks.    But  choosing  the right
  1177. gateway, and transforming  computer  mail  addresses  correctly  is  a
  1178. rather  specialized  business.  Thus many sites set up the appropriate
  1179. software only one place and direct all external mail (or all  external
  1180. mail to hosts that are not on the Internet) through this system.
  1181.  
  1182.  
  1183.  
  1184. 5. Setting up routing for an individual computer
  1185.  
  1186.  
  1187. All  TCP/IP  implementations require some configuration for each host.
  1188. In some cases this is done  during  "system  generation".    In  other
  1189. cases,  various  startup and configuration files must be set up on the
  1190. system.  Still other systems get configuration information across  the
  1191. network  from  a "server".  While the details differ, the same kind of
  1192. information needs to be  supplied  for  most  implementations.    This
  1193. includes
  1194.  
  1195.    - parameters  describing  the  specific  machine,  such  as  its IP
  1196.      address.
  1197.  
  1198.    - parameters describing the network, such as the  subnet  mask  (if
  1199.      any)
  1200.  
  1201.    - routing software and the tables that drive it
  1202.  
  1203.    - startup of various programs needed to handle network tasks
  1204.  
  1205. Before  a  machine  is installed on your network, a coordinator should
  1206. assign it a host name and IP address, as described above.    Once  you
  1207. have  name  and  address,  you  are  ready  to  start configuring your
  1208. computer.  Often  you  have  to  put  the  address  and  name  into  a
  1209. configuration   file   on   the  computer.    However  some  computers
  1210. (particularly those without permanent  disks  on  which  configuration
  1211. information  could  be  stored) get this information over the network.
  1212. When such a system starts, it broadcasts a request over  the  network.
  1213. In  effect,  this  request says "who am I?"  If you have any computers
  1214. like this, you will have to make sure that some system on your network
  1215. is  ready  to  answer  these questions.  The obvious issue is: how can
  1216. another system tell who you are?  Generally  this  is  done  based  on
  1217. Ethernet  address  (or  the  analogous  address  for  other  types  of
  1218. network).    Ethernet  addresses  are   assigned   by   the   computer
  1219. manufacturer.    It  is guaranteed that only one machine in the entire
  1220. world has any particular Ethernet address.  The  address  is  normally
  1221. stored  in ROM somewhere in the machine.  The machine may not know its
  1222. IP address, but it does know its Ethernet address.  Thus the  "who  am
  1223. I"  request includes the Ethernet address.  Systems that are set up to
  1224. answer such requests have a table that lists  Ethernet  addresses  and
  1225. the  corresponding  IP  address.    This lets them know how to answer.
  1226. Unfortunately, you have to set this table up manually.  Generally  you
  1227. know the IP address, because your address coordinator has assigned it.
  1228.                                   19
  1229.  
  1230.  
  1231.  
  1232. The only problem in constructing the table will  be  finding  out  the
  1233. Ethernet address for each computer.  Generally, computers are designed
  1234. so that they print the Ethernet address on the console  shortly  after
  1235. being  turned on.  However in some cases you may have to find a way to
  1236. bring  the  computer  up  and  then  type  a  command  that   displays
  1237. information about the Ethernet interface.
  1238.  
  1239. Generally  the subnet mask should be specified in a configuration file
  1240. associated with the computer.    (For  Unix  systems,  the  "ifconfig"
  1241. command is used to specify both the Internet address and subnet mask.)
  1242. However there are provisions in the IP protocols  for  a  computer  to
  1243. broadcast a request asking for the subnet mask.  The subnet mask is an
  1244. attribute of the network.  It is the same for all computers on a given
  1245. subnet.    Thus there is no separate subnet table corresponding to the
  1246. Ethernet/Internet  address  mapping  table  used  to  answer   address
  1247. queries.    Ideally,  only  a  few authoritative computers will answer
  1248. queries about the subnet mask.  However  many  TCP/IP  implementations
  1249. are  set  up so that any machine on the network that believes it knows
  1250. the subnet mask will  answer.    If  your  TCP/IP  is  like  this,  an
  1251. incorrect  subnet  mask  setting  on  one  machine can cause confusion
  1252. throughout the network.
  1253.  
  1254. Normally the startup files do roughly the following things:
  1255.  
  1256.    - load any special device drivers that may be necessary.  (This  is
  1257.      particularly  common with PC's, where network access is likely to
  1258.      depend upon add-on controller cards and software that is not part
  1259.      of the original operating system.)
  1260.  
  1261.    - enable each of the network interfaces (Ethernet interface, serial
  1262.      lines, etc.)   Normally  this  involves  specifying  an  Internet
  1263.      address  and  subnet mask for each, as well as other options that
  1264.      will be described in your vendor's documentation.
  1265.  
  1266.    - establish network routing information, either  by  commands  that
  1267.      add  fixed  routes,  or  by  starting a program that obtains them
  1268.      dynamically.
  1269.  
  1270.    - turn on the domain system (used for looking up names and  finding
  1271.      the  corresponding  Internet  address  --  see the section on the
  1272.      domain system in the Introduction to  TCP/IP).    Note  that  the
  1273.      details  of  this  will  depend  upon  how  the  domain system is
  1274.      configured.  In most cases only a few hosts actually  run  domain
  1275.      name  servers  that  must  be  started.   Other hosts simply need
  1276.      configuration files that specify where the nearest name server is
  1277.      located.
  1278.  
  1279.    - set various other information needed by the system software, such
  1280.      as the name of the system itself.
  1281.  
  1282.    - start various "daemons".  These are programs that provide network
  1283.      services  to  other  systems on the network, and to users on this
  1284.      system.  In the case of PC's, which  often  cannot  run  multiple
  1285.      processes,  similar  facilities  may  be  provided  by  so-called
  1286.      "TSR"'s, or they may be built into the device drivers.
  1287.                                   20
  1288.  
  1289.  
  1290.  
  1291. It is not practical to document these  steps  in  detail,  since  they
  1292. differ for each vendor.  This section will concentrate on a few issues
  1293. where your choice will depend upon overall decisions  about  how  your
  1294. network  is  to  operate.   These overall network policy decisions are
  1295. often not as well documented by the vendors as the details of  how  to
  1296. start  specific  programs.    Note that some care will be necessary to
  1297. integrate commands that you add for routing, etc.,  into  the  startup
  1298. sequence  at  the  right  point.  Some of the most mysterious problems
  1299. occur when network routing is not set up before  a  program  needs  to
  1300. make  a  network  query,  or when a program attempts to look up a host
  1301. name before the name server has finished loading all of the names from
  1302. a master name server.
  1303.  
  1304.  
  1305.  
  1306. 5.1 How datagrams are routed
  1307.  
  1308.  
  1309. If your system consists of a single Ethernet or similar medium, you do
  1310. not need to give routing much attention.   However  for  more  complex
  1311. systems,  each  of  your  machines  needs a routing table that lists a
  1312. gateway and interface to use for every possible  destination  network.
  1313. A  simple  example of this was given at the beginning of this section.
  1314. However it is now necessary to describe the way routing works in a bit
  1315. more  detail.  On most systems, the routing table looks something like
  1316. the following. (This example was taken from a system running  Berkeley
  1317. Unix,  using  the  command  "netstat  -n -r".  Some columns containing
  1318. statistical information have been omitted.)
  1319.  
  1320.     Destination          Gateway              Flags       Interface
  1321.  
  1322.     128.6.5.3            128.6.7.1            UHGD        il0
  1323.     128.6.5.21           128.6.7.1            UHGD        il0
  1324.     127.0.0.1            127.0.0.1            UH          lo0
  1325.     128.6.4              128.6.4.61           U           pe0
  1326.     128.6.6              128.6.7.26           U           il0
  1327.     128.6.7              128.6.7.26           U           il0
  1328.     128.6.2              128.6.7.1            UG          il0
  1329.     10                   128.6.4.27           UG          pe0
  1330.     128.121              128.6.4.27           UG          pe0
  1331.     default              128.6.4.27           UG          pe0
  1332.  
  1333. The example system is connected to two Ethernets:
  1334.  
  1335.       controller  network   address     other networks
  1336.          il0      128.6.7   128.6.7.26    128.6.6
  1337.          pe0      128.6.4   128.6.4.61    none
  1338.  
  1339. The first column shows the name  for  the  Ethernet  interface.    The
  1340. second  column  is  the  network  number for that Ethernet.  The third
  1341. column is this computer's Internet address on that network.  The  last
  1342. column shows other subnets that share the same physical network.
  1343.  
  1344. Now  let's  look  at the routing table.  For the moment, let us ignore
  1345. the first 3 lines.  The majority of the table consists  of  a  set  of
  1346.                                   21
  1347.  
  1348.  
  1349.  
  1350. entries  describing  networks.    For  each  network,  the other three
  1351. columns show where to send datagrams destined for that  network.    If
  1352. the  "G"  flag  is  present  in  the  third column, datagrams for that
  1353. network must be sent through a gateway.  The second column  shows  the
  1354. address  of  the  gateway to be used.  If the "G" flag is not present,
  1355. the computer is directly connected to the network  in  question.    So
  1356. datagrams  for  that network should be sent using the controller shown
  1357. in the third column.    The  "U"  flag  in  the  third  column  simply
  1358. indicates  that  the route specified by that line is up.  (Generally a
  1359. route is assumed to be up  unless  attempts  to  use  it  consistently
  1360. result in errors.)
  1361.  
  1362. The  first  3  lines  show "host routes", indicated by the "H" flag in
  1363. column three.    Routing  tables  normally  have  entries  for  entire
  1364. networks or subnets.  For example, the entry
  1365.  
  1366.     128.6.2              128.6.7.1            UG          il0
  1367.  
  1368. indicates  that  datagrams  for  any computer on network 128.6.2 (i.e.
  1369. addresses 128.6.2.1 through 128.6.2.254) should  be  sent  to  gateway
  1370. 128.6.7.1  for  forwarding.   However sometimes routes apply only to a
  1371. specific computer, rather than to a whole network.  In  that  case,  a
  1372. host  route  is used.  The first column then shows a complete address,
  1373. and the "H" flag is present in column 3.  E.g. the entry
  1374.  
  1375.     128.6.5.21           128.6.7.1            UHGD        il0
  1376.  
  1377. indicates that datagrams for the specific address 128.6.5.21 should be
  1378. sent  to  the gateway 128.6.7.1.  As with network routes, the "G" flag
  1379. is used for routes that involve a gateway.   The  "D"  flag  indicates
  1380. that  the  route  was  added  dynamically,  based  on an ICMP redirect
  1381. message from a gateway.  (See below for details.)
  1382.  
  1383. The following route is special:
  1384.  
  1385.     127.0.0.1            127.0.0.1            UH          lo0
  1386.  
  1387. 127.0.0.1 is the address of the "loopback device".  This  is  a  dummy
  1388. software  module.  Any datagram sent out through that "device" appears
  1389. immediately as input.  It can be  used  for  testing.    The  loopback
  1390. address  can  also  handy for talking to applications that are on your
  1391. own computer.  (Why bother to use your network to talk  to  a  program
  1392. that is on the same machine you are?)
  1393.  
  1394. Finally, there are "default" routes, e.g.
  1395.  
  1396.     default              128.6.4.27           UG          pe0
  1397.  
  1398. This route is used for datagrams that don't match any other entry.  In
  1399. this case, they are sent to a gateway with address 128.6.4.27.
  1400.  
  1401. In most systems, datagrams are routed by looking  up  the  destination
  1402. address  in  a  table  such as the one just described.  If the address
  1403. matches a specific host route, then that is used.   Otherwise,  if  it
  1404. matches  a  network route, that is used.  If no other route works, the
  1405.                                   22
  1406.  
  1407.  
  1408.  
  1409. default is used.  If there is no default, the user should get an error
  1410. message such as "network is unreachable".
  1411.  
  1412. The  following sections will describe several ways of setting up these
  1413. routing tables.  Generally, the actual operation of sending  datagrams
  1414. doesn't depend upon which method you use to set up the routes.  When a
  1415. datagram is to be sent, its destination is looked  up  in  the  table.
  1416. The  different  routing methods are simply more and less sophisticated
  1417. ways of setting up and maintaining the tables.
  1418.  
  1419.  
  1420.  
  1421. 5.2 Fixed routes
  1422.  
  1423.  
  1424. The simplest way to set up routing is to use  fixed  commands.    Your
  1425. startup  files  contain  commands to set up the routing table.  If any
  1426. changes are needed, you make them manually, using  commands  that  add
  1427. and  delete  entries  in  the  routing  table.   (When you make such a
  1428. change, don't forget to update the startup files also.)   This  method
  1429. is practical for relatively small networks, particularly if they don't
  1430. change very often.
  1431.  
  1432. Most computers automatically set up  some  routing  entries  for  you.
  1433. Unix  will  add  an  entry  for the networks to which you are directly
  1434. connected.  For example, your startup file might contain the commands
  1435.  
  1436.       ifconfig ie0 128.6.4.4 netmask 255.255.255.0
  1437.       ifconfig ie1 128.6.5.35 netmask 255.255.255.0
  1438.  
  1439. These  specify  that  there  are  two  network  interfaces,  and  your
  1440. addresses on them.  The system will automatically create routing table
  1441. entries
  1442.  
  1443.     128.6.4              128.6.4.4            U           ie0
  1444.     128.6.5              128.6.5.35           U           ie1
  1445.  
  1446. These specify that  datagrams  for  the  local  subnets,  128.6.4  and
  1447. 128.6.5, should be sent out the corresponding interface.
  1448.  
  1449. In  addition  to  these,  your startup files would contain commands to
  1450. define routes to whatever other networks you wanted  to  reach.    For
  1451. example,
  1452.  
  1453.       route add 128.6.2.0 128.6.4.1  1
  1454.       route add 128.6.6.0 128.6.5.35 0
  1455.  
  1456. These  commands  specify  that  in  order  to reach network 128.6.2, a
  1457. gateway at address 128.6.4.1 should be used, and that network  128.6.6
  1458. is  actually  an  additional  network  number for the physical network
  1459. connected to interface 128.6.5.35.   Some  other  software  might  use
  1460. different  commands  for these cases.  Unix differentiates them by the
  1461. "metric", which is the number at the end of the command.   The  metric
  1462. indicates  how  many  gateways the datagram will have to go through to
  1463. get to the destination.  Routes with metrics of 1 or  greater  specify
  1464.                                   23
  1465.  
  1466.  
  1467.  
  1468. the  address of the first gateway on the path.  Routes with metrics of
  1469. 0 indicate that no gateway  is  involved  --  this  is  an  additional
  1470. network number for the local network.
  1471.  
  1472. Finally, you might define a default route, to be used for destinations
  1473. not listed explicitly.  This would normally  show  the  address  of  a
  1474. gateway   that   has   enough   information  to  handle  all  possible
  1475. destinations.
  1476.  
  1477. If your network has only one gateway attached to it,  then  of  course
  1478. all  you  need is a single entry pointing to it as a default.  In that
  1479. case, you need not worry further about  setting  up  routing  on  your
  1480. hosts.    (The  gateway  itself needs more attention, as we will see.)
  1481. The following sections are intended to provide  help  for  setting  up
  1482. networks where there are several different gateways.
  1483.  
  1484.  
  1485.  
  1486. 5.3 Routing redirects
  1487.  
  1488.  
  1489. Most  TCP/IP  experts  recommend  leaving  routing  decisions  to  the
  1490. gateways.  That is, it is probably a bad  idea  to  have  large  fixed
  1491. routing  tables  on each computer.  The problem is that when something
  1492. on the network changes, you have to go around to  many  computers  and
  1493. update  the  tables.    If  changes  happen  because a line goes down,
  1494. service may not be restored until someone has a chance to  notice  the
  1495. problem and change all the routing tables.
  1496.  
  1497. The  simplest way to keep routes up to date is to depend upon a single
  1498. gateway to update your routing tables.  This gateway should be set  as
  1499. your  default.  (On Unix, this would mean a command such as "route add
  1500. default  128.6.4.27  1",  where  128.6.4.27  is  the  address  of  the
  1501. gateway.)   As described above, your system will send all datagrams to
  1502. the default when it doesn't have any better route.    At  first,  this
  1503. strategy  does  not sound very good if you have more than one gateway.
  1504. After all, if all you have is a single default  entry,  how  will  you
  1505. ever  use  the other gateways in the cases where they are better?  The
  1506. answer is that most gateways are able to send  "redirects"  when  they
  1507. get  datagrams  for  which  there  is a better route.  A redirect is a
  1508. specific kind of message using  the  ICMP  (Internet  Control  Message
  1509. Protocol).    It contains information that generally translates to "In
  1510. the future, to get to address XXXXX, please use gateway YYYYY  instead
  1511. of  me".    Correct  TCP/IP implementations use these redirects to add
  1512. entries to their routing table.  Suppose your routing table starts out
  1513. as follows:
  1514.  
  1515.     Destination          Gateway              Flags       Interface
  1516.  
  1517.     127.0.0.1            127.0.0.1            UH          lo0
  1518.     128.6.4              128.6.4.61           U           pe0
  1519.     default              128.6.4.27           UG          pe0
  1520.  
  1521. This  contains  an entry for the local network, 128.6.4, and a default
  1522. pointing to the gateway 128.6.4.27.  Suppose there is also  a  gateway
  1523.                                   24
  1524.  
  1525.  
  1526.  
  1527. 128.6.4.30,  which  is the best way to get to network 128.6.7.  How do
  1528. you find it?  Suppose you have datagrams to send to 128.6.7.23.    The
  1529. first  datagram  will go to the default gateway, since that's the only
  1530. thing in the routing table.  However the default gateway,  128.6.4.27,
  1531. will  notice  that 128.6.4.30 would really be a better route.  (How it
  1532. does that is up to the gateway.  However there are some fairly  simple
  1533. methods  for a gateway to determine that you would be better off using
  1534. a  different  one.)    Thus  128.6.4.27  will  send  back  a  redirect
  1535. specifying   that   datagrams   for  128.6.7.23  should  be  sent  via
  1536. 128.6.4.30.  Your TCP/IP software will add a routing entry
  1537.  
  1538.     128.6.7.23           128.6.4.30           UDHG         pe0
  1539.  
  1540. Any future datagrams for 128.6.7.23  will  be  sent  directly  to  the
  1541. appropriate gateway.
  1542.  
  1543. This  strategy  would  be a complete solution, if it weren't for three
  1544. problems:
  1545.  
  1546.    - It requires each computer to have  the  address  of  one  gateway
  1547.      "hardwired" into its startup files, as the initial default.
  1548.  
  1549.    - If a gateway goes down, routing table entries using it may not be
  1550.      removed.
  1551.  
  1552.    - If your network uses subnets, and your TCP/IP implementation does
  1553.      not handle them, this strategy will not work.
  1554.  
  1555. How  serious  the  first  problem is depends upon your situation.  For
  1556. small networks, there is no problem modifying startup  files  whenever
  1557. something  changes.   But some organizations can find it very painful.
  1558. If network topology changes, and a gateway  is  removed,  any  systems
  1559. that  have  that  gateway  as their default must be adjusted.  This is
  1560. particularly serious if the people who maintain the  network  are  not
  1561. the  same  as  those  maintaining  the individual systems.  One simple
  1562. appoach is to make sure that the default address never changes.    For
  1563. example,  you might adopt the convention that address 1 on each subnet
  1564. is the default gateway for  that  subnet.    For  example,  on  subnet
  1565. 128.6.7,  the  default  gateway  would  always  be 128.6.7.1.  If that
  1566. gateway is ever removed, some other gateway  is  given  that  address.
  1567. (There  must  always  be  at least one gateway left to give it to.  If
  1568. there isn't, you are completely cut off anyway.)
  1569.  
  1570. The biggest problem with the description given so far is that it tells
  1571. you how to add routes but not how to get rid of them.  What happens if
  1572. a gateway goes down?  You want traffic to  be  redirected  back  to  a
  1573. gateway  that is up.  Unfortunately, a gateway that has crashed is not
  1574. going to issue Redirects.  One solution is  to  choose  very  reliable
  1575. gateways.  If they crash very seldom, this may not be a problem.  Note
  1576. that Redirects can be used to handle some kinds  of  network  failure.
  1577. If  something  fails  in  a  distant part of the network, your current
  1578. route may no longer be a good one.  As long as the  gateway  to  which
  1579. you  are talking is still up and talking to you, it can simply issue a
  1580. Redirect to the gateway that is now the best one.  However  you  still
  1581. need  a  way  to  detect  failure  of one of the gateways that you are
  1582.                                   25
  1583.  
  1584.  
  1585.  
  1586. talking to directly.
  1587.  
  1588. The best approach for handling failed  gateways  is  for  your  TCP/IP
  1589. implementation  to  detect  routes  that  have  failed.  TCP maintains
  1590. various timers that allow the software to detect when a connection has
  1591. broken.    When  this  happens, one good approach is to mark the route
  1592. down, and go back to the default gateway.  A similar approach can also
  1593. be used to handle failures in the default gateway.  If you have marked
  1594. two gateways as default,  then  the  software  should  be  capable  of
  1595. switching   when   connections   using  one  of  them  start  failing.
  1596. Unfortunately, some common TCP/IP implementations do not  mark  routes
  1597. as down and change to new ones.  In particular, Berkeley 4.2 Unix does
  1598. not.  However Berkeley 4.3 Unix does do this,  and  as  other  vendors
  1599. begin  to  base  products  on  4.3  rather  than  4.2, this ability is
  1600. expected to become more common.
  1601.  
  1602.  
  1603.  
  1604. 5.4 Other ways for hosts to find routes
  1605.  
  1606.  
  1607. As long as your  TCP/IP  implementations  handle  failing  connections
  1608. properly, establishing one or more default routes in the configuration
  1609. file is likely to be the simplest way  to  handle  routing.    However
  1610. there  are two other routing approaches that are worth considering for
  1611. special situations:
  1612.  
  1613.    - spying on the routing protocol
  1614.  
  1615.    - using proxy ARP
  1616.  
  1617.  
  1618.  
  1619. 5.4.1 Spying on Routing
  1620.  
  1621.  
  1622. Gateways generally  have  a  special  protocol  that  they  use  among
  1623. themselves.     Note  that  redirects  cannot  be  used  by  gateways.
  1624. Redirects are simply ways for gateways to tell "dumb" hosts to  use  a
  1625. different  gateway.    The  gateways  themselves  must have a complete
  1626. picture of the network, and a way to compute the optimal route to each
  1627. subnet.      Generally   they  maintain  this  picture  by  exchanging
  1628. information among themselves.  There  are  several  different  routing
  1629. protocols  in  use  for  this purpose.  One way for a computer to keep
  1630. track of gateways is for it to listen to the gateways' messages  among
  1631. themselves.   There is software available for this purpose for most of
  1632. the common routing protocols.    When  you  run  this  software,  your
  1633. computer  will maintain a complete picture of the network, just as the
  1634. gateways do.  The software is  generally  designed  to  maintain  your
  1635. computer's  routing  tables  dynamically, so that datagrams are always
  1636. sent to the proper gateway.  In effect, the  routing  software  issues
  1637. the  equivalent of the Unix "route add" and "route delete" commands as
  1638. the network topology changes.  Generally this results  in  a  complete
  1639. routing  table,  rather  than  one  that  depends upon default routes.
  1640. (This assumes that the gateways themselves maintain a complete  table.
  1641.                                   26
  1642.  
  1643.  
  1644.  
  1645. Sometimes  gateways  keep track of your campus network completely, but
  1646. use a default route for all off-campus networks, etc.)
  1647.  
  1648. Running routing software on each host does in some sense  "solve"  the
  1649. routing  problem.    However there are several reasons why this is not
  1650. normally recommended except as  a  last  resort.    The  most  serious
  1651. problem  is  that this reintroduces configuration options that must be
  1652. kept up to date on each host.  Any computer that wants to  participate
  1653. in the protocol among the gateways will need to configure its software
  1654. compatibly  with  the  gateways.      Modern   gateways   often   have
  1655. configuration  options  that  are  complex  compared  with those of an
  1656. individual host.  It is undesirable to spread these to every host.
  1657.  
  1658. There is a somewhat more specialized  problem  that  applies  only  to
  1659. diskless  computers.   By its very nature, a diskless computer depends
  1660. upon the network and file servers to load programs and to do swapping.
  1661. It  is  dangerous  for  diskless  computers  to  run any software that
  1662. listens to network broadcasts.   Routing  software  generally  depends
  1663. upon  broadcasts.    For  example,  each  gateway on the network might
  1664. broadcast its routing tables every  30  seconds.    The  problem  with
  1665. diskless nodes is that the software to listen to these broadcasts must
  1666. be loaded over the network.  On a busy computer, programs that are not
  1667. used  for  a  few seconds will be swapped or paged out.  When they are
  1668. activated again, they must  be  swapped  or  paged  in.    Whenever  a
  1669. broadcast is sent, every computer on the network needs to activate the
  1670. routing software in order to process the broadcast.  This  means  that
  1671. many  diskless  computers will be doing swapping or paging at the same
  1672. time.  This is likely to cause a temporary overload  of  the  network.
  1673. Thus  it is very unwise for diskless machines to run any software that
  1674. requires them to listen to broadcasts.
  1675.  
  1676.  
  1677.  
  1678. 5.4.2 Proxy ARP
  1679.  
  1680.  
  1681. Proxy ARP is an alternative technique for letting  gateways  make  all
  1682. the routing decisions.  It is applicable to any broadcast network that
  1683. uses ARP or a similar technique for mapping  Internet  addresses  into
  1684. network-specific   addresses   such   as  Ethernet  addresses.    This
  1685. presentation will  assume  Ethernet.    Other  network  types  can  be
  1686. acccomodated  if  you  replace "Ethernet address" with the appropriate
  1687. network-specific address, and ARP with the protocol used  for  address
  1688. mapping by that network type.
  1689.  
  1690. In  many  ways  proxy  ARP  it is similar to using a default route and
  1691. redirects, however it uses a different mechanism to communicate routes
  1692. to  the  host.   With redirects, a full routing table is used.  At any
  1693. given moment, the host knows what gateways it is routing datagrams to.
  1694. With  proxy  ARP,  you  dispense  with explicit routing tables, and do
  1695. everything at the level of Ethernet addresses.  Proxy ARP can be  used
  1696. for all destinations, only for destinations within your network, or in
  1697. various combinations.  It will be simplest to explain it as  used  for
  1698. all  addresses.    To  do  this, you instruct the host to pretend that
  1699. every computer in  the  world  is  attached  directly  to  your  local
  1700.                                   27
  1701.  
  1702.  
  1703.  
  1704. Ethernet.  On Unix, this would be done using a command
  1705.  
  1706.       route add default 128.6.4.2 0
  1707.  
  1708. where  128.6.4.2  is  assumed  to  be the IP address of your host.  As
  1709. explained above, the metric of 0 causes everything that  matches  this
  1710. route  to be sent directly on the local Ethernet.  Alternatively, some
  1711. systems will allow you to get the same effect by setting a subnet mask
  1712. of  0.   If you do this, you may have to take precautions to make sure
  1713. that it isn't reset by an ICMP subnet mask broadcast by a system  that
  1714. knows the real subnet mask.
  1715.  
  1716. When  a  datagram  is to be sent to a local Ethernet destination, your
  1717. computer needs to know the Ethernet address of the  destination.    In
  1718. order  to find that, it uses something generally called the ARP table.
  1719. This is simply a mapping from Internet address  to  Ethernet  address.
  1720. Here's a typical ARP table.  (On our system, it is displayed using the
  1721. command "arp -a".)
  1722.  
  1723.     FOKKER.RUTGERS.EDU (128.6.5.16) at 8:0:20:0:8:22 temporary
  1724.     CROSBY.RUTGERS.EDU (128.6.5.48) at 2:60:8c:49:50:63 temporary
  1725.     CAIP.RUTGERS.EDU (128.6.4.16) at 8:0:8b:0:1:6f temporary
  1726.     DUDE.RUTGERS.EDU (128.6.20.16) at 2:7:1:0:eb:cd temporary
  1727.     W20NS.MIT.EDU (18.70.0.160) at 2:7:1:0:eb:cd temporary
  1728.     OBERON.USC.EDU (128.125.1.1) at 2:7:1:2:18:ee temporary
  1729.     gatech.edu (128.61.1.1) at 2:7:1:0:eb:cd temporary
  1730.     DARTAGNAN.RUTGERS.EDU (128.6.5.65) at 8:0:20:0:15:a9 temporary
  1731.  
  1732. Note that it is simply a list of IP addresses  and  the  corresponding
  1733. Ethernet  address.  The "temporary" indicates that the entry was added
  1734. dynamically using ARP, rather than being put into the table manually.
  1735.  
  1736. If there is an entry for the address in the ARP table, the datagram is
  1737. simply  put  on  the Ethernet with the corresponding Ethernet address.
  1738. If not, an "ARP request" is broadcast, asking for the destination host
  1739. to  identify  itself.   This request is in effect a question "will the
  1740. host with Internet  address  128.6.4.194  please  tell  me  what  your
  1741. Ethernet address is?".  When a response comes back, it is added to the
  1742. ARP table, and future datagrams  for  that  destination  can  be  sent
  1743. without delay.
  1744.  
  1745. This  mechanism  was  originally  designed  only  for  use  with hosts
  1746. attached directly to a single Ethernet.  If you need to talk to a host
  1747. on  a different Ethernet, it was assumed that your routing table would
  1748. direct you to a gateway.    The  gateway  would  of  course  have  one
  1749. interface  on  your Ethernet.  Your computer would then end up looking
  1750. up the address of that gateway using  ARP.    It  would  generally  be
  1751. useless  to  expect  ARP to work directly with a computer on a distant
  1752. network.  Since it isn't on the same  Ethernet,  there's  no  Ethernet
  1753. address you can use to send datagrams to it.  And when you send an ARP
  1754. request for it, there's nobody to answer the request.
  1755.  
  1756. Proxy ARP is based on the  concept  that  the  gateways  will  act  as
  1757. proxies  for  distant  hosts.    Suppose  you  have  a host on network
  1758. 128.6.5, with address 128.6.5.2.  (computer A  in  diagram  below)  It
  1759.                                   28
  1760.  
  1761.  
  1762.  
  1763. wants  to send a datagram to host 128.6.4.194, which is on a different
  1764. Ethernet (subnet 128.6.4). (computer C in diagram below)  There  is  a
  1765. gateway  connecting  the  two subnets, with address 128.6.5.1 (gateway
  1766. R):
  1767.  
  1768.               network 1               network 2
  1769.                128.6.5                 128.6.4
  1770.         ============================  ==================
  1771.           |              |        |    |      |    |
  1772.        ___|______   _____|____  __|____|__  __|____|____
  1773.        128.6.5.2    128.6.5.3   128.6.5.1   128.6.4.194
  1774.                                 128.6.4.1
  1775.        __________   __________  __________  ____________
  1776.        computer A   computer B   gateway R   computer C
  1777.  
  1778.  
  1779. Now suppose computer A sends an ARP request for computer  C.  C  isn't
  1780. able  to  answer  for  itself.  It's on a different network, and never
  1781. even sees the ARP request.  However gateway R can act on  its  behalf.
  1782. In  effect,  your  computer  asks "will the host with Internet address
  1783. 128.6.4.194 please tell me what your Ethernet address  is?",  and  the
  1784. gateway   says  "here  I  am,  128.6.4.194  is  2:7:1:0:eb:cd",  where
  1785. 2:7:1:0:eb:cd is actually the Ethernet address of the gateway.    This
  1786. bit  of  illusion  works  just  fine.    Your  host  now  thinks  that
  1787. 128.6.4.194  is  attached  to  the   local   Ethernet   with   address
  1788. 2:7:1:0:eb:cd.    Of  course it isn't.  But it works anyway.  Whenever
  1789. there's a datagram to be sent to 128.6.4.194, your host  sends  it  to
  1790. the specified Ethernet address.  Since that's the address of a gateway
  1791. R, the gateway gets  the  datagram.    It  then  forwards  it  to  the
  1792. destination.
  1793.  
  1794. Note that the net effect is exactly the same as having an entry in the
  1795. routing table saying  to  route  destination  128.6.4.194  to  gateway
  1796. 128.6.5.1:
  1797.  
  1798.     128.6.4.194          128.6.5.1           UGH          pe0
  1799.  
  1800. except  that  instead  of  having the routing done at the level of the
  1801. routing table, it is done at the level of the ARP table.
  1802.  
  1803. Generally it's better to use the routing  table.    That's  what  it's
  1804. there for.  However here are some cases where proxy ARP makes sense:
  1805.  
  1806.    - when you have a host that does not implement subnets
  1807.  
  1808.    - when you have a host that does not respond properly to redirects
  1809.  
  1810.    - when you do not want to have to choose a specific default gateway
  1811.  
  1812.    - when your software is unable to recover from a failed route
  1813.  
  1814. The  technique  was first designed to handle hosts that do not support
  1815. subnets.  Suppose that you have a subnetted network.  For example, you
  1816. have  chosen  to break network 128.6 into subnets, so that 128.6.4 and
  1817. 128.6.5 are separate.  Suppose you  have  a  computer  that  does  not
  1818.                                   29
  1819.  
  1820.  
  1821.  
  1822. understand  subnets.    It  will  assume that all of 128.6 is a single
  1823. network.  Thus it will be difficult to establish routing table entries
  1824. to  handle  the  configuration  above.    You  can't tell it about the
  1825. gateway explicitly using "route add 128.6.4.0 128.6.5.1  1"  Since  it
  1826. thinks  all of 128.6 is a single network, it can't understand that you
  1827. are trying to tell it where to send  one  subnet.    It  will  instead
  1828. interpret  this command as an attempt to set up a host route to a host
  1829. whose address is 128.6.4.0.  The only thing that would work  would  be
  1830. to  establish  explicit host routes for every individual host on every
  1831. other subnet.  You can't depend upon default gateways and redirects in
  1832. this  situation either.  Suppose you said "route add default 128.6.5.1
  1833. 1".  This would establish the gateway 128.6.5.1 as a default.  However
  1834. the  system  wouldn't  use  it  to  send  datagrams  to other subnets.
  1835. Suppose the host is  128.6.5.2,  and  wants  to  send  a  datagram  to
  1836. 128.6.4.194.    Since  the destination is part of 128.6, your computer
  1837. considers it to be on the same network as itself, and  doesn't  bother
  1838. to look for a gateway.
  1839.  
  1840. Proxy  ARP  solves  this  problem by making the world look the way the
  1841. defective implementation expects it to look.  Since  the  host  thinks
  1842. all  other  subnets  are part of its own network, it will simply issue
  1843. ARP requests for them.  It expects to get  back  an  Ethernet  address
  1844. that  can  be used to establish direct communications.  If the gateway
  1845. is practicing proxy ARP, it will respond with the  gateway's  Ethernet
  1846. address.    Thus  datagrams  are  sent  to the gateway, and everything
  1847. works.
  1848.  
  1849. As you can see, no specific configuration is needed to use  proxy  ARP
  1850. with a host that doesn't understand subnets.  All you need is for your
  1851. gateways to implement proxy ARP.    In  order  to  use  it  for  other
  1852. purposes, you must explicitly set up the routing table to cause ARP to
  1853. be used.  By default, TCP/IP implementations will  expect  to  find  a
  1854. gateway  for any destination that is on a different network.  In order
  1855. to make them issue ARP's, you must explicitly  install  a  route  with
  1856. metric  0,  as  in the example "route add default 128.6.5.2 0", or you
  1857. must set a subnet mask of 0.
  1858.  
  1859. It is obvious that proxy ARP is reasonable  in  situations  where  you
  1860. have hosts that don't understand subnets.  Some comments may be needed
  1861. on the other situations.  Generally TCP/IP implementations  do  handle
  1862. ICMP  redirects  properly.   Thus it is normally practical to set up a
  1863. default route to some gateway, and depend upon the  gateway  to  issue
  1864. redirects  for  destinations  that  should  use  a  different gateway.
  1865. However in case you ever run into an implementation that does not obey
  1866. redirects,  or cannot be configured to have a default gateway, you may
  1867. be able to make things work by depending upon proxy ARP.    Of  course
  1868. this  requires  that  you be able to configure the host to issue ARP's
  1869. for all destinations.    You  will  need  to  read  the  documentation
  1870. carefully  to  see  exactly  what routing features your implementation
  1871. has.
  1872.  
  1873. Sometimes you may choose to depend upon  proxy  ARP  for  convenience.
  1874. The  problem  with  routing tables is that you have to configure them.
  1875. The simplest configuration is simply to establish a default route, but
  1876. even  there  you  have  to  supply some equivalent to the Unix command
  1877.                                   30
  1878.  
  1879.  
  1880.  
  1881. "route add default ...".  Should you  change  the  addresses  of  your
  1882. gateways,  you  have  to  modify this command on all of your hosts, so
  1883. that they point to the new default gateway.  If you set up  a  default
  1884. route  that depends upon proxy ARP (i.e. has metric 0), you won't have
  1885. to change your configuration files when gateways change.   With  proxy
  1886. ARP,  no  gateway  addresses  are  given  explicitly.  Any gateway can
  1887. respond to the ARP request, no matter what its address.
  1888.  
  1889. In order to save you from having  to  do  configuration,  some  TCP/IP
  1890. implementations  default  to  using ARP when they have no other route.
  1891. The most flexible implementations allow you to mix strategies.    That
  1892. is,  if  you  have  specified  a  route for a particular network, or a
  1893. default route, they will use that route.  But if there is no route for
  1894. a  destination, they will treat it as local, and issue an ARP request.
  1895. As long as your gateways support proxy ARP, this allows such hosts  to
  1896. reach any destination without any need for routing tables.
  1897.  
  1898. Finally,  you  may  choose to use proxy ARP because it provides better
  1899. recovery from failure.  This choice is very much dependent  upon  your
  1900. implementation.    The next section will discuss the tradeoffs in more
  1901. detail.
  1902.  
  1903. In situations where  there  are  several  gateways  attached  to  your
  1904. network,  you  may  wonder how proxy ARP allows you to choose the best
  1905. one.  As described above,  your  computer  simply  sends  a  broadcast
  1906. asking  for  the  Ethernet address for a destination.  We assumed that
  1907. the gateways would be set up to respond to this broadcast.   If  there
  1908. is  more  than  one  gateway,  this  requires coordination among them.
  1909. Ideally, the gateways will have a  complete  picture  of  the  network
  1910. topology.    Thus  they are able to determine the best route from your
  1911. host to any destination.  If the gateways coordinate among themselves,
  1912. it  should  be  possible  for  the best gateway to respond to your ARP
  1913. request.  In practice, it may not  always  be  possible  for  this  to
  1914. happen.    It  is fairly easy to design algorithms to prevent very bad
  1915. routes.  For example, consider the following situation:
  1916.  
  1917.           1             2            3
  1918.         -------  A  ----------  B ----------
  1919.  
  1920. 1, 2, and 3 are networks.  A and B are gateways, connecting network  2
  1921. to  1 or 3.  If a host on network 2 wants to talk to a host on network
  1922. 1, it is fairly easy for gateway  A  to  decide  to  answer,  and  for
  1923. gateway  B  to  decide  not  to.   Here's how: if gateway B accepted a
  1924. datagram for network 1, it would have to forward it to gateway  A  for
  1925. delivery.   This would mean that it would take a datagram from network
  1926. 2 and send it right back out on network 2.  It is very  easy  to  test
  1927. for  routes  that involve this sort of circularity.  It is much harder
  1928. to deal with a situation such as the following:
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.                                   31
  1937.  
  1938.  
  1939.  
  1940.                          1
  1941.                   ---------------
  1942.                     A        B
  1943.                     |        | 4
  1944.                     |        |
  1945.                   3 |        C
  1946.                     |        |
  1947.                     |        | 5
  1948.                     D        E
  1949.                   ---------------
  1950.                          2
  1951.  
  1952. Suppose a computer on network 1 wants to send a  datagram  to  one  on
  1953. network  2.  The route via A and D is probably better, because it goes
  1954. through only one intermediate network (3).  It is also possible to  go
  1955. via  B,  C,  and  E,  but  that path is probably slightly slower.  Now
  1956. suppose the  computer  on  network  1  sends  an  ARP  request  for  a
  1957. destination on 2.  It is likely that A and B will both respond to that
  1958. request.  B is not quite as good a route as A. However it  is  not  so
  1959. bad  as  the case above.  B won't have to send the datagram right back
  1960. out onto network 1.  It is unable  to  determine  there  is  a  better
  1961. alternative  route  without  doing  a  significant  amount  of  global
  1962. analysis on the network.  This may not be practical in the  amount  of
  1963. time available to process an ARP request.
  1964.  
  1965.  
  1966.  
  1967. 5.4.3 Moving to New Routes After Failures
  1968.  
  1969.  
  1970. In  principle,  IP  routing  is  capable of handling line failures and
  1971. gateway crashes.  There  are  various  mechanisms  to  adjust  routing
  1972. tables  and  ARP  tables to keep them up to date.  Unfortunately, many
  1973. major implementations of TCP/IP have  not  implemented  all  of  these
  1974. mechanisms.   The net result is that you have to look carefully at the
  1975. documentation for your implementation,  and  consider  what  kinds  of
  1976. failures  are  most  likely.   You then have to choose a strategy that
  1977. will work best for your site.  The basic choices  for  finding  routes
  1978. have all been listed above:  spying on the gateways' routing protocol,
  1979. setting up a default route and depending  upon  redirects,  and  using
  1980. proxy  ARP.    These methods all have their own limitations in dealing
  1981. with a changing network.
  1982.  
  1983. Spying on the gateways' routing protocol is theoretically the cleanest
  1984. solution.  Assuming that the gateways use good routing technology, the
  1985. tables that they broadcast  contain  enough  information  to  maintain
  1986. optimal  routes  to all destinations.  Should something in the network
  1987. change (a line or a gateway  goes  down),  this  information  will  be
  1988. reflected  in  the  tables,  and  the routing software will be able to
  1989. update the hosts' routing tables appropriately.  The disadvantages are
  1990. entirely practical.  However in some situations the robustness of this
  1991. approach may outweight the disadvantages.  To summarize the discussion
  1992. above, the disadvantages are:
  1993.  
  1994.    - If  the  gateways  are  using  sophisticated  routing  protocols,
  1995.                                   32
  1996.  
  1997.  
  1998.  
  1999.      configuration may be fairly complex.  Thus you will be faced with
  2000.      setting up and maintaining configuration files on every host.
  2001.  
  2002.    - Some  gateways  use proprietary routing protocols.  In this case,
  2003.      you may not  be  able  to  find  software  for  your  hosts  that
  2004.      understands them.
  2005.  
  2006.    - If your hosts are diskless, there can be very serious performance
  2007.      problems associated with listening to routing broadcasts.
  2008.  
  2009. Some gateways may be able  to  convert  from  their  internal  routing
  2010. protocol  to  a simpler one for use by your hosts.  This could largely
  2011. bypass the first two disadvantages.  Currently there is no  known  way
  2012. to get around the third one.
  2013.  
  2014. The  problems  with  default  routes/redirects  and with proxy ARP are
  2015. similar: they both have trouble dealing with  situations  where  their
  2016. table  entries  no  longer  apply.    The only real difference is that
  2017. different tables are involved.  Suppose a gateway goes down.   If  any
  2018. of  your current routes are using that gateway, you may be in trouble.
  2019. If you are depending upon the routing table, the major  mechanism  for
  2020. adjusting  routes is the redirect.  This works fine in two situations:
  2021.  
  2022.    - where the default gateway is not the best  route.    The  default
  2023.      gateway can direct you to a better gateway
  2024.  
  2025.    - where  a distant line or gateway fails.  If this changes the best
  2026.      route, the current gateway can redirect you to the  gateway  that
  2027.      is now best
  2028.  
  2029. The case it does not protect you against is where the gateway that you
  2030. are currently sending your datagrams to crashes.  Since it is down, it
  2031. is  unable to redirect you to another gateway.  In many cases, you are
  2032. also unprotected if your default  gateway  goes  down,  since  routing
  2033. starts by sending to the default gateway.
  2034.  
  2035. The  situation  with proxy ARP is similar.  If the gateways coordinate
  2036. themselves properly,  the  right  one  will  respond  initially.    If
  2037. something  elsewhere  in  the  network  changes,  the  gateway you are
  2038. currently issuing can issue a  redirect  to  a  new  gateway  that  is
  2039. better.    (It is usually possible to use redirects to override routes
  2040. established by proxy ARP.)  Again, the  case  you  are  not  protected
  2041. against  is  where the gateway you are currently using crashes.  There
  2042. is no equivalent to failure of a default gateway,  since  any  gateway
  2043. can respond to the ARP request.
  2044.  
  2045. So  the big problem is that failure of a gateway you are using is hard
  2046. to recover from.  It's hard because the main  mechanism  for  changing
  2047. routes  is  the  redirect,  and  a  gateway  that  is down can't issue
  2048. redirects.  Ideally, this problem should be  handled  by  your  TCP/IP
  2049. implementation,   using   timeouts.    If  a  computer  stops  getting
  2050. responses, it should cancel the existing route, and try to establish a
  2051. new  one.    Where  you are using a default route, this means that the
  2052. TCP/IP implementation must be able to declare a route as down based on
  2053. a  timeout.  If you have been redirected to a non-default gateway, and
  2054.                                   33
  2055.  
  2056.  
  2057.  
  2058. that route is declared down, traffic will return to the default.   The
  2059. default gateway can then begin handling the traffic, or redirect it to
  2060. a different gateway.  To handle  failure  of  a  default  gateway,  it
  2061. should  be possible to have more than one default.  If one is declared
  2062. down, another will be used.  Together, these  mechanisms  should  take
  2063. care of any failure.
  2064.  
  2065. Similar  mechanisms can be used by systems that depend upon proxy ARP.
  2066. If a connection is timing out, the ARP table entry that it uses should
  2067. be  cleared.   This will cause a new ARP request, which can be handled
  2068. by a gateway that is still up.  A simpler mechanism would simply be to
  2069. time  out  all  ARP entries after some period.  Since making a new ARP
  2070. request has a very low overhead, there's no problem with  removing  an
  2071. ARP entry even if it is still good.  The next time a datagram is to be
  2072. sent, a new request will be made.    The  response  is  normally  fast
  2073. enough that users will not even notice the delay.
  2074.  
  2075. Unfortunately,   many   common   implementations   do  not  use  these
  2076. strategies.  In Berkeley 4.2, there is no automatic way of getting rid
  2077. of  any  kind of entry, either routing or ARP.  They do not invalidate
  2078. routes or ARP entries based on failures.  If  gateway  crashes  are  a
  2079. significant  problem,  there may be no choice but to run software that
  2080. listens to the routing protocol.  In Berkeley 4.3, routing entries are
  2081. removed  when  TCP connections are failing.  ARP entries are still not
  2082. removed.  This makes the default route strategy  more  attractive  for
  2083. 4.3 than proxy ARP.  Having more than one default route may also allow
  2084. for recovery from failure of a default gateway.  Note however that 4.3
  2085. only  handles  timeout for connections using TCP.  If a route is being
  2086. used only by services based on UDP, it will not recover  from  gateway
  2087. failure.    While  the  "traditional" TCP/IP services use TCP, network
  2088. file systems generally do not.  Thus 4.3-based systems still  may  not
  2089. always be able to recover from failure.
  2090.  
  2091. In  general,  you  should  examine  your  implementation  in detail to
  2092. determine what sort of error recovery strategy it uses.  We hope  that
  2093. the  discussion in this section will then help you choose the best way
  2094. of dealing with routing.
  2095.  
  2096. There is one more strategy that some older implementations use.  It is
  2097. strongly  discouraged,  but we mention it here so you can recognize it
  2098. if you see it.  Some implementations detect gateway failure by  taking
  2099. active  measure to see what gateways are up.  The best version of this
  2100. is based on a list of all gateways that are currently in use.    (This
  2101. can  be  determined  from  the routing table.)  Every minute or so, an
  2102. echo request datagram is sent to each such  gateway.    If  a  gateway
  2103. stops responding to echo requests, it is declared down, and all routes
  2104. using it revert to the default.   With  such  an  implementation,  you
  2105. normally supply more than one default gateway.  If the current default
  2106. stops responding, an alternate is chosen.  In some cases,  it  is  not
  2107. even  necessary  to  choose an explicit default gateway.  The software
  2108. will  randomly  choose  any  gateway  that  is   responding.      This
  2109. implementation  is  very  flexible  and  recovers  well from failures.
  2110. However a large network full of such implementations will waste a  lot
  2111. of  bandwidth  on  the  echo  datagrams  that are used to test whether
  2112. gateways  are  up.    This  is  the  reason  that  this  strategy   is
  2113.                                   34
  2114.  
  2115.  
  2116.  
  2117. discouraged.
  2118.  
  2119.  
  2120.  
  2121. 6. Bridges and Gateways
  2122.  
  2123.  
  2124. This  section  will  deal  in  more detail with the technology used to
  2125. construct larger networks.  It  will  focus  particularly  on  how  to
  2126. connect  together  multiple  Ethernets,  token rings, etc.  These days
  2127. most networks are hierarchical.  Individual hosts attach to local-area
  2128. networks  such  as  Ethernet or token ring.  Then those local networks
  2129. are connected via some combination of backbone networks and  point  to
  2130. point  links.    A  university might have a network that looks in part
  2131. like this:
  2132.  
  2133.      ________________________________
  2134.      |   net 1      net 2    net 3  |        net 4            net 5
  2135.      | ---------X---------X-------- |      --------         --------
  2136.      |                         |    |         |                 |
  2137.      |  Building A             |    |         |                 |
  2138.      |               ----------X--------------X-----------------X
  2139.      |                              |  campus backbone network  :
  2140.      |______________________________|                           :
  2141.                                                          serial :
  2142.                                                            line :
  2143.                                                          -------X-----
  2144.                                                              net  6
  2145.  
  2146. Nets 1, 2 and 3 are in one building.  Nets 4 and 5  are  in  different
  2147. buildings  on  the  same  campus.  Net 6 is in a somewhat more distant
  2148. location.  The diagram above shows nets 1, 2, and  3  being  connected
  2149. directly,  with switches that handle the connections being labelled as
  2150. "X".  Building A is connected to  the  other  buildings  on  the  same
  2151. campus  by  a backbone network.  Note that traffic from net 1 to net 5
  2152. takes the following path:
  2153.  
  2154.    - from 1 to 2 via the direct connection between those networks
  2155.  
  2156.    - from 2 to 3 via another direct connection
  2157.  
  2158.    - from 3 to the backbone network
  2159.  
  2160.    - across the backbone network from building A to  the  building  in
  2161.      which net 5 is housed
  2162.  
  2163.    - from the backbone network to net 5
  2164.  
  2165. Traffic  for  net  6 would additionally pass over a serial line.  With
  2166. the setup as shown, the same switch  is  being  used  to  connect  the
  2167. backbone  network  to net 5 and to the serial line.  Thus traffic from
  2168. net 5 to net 6 would not need to go through the backbone, since  there
  2169. is a direct connection from net 5 to the serial line.
  2170.  
  2171. This section is largely about what goes in those "X"'s.
  2172.                                   35
  2173.  
  2174.  
  2175.  
  2176. 6.1 Alternative Designs
  2177.  
  2178.  
  2179. Note  that  there  are alternatives to the sort of design shown above.
  2180. One is to use point to point lines or switched lines directly to  each
  2181. host.   Another is to use a single-level of network technology that is
  2182. capable of handling both local and long-haul networking.
  2183.  
  2184.  
  2185.  
  2186. 6.1.1 A mesh of point to point lines
  2187.  
  2188.  
  2189. Rather than connecting hosts to a local network such as Ethernet,  and
  2190. then   interconnecting  the  Ethernets,  it  is  possible  to  connect
  2191. long-haul serial lines directly to the individual computers.  If  your
  2192. network   consists   primarily  of  individual  computers  at  distant
  2193. locations, this might make sense.  Here would be  a  small  design  of
  2194. that type.
  2195.  
  2196.           computer 1                computer 2             computer 3
  2197.               |                         |                      |
  2198.               |                         |                      |
  2199.               |                         |                      |
  2200.           computer 4 -------------- computer 5 ----------- computer 6
  2201.  
  2202. In  the design shown earlier, the task of routing datagrams around the
  2203. network is handled by special-purpose switching units shown as  "X"'s.
  2204. If  you  run lines directly between pairs of hosts, your hosts will be
  2205. doing this sort of routing and switching,  as  well  as  their  normal
  2206. computing.    Unless  you  run  lines  directly  between every pair of
  2207. computers, some systems will end up handling traffic for  others.  For
  2208. example,  in this design, traffic from 1 to 3 will go through 4, 5 and
  2209. 6.  This is certainly possible, since most TCP/IP implementations  are
  2210. capable of forwarding datagrams.  If your network is of this type, you
  2211. should think of your hosts as also acting as gateways.   Much  of  the
  2212. discussion  below  on  configuring  gateways will apply to the routing
  2213. software that you run on your hosts.  This sort  of  configuration  is
  2214. not as common as it used to be, for two reasons:
  2215.  
  2216.    - Most large networks have more than one computer per location.  In
  2217.      this case it is less expensive to set up a local network at  each
  2218.      location than to run point to point lines to each computer.
  2219.  
  2220.    - Special-purpose  switching  units have become less expensive.  It
  2221.      often makes sense to offload the routing and communications tasks
  2222.      to a switch rather than handling it on the hosts.
  2223.  
  2224. It is of course possible to have a network that mixes the two kinds of
  2225. techology.  In this case,  locations  with  more  equipment  would  be
  2226. handled  by  a hierarchical system, with local-area networks connected
  2227. by switches.  Remote locations with a single computer would be handled
  2228. by  point  to  point lines going directly to those computers.  In this
  2229. case the routing software used on the remote computers would  have  to
  2230. be  compatible  with that used by the switches, or there would need to
  2231.                                   36
  2232.  
  2233.  
  2234.  
  2235. be a gateway between the two parts of the network.
  2236.  
  2237. Design decisions of this type are typically made after  an  assessment
  2238. of  the  level  of network traffic, the complexity of the network, the
  2239. quality of routing software available for the hosts, and  the  ability
  2240. of the hosts to handle extra network traffic.
  2241.  
  2242.  
  2243.  
  2244. 6.1.2 Circuit switching technology
  2245.  
  2246.  
  2247. Another  alternative  to  the hierarchical LAN/backbone approach is to
  2248. use circuit switches connected to each individual computer.   This  is
  2249. really  a  variant  of  the  point  to point line technique, where the
  2250. circuit switch allows each system to have what  amounts  to  a  direct
  2251. line to every other system.  This technology is not widely used within
  2252. the TCP/IP community, largely because the TCP/IP protocols assume that
  2253. the  lowest  level  handles  isolated  datagrams.    When a continuous
  2254. connection  is  needed,  higher  network  layers  implement  it  using
  2255. datagrams.    This  datagram-oriented  technology  does  not  match  a
  2256. circuit-oriented environment very closely.  In order  to  use  circuit
  2257. switching  technology,  the IP software must be modified to be able to
  2258. build and tear down virtual circuits as appropriate.  When there is  a
  2259. datagram  for a given destination, a virtual circuit must be opened to
  2260. it.  The virtual circuit would  be  closed  when  there  has  been  no
  2261. traffic  to  that  destination  for  some time.  The major use of this
  2262. technology is for  the  DDN  (Defense  Data  Network).    The  primary
  2263. interface  to  the  DDN is based on X.25.  This network appears to the
  2264. outside as a distributed X.25 network.  TCP/IP software  intended  for
  2265. use with the DDN must do precisely the virtual circuit management just
  2266. described.     Similar   techniques   could   be   used   with   other
  2267. circuit-switching  technologies, e.g. ATT's DataKit, although there is
  2268. almost no software currently available to support this.
  2269.  
  2270.  
  2271.  
  2272. 6.1.3 Single-level networks
  2273.  
  2274.  
  2275. In some cases new developments in wide-area networks can eliminate the
  2276. need  for hierarchical networks.  Early hierarchical networks were set
  2277. up because the only convenient  network  technology  was  Ethernet  or
  2278. other  LAN's, and those could not span distances large enough to cover
  2279. an entire campus.  Thus it  was  necessary  to  use  serial  lines  to
  2280. connect  LAN's  in  various  locations.    It  is now possible to find
  2281. network technology whose characteristics are similar to Ethernet,  but
  2282. where  a  single  network  can  span a campus.  Thus it is possible to
  2283. think of using a single large network, with no hierarchical structure.
  2284.  
  2285. The  primary  limitations  of  a  large   single-level   network   are
  2286. performance  and  reliability  considerations.  If a single network is
  2287. used  for  the  entire  campus,  it  is  very  easy  to  overload  it.
  2288. Hierarchical   networks  can  handle  a  larger  traffic  volume  than
  2289. single-level networks if traffic patterns have a reasonable amount  of
  2290.                                   37
  2291.  
  2292.  
  2293.  
  2294. locality.  That is, in many applications, traffic within an individual
  2295. department tends to be greater than traffic among departments.
  2296.  
  2297. Let's look at a concrete example.  Suppose there are  10  departments,
  2298. each  of  which  generates 1 Mbit/sec of traffic.  Suppose futher than
  2299. 90% of that traffic is to other systems  within  the  department,  and
  2300. only  10%  is  to  other  departments.  If each department has its own
  2301. network, that network only needs to handle 1 Mbit/sec.   The  backbone
  2302. network connecting the department also only needs 1 Mbit/sec capacity,
  2303. since it is handling 10% of 1 Mbit from each department.  In order  to
  2304. handle  this  situation  with a single wide-area network, that network
  2305. would have to be able to handle the  simultaneous  load  from  all  10
  2306. departments, which would be 10 Mbit/sec.
  2307.  
  2308. However  this example was carefully constructed to be favorable to the
  2309. hierarchical design.  If more of the  traffic  in  the  department  is
  2310. going  to  other  departments,  then  the  backbone will need a higher
  2311. bandwidth.  For example, suppose that a campus has a  few  centralized
  2312. resources,  e.g.  mainframes  and  other  large systems in a computing
  2313. center.  If  most  of  the  network  traffic  is  from  small  systems
  2314. attempting  to get to the central system, then the argument above does
  2315. not work.  In this case a hierarchy may still be useful.   However  it
  2316. doesn't  reduce  the bandwidth required for the long-haul network.  In
  2317. the example above, if all 10 departments communicated  primarily  with
  2318. systems  at the computer center, the backbone would have to be able to
  2319. carry all of their traffic, 10Mbits per second.  The  computer  center
  2320. would  either attach its systems directly to the backbone, or it would
  2321. have a "departmental" network with a capacity of  10Mbits  per  second
  2322. rather than the 1Mbits per second needed by the other departments.
  2323.  
  2324. The   second  limitation  on  single-level  networks  is  reliability,
  2325. maintainability and security.  Wide-area networks are  more  difficult
  2326. to  diagnose  and  maintain than local-area networks, because problems
  2327. can be introduced from any building to which the network is connected.
  2328. They  also  make traffic visible in all locations.  For these reasons,
  2329. it is often sensible to handle local  traffic  locally,  and  use  the
  2330. wide-area  network  only  for  traffic  that  actually must go between
  2331. buildings.  However if you have a situation where  each  location  has
  2332. only  one  or  two  computers, it may not make sense to set up a local
  2333. network at each location, and a single-level network may make sense.
  2334.  
  2335.  
  2336.  
  2337. 6.1.4 Mixed designs
  2338.  
  2339.  
  2340. In practice,  few  large  networks  have  the  luxury  of  adopting  a
  2341. theoretically pure design.
  2342.  
  2343. It is very unlikely that any large network will be able to avoid using
  2344. a hierarchical design.  Suppose we  set  out  to  use  a  single-level
  2345. network.  Even if most buildings have only one or two computers, there
  2346. will be some location where there are enough that a local-area network
  2347. is justified.  The result is a mixture of a single-level network and a
  2348. hierachical network.  Most buildings have  their  computers  connected
  2349.                                   38
  2350.  
  2351.  
  2352.  
  2353. directly  to  the  wide-area  network, as with a single-level network.
  2354. However in one building there is a local-area network which  uses  the
  2355. wide-area  network  as  a  backbone,  connecting to it via a switching
  2356. unit.
  2357.  
  2358. On the other side of the story, even network designers with  a  strong
  2359. commitment  to  hierarchical networks are likely to find some parts of
  2360. the network where it simply doesn't make economic sense to  install  a
  2361. local-area  network.    So  a  host  is put directly onto the backbone
  2362. network, or tied directly to a serial line.
  2363.  
  2364. However you should think carefully before  making  ad  hoc  departures
  2365. from  your  design  philosophy in order to save a few dollars.  In the
  2366. long run, network maintainability is going to depend upon your ability
  2367. to make sense of what is going on in the network.  The more consistent
  2368. your technology is, the more likely you are to be able to maintain the
  2369. network.
  2370.  
  2371.  
  2372.  
  2373. 6.2 An introduction to alternative switching technologies
  2374.  
  2375.  
  2376. This  section will discuss the characteristics of various technologies
  2377. used to switch datagrams between networks.  In effect, we  are  trying
  2378. to  fill  in  some  details  about the black boxes assumed in previous
  2379. sections.  There are three basic types of switches, generally referred
  2380. to as repeaters, bridges, and gateways, or alternatively as level 1, 2
  2381. and 3 switches (based on the level of the  OSI  model  at  which  they
  2382. operate).    Note however that there are systems that combine features
  2383. of more than one of these, particularly bridges and gateways.
  2384.  
  2385. The most important dimensions on which switches  vary  are  isolation,
  2386. performance, routing and network management facilities.  These will be
  2387. discussed below.
  2388.  
  2389. The most serious difference is between repeaters  and  the  other  two
  2390. types  of  switch.    Until recently, gateways provided very different
  2391. services from bridges.  However these two technologies are now  coming
  2392. closer  together.  Gateways are beginning to adopt the special-purpose
  2393. hardware that has characterized bridges in  the  past.    Bridges  are
  2394. beginning to adopt more sophisticated routing, isolation features, and
  2395. network management, which have characterized  gateways  in  the  past.
  2396. There  are  also systems that can function as both bridge and gateway.
  2397. This means that at the moment, the crucial  decision  may  not  be  to
  2398. decide  whether  to  use  a  bridge  or  a gateway, but to decide what
  2399. features you want in a switch  and  how  it  fits  into  your  overall
  2400. network design.
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.                                   39
  2409.  
  2410.  
  2411.  
  2412. 6.2.1 Repeaters
  2413.  
  2414.  
  2415. A repeater is a piece of equipment that connects two networks that use
  2416. the same technology.  It receives every data packet on  each  network,
  2417. and retransmits it onto the other network.  The net result is that the
  2418. two networks have exactly the same  set  of  packets  on  them.    For
  2419. Ethernet or IEEE 802.3 networks there are actually two different kinds
  2420. of repeater.  (Other network technologies may not need  to  make  this
  2421. distinction.)
  2422.  
  2423. A  simple  repeater  operates at a very low level indeed.  Its primary
  2424. purpose is to get around limitations in cable length caused by  signal
  2425. loss or timing dispersion.  It allows you to construct somewhat larger
  2426. networks than you would otherwise be able to construct.    It  can  be
  2427. thought  of  as  simply  a two-way amplifier.  It passes on individual
  2428. bits in the signal, without doing any processing at the packet  level.
  2429. It even passes on collisions.  That is, if a collision is generated on
  2430. one of  the  networks  connected  to  it,  the  repeater  generates  a
  2431. collision  on  the  other  network.  There is a limit to the number of
  2432. repeaters that you can use in a network.  The  basic  Ethernet  design
  2433. requires  that signals must be able to get from one end of the network
  2434. to the other within a specified amount of time.    This  determines  a
  2435. maximum  allowable length.  Putting repeaters in the path does not get
  2436. around this limit.  (Indeed each repeater adds some delay, so in  some
  2437. ways  a repeater makes things worse.)  Thus the Ethernet configuration
  2438. rules limit the number of repeaters that can be in any path.
  2439.  
  2440. A "buffered repeater" operates at the level  of  whole  data  packets.
  2441. Rather  than passing on signals a bit at a time, it receives an entire
  2442. packet from one network into an internal buffer and  then  retransmits
  2443. it  onto  the other network.  It does not pass on collisions.  Because
  2444. such low-level features  as  collisions  are  not  repeated,  the  two
  2445. networks continue to be separate as far as the Ethernet specifications
  2446. are concerned.  Thus there  are  no  restrictions  on  the  number  of
  2447. buffered  repeaters  that can be used.  Indeed there is no requirement
  2448. that both of the networks be of  the  same  type.    However  the  two
  2449. networks  must  be sufficiently similar that they have the same packet
  2450. format.  Generally this means that  buffered  repeaters  can  be  used
  2451. between two networks of the IEEE 802.x family (assuming that they have
  2452. chosen the same address  length  and  maximum  packet  size),  or  two
  2453. networks  of  some other related family.  A pair of buffered repeaters
  2454. can be used to connect two networks via a serial line.
  2455.  
  2456. Buffered repeaters share with simple repeaters the most basic feature:
  2457. they  repeat every data packet that they receive from one network onto
  2458. the other.  Thus the two networks end up with exactly the same set  of
  2459. packets on them.
  2460.  
  2461.  
  2462.  
  2463.  
  2464.  
  2465.  
  2466.  
  2467.                                   40
  2468.  
  2469.  
  2470.  
  2471. 6.2.2 Bridges and gateways
  2472.  
  2473.  
  2474. A  bridge  differs from a buffered repeater primarily in the fact that
  2475. it exercizes some selectivity as to what datagrams it forwards between
  2476. networks.    Generally  the  goal  is  to increase the capacity of the
  2477. system by keeping local traffic confined to the network  on  which  it
  2478. originates.  Only traffic intended for other networks goes through the
  2479. bridge.  So far this  description  would  also  apply  to  a  gateway.
  2480. Bridges  and  gateways differ in the way they determine what datagrams
  2481. to forward.  A bridge uses only the OSI level 2 address.  In the  case
  2482. of  Ethernet  or  IEEE  802.x networks, this is the 6-byte Ethernet or
  2483. MAC-level address. (The term  "MAC-level  address"  is  more  general.
  2484. However  for  the  sake of concreteness, examples in this section will
  2485. assume that Ethernet is being used.  You  may  generally  replace  the
  2486. term  "Ethernet  address"  with  the  equivalent MAC-level address for
  2487. other similar technologies.)  A bridge does not examine  the  datagram
  2488. itself,  so  it  does  not  use  the  IP address or its equivalent for
  2489. routing decisions.  In contrast, a gateway bases its decisions on  the
  2490. IP address, or its equivalent for other protocols.
  2491.  
  2492. There are several reasons why it matters which kind of address is used
  2493. for decisions.  The most basic is that  it  affects  the  relationship
  2494. between  the  switch  and  the  upper  layers  of  the  protocol.   If
  2495. forwarding is done at the level of the MAC-level address (bridge), the
  2496. switch  will  be  invisible to the protocols.  If it is done at the IP
  2497. level, the switch will be visible.  Let's give an example.   Here  are
  2498. two networks connected by a bridge:
  2499.  
  2500.               network 1          network 2
  2501.                128.6.5            128.6.4
  2502.         ==================  ================================
  2503.           |            |      |            |             |
  2504.        ___|______    __|______|__   _______|___   _______|___
  2505.        128.6.5.2        bridge       128.6.4.3     128.6.4.4
  2506.        __________    ____________   ___________   ___________
  2507.        computer A                   computer B    computer C
  2508.  
  2509.  
  2510. Note that the bridge does not have an IP address.  As far as computers
  2511. A, B, and C are concerned,  there  is  a  single  Ethernet  (or  other
  2512. network)  to which they are all attached.  This means that the routing
  2513. tables must be set up so that computers on both  networks  treat  both
  2514. networks  as local.  When computer A opens a connection to computer B,
  2515. it first broadcasts an ARP request asking for  computer  B's  Ethernet
  2516. address.    The  bridge  must  pass  this  broadcast from network 1 to
  2517. network 2.  (In general, bridges must pass all broadcasts.)  Once  the
  2518. two computers know each other's Ethernet addresses, communications use
  2519. the Ethernet address as the destination.  At that  point,  the  bridge
  2520. can  start  exerting  some  selectivity.   It will only pass datagrams
  2521. whose Ethernet destination address is  for  a  machine  on  the  other
  2522. network.  Thus a datagram from B to A will be passed from network 2 to
  2523. 1, but a datagram from B to C will be ignored.
  2524.  
  2525. In order to make this  selection,  the  bridge  needs  to  know  which
  2526.                                   41
  2527.  
  2528.  
  2529.  
  2530. network  each machine is on.  Most modern bridges build up a table for
  2531. each network  to  which  they  are  connected,  listing  the  Ethernet
  2532. addresses  of  machines  known to be on that network.  They do this by
  2533. watching all of the datagrams on each network.  When a datagram  first
  2534. appears  on  network 1, it is reasonable to conclude that the Ethernet
  2535. source address corresponds to a machine on network 1.
  2536.  
  2537. Note that a bridge must look at every datagram on  the  Ethernet,  for
  2538. two  different reasons.  First, it may use the source address to learn
  2539. which machines are on which network.  Second,  it  must  look  at  the
  2540. destination address in order to decide whether it needs to forward the
  2541. datagram to the other network.
  2542.  
  2543. As mentioned above, generally bridges must pass  broadcasts  from  one
  2544. network to the other.  Broadcasts are often used to locate a resource.
  2545. The ARP request is a typical example of this.  Since the bridge has no
  2546. way  of  knowing  what  host is going to answer the broadcast, it must
  2547. pass it on to the other network.  Some  bridges  have  user-selectable
  2548. filters.  With them, it is possible to block some broadcasts and allow
  2549. others.  You might allow ARP broadcasts (which are essential for IP to
  2550. function),  but confine less essential broadcasts to one network.  For
  2551. example, you might choose not to pass  rwhod  broadcasts,  which  some
  2552. systems  use  to  keep  track  of  every  user logged into every other
  2553. system.  You might decide that it is  sufficient  for  rwhod  to  know
  2554. about the systems on a single segment of the network.
  2555.  
  2556. Now let's take a look at two networks connected by a gateway
  2557.  
  2558.               network 1                   network 2
  2559.                128.6.5                     128.6.4
  2560.         ====================      ==================================
  2561.           |              |          |              |             |
  2562.        ___|______    ____|__________|____   _______|___   _______|___
  2563.        128.6.5.2     128.6.5.1  128.6.4.1    128.6.4.3     128.6.4.4
  2564.        __________    ____________________   ___________   ___________
  2565.        computer A           gateway           computer B    computer C
  2566.  
  2567.  
  2568. Note  that  the  gateway  has IP addresses assigned to each interface.
  2569. The  computers'  routing  tables  are  set  up  to   forward   through
  2570. appropriate  address.    For  example,  computer A has a routing entry
  2571. saying that it should use the  gateway  128.6.5.1  to  get  to  subnet
  2572. 128.6.4.
  2573.  
  2574. Because  the  computers  know  about the gateway, the gateway does not
  2575. need to scan all the packets on the Ethernet.  The computers will send
  2576. datagrams  to  it  when  appropriate.  For example, suppose computer A
  2577. needs to send a message to computer B. Its routing table will tell  it
  2578. to  use  gateway  128.6.5.1.    It  will issue an ARP request for that
  2579. address.  The gateway will respond to the ARP  request,  just  as  any
  2580. host  would.  From then on, datagrams destined for B will be sent with
  2581. the gateway's Ethernet address.
  2582.  
  2583.  
  2584.  
  2585.                                   42
  2586.  
  2587.  
  2588.  
  2589. 6.2.3 More about bridges
  2590.  
  2591.  
  2592. There are several advantages to using  the  MAC-level  address,  as  a
  2593. bridge  does.   First, every packet on an Ethernet or IEEE network has
  2594. such an address.  The address is in the same place for  every  packet,
  2595. whether  it  is  IP,  DECnet,  or  some  other  protocol.   Thus it is
  2596. relatively fast to get the address from the packet.   A  gateway  must
  2597. decode  the  entire IP header, and if it is to support protocols other
  2598. than IP, it must have software for each such  protocol.    This  means
  2599. that  a bridge automatically supports every possible protocol, whereas
  2600. a gateway requires specific provisions for  each  protocol  it  is  to
  2601. support.
  2602.  
  2603. However  there  are  also disadvantages.  The one that is intrinsic to
  2604. the design of a bridge is
  2605.  
  2606.    - A bridge must look at every packet on the network, not just those
  2607.      addressed  to  it.    Thus it is possible to overload a bridge by
  2608.      putting it on a very busy network, even if very little traffic is
  2609.      actually going through the bridge.
  2610.  
  2611. However there is another disadvantage that is based on the way bridges
  2612. are usually built.  It is possible in principle to design bridges that
  2613. do not have this disadvantage, but I don't know of any plans to do so.
  2614. It stems from the fact that bridges do not  have  a  complete  routing
  2615. table  that describes the entire system of networks.  They simply have
  2616. a list of the Ethernet addresses that lie on  each  of  its  networks.
  2617. This means
  2618.  
  2619.    - Networks  that  use  bridges cannot have loops in them.  If there
  2620.      were a loop,  some  bridges  would  see  traffic  from  the  same
  2621.      Ethernet address coming from both directions, and would be unable
  2622.      to decide which table to put that address  in.    Note  that  any
  2623.      parallel  paths  to the same destination constitute a loop.  This
  2624.      means  that  multiple  paths  cannot  be  used  for  purposes  of
  2625.      splitting the load or providing redundancy.
  2626.  
  2627. There  are  some  ways  of  getting around the problem of loops.  Many
  2628. bridges allow configurations with redundant connections, but turn  off
  2629. links  until  there are no loops left.  Should a link fail, one of the
  2630. disabled ones is then brought back into service.  Thus redundant links
  2631. can  still  buy  you  extra  reliability.    But they can't be used to
  2632. provide extra capacity.  It is also possible to build  a  bridge  that
  2633. will  make  use  of  parallel point to point lines, in the one special
  2634. case where those lines go between a  single  pair  of  bridges.    The
  2635. bridges  would  treat  the two lines as a single virtual line, and use
  2636. them alternately in round-robin fashion.
  2637.  
  2638. The process of disabling redundant  connections  until  there  are  no
  2639. loops  left  is  called  a "spanning tree algorithm".  This name comes
  2640. from the fact that a tree is defined as a pattern of connections  with
  2641. no loops.  Thus one wants to disable connections until the connections
  2642. that are left form a tree that "spans" (includes) all of the  networks
  2643. in  the  system.  In order to do this, all of the bridges in a network
  2644.                                   43
  2645.  
  2646.  
  2647.  
  2648. system must communicate among themselves.  There is an  IEEE  proposal
  2649. to  standardize  the protocol for doing this, and for constructing the
  2650. spanning tree.
  2651.  
  2652. Note that there is a tendency  for  the  resulting  spanning  tree  to
  2653. result  in  high  network  loads  on certain parts of the system.  The
  2654. networks near the "top of the tree" handle all traffic between distant
  2655. parts  of  the  network.  In a network that uses gateways, it would be
  2656. possible to put in an extra link between parts  of  the  network  that
  2657. have  heavy  traffic between them.  However such extra links cannot be
  2658. used by a set of bridges.
  2659.  
  2660.  
  2661.  
  2662. 6.2.4 More about gateways
  2663.  
  2664.  
  2665. Gateways have their own advantages and disadvantages.   In  general  a
  2666. gateway  is more complex to design and to administer than a bridge.  A
  2667. gateway must participate in all of the protocols that it  is  designed
  2668. to  forward.  For example, an IP gateway must respond to ARP requests.
  2669. The IP standards also require it to completely process the IP  header,
  2670. decrementing the time to live field and obeying any IP options.
  2671.  
  2672. Gateways  are  designed to handle more complex network topologies than
  2673. bridges.  As such, they have a different (and  more  complex)  set  of
  2674. decisions  to make.  In general a bridge has fairly simple decision to
  2675. make: should it forward a datagram, and if so which  interface  should
  2676. it send the datagram out?  When a gateway forwards a datagram, it must
  2677. decide what host or gateway to send the datagram  to  next.    If  the
  2678. gateway  sends  a datagram back onto the same network it came from, it
  2679. should also issue a redirect to the source of the datagram telling  it
  2680. to  use a better route.  Many gateways can also handle parallel paths.
  2681. If there are several equally good paths to a destination, the  gateway
  2682. will  alternate  among  them in round-robin fashion.  (This is done by
  2683. some bridges also, though it is less common there.    In  both  cases,
  2684. there  are some issues raised by round-robin alternation.  It tends to
  2685. lead to datagrams arriving in an order different  than  the  order  in
  2686. which  they  were  sent.    This  can  complicate  processing  by  the
  2687. destination host.  Some older  TCP/IP  implementations  have  bugs  in
  2688. handling out of order datagrams.)
  2689.  
  2690. In  order  to  handle these decisions, a gateway will typically have a
  2691. routing table that looks very much  like  a  host's.    As  with  host
  2692. routing  tables, a gateway's table contains an entry for each possible
  2693. network number.  For each network, there is  either  an  entry  saying
  2694. that that network is connected directly to the gateway, or there is an
  2695. entry saying that traffic for that network should be forwarded through
  2696. some  other  gateway  or  gateways.    We  will  describe the "routing
  2697. protocols" used to build up this information later, in the  discussion
  2698. on how to configure a gateway.
  2699.  
  2700.  
  2701.  
  2702.  
  2703.                                   44
  2704.  
  2705.  
  2706.  
  2707. 6.3 Comparing the switching technologies
  2708.  
  2709.  
  2710. Repeaters,  buffered repeaters, bridges, and gateways form a spectrum.
  2711. Those devices near the beginning of the  list  are  best  for  smaller
  2712. networks.    They  are  less expensive, and easier to set up, but less
  2713. general.  Those near the end of the list  are  suitable  for  building
  2714. more complex networks.  Many networks will contain a mixture of switch
  2715. types, with repeaters being used  to  connect  a  few  nearby  network
  2716. segments,  bridges  used  for somewhat larger areas, and gateways used
  2717. for long-distance links.
  2718.  
  2719. Note that this document so far has  assumed  that  only  gateways  are
  2720. being  used.  The section on setting up a host described how to set up
  2721. a routing table  listing  the  gateways  to  use  to  get  to  various
  2722. networks.    Repeaters  and bridges are invisible to IP.  So as far as
  2723. previous sections are concerned, networks connected by them are to  be
  2724. considered a single network.  Section 3.4 describes how to configure a
  2725. host in the case  where  several  subnets  are  carried  on  a  single
  2726. physical  network.  The same configuration should be used when several
  2727. subnets are connected by repeaters or bridges.
  2728.  
  2729. As mentioned above, the most important dimensions  on  which  switches
  2730. vary are isolation, performance, routing, network management.
  2731.  
  2732.  
  2733.  
  2734. 6.3.1 Isolation
  2735.  
  2736.  
  2737. Generally  people  use switches to connect networks to each other.  So
  2738. they are normally thinking  of  gaining  connectivity,  not  providing
  2739. isolation.  However isolation is worth thinking about.  If you connect
  2740. two networks and  provide  no  isolation  at  all,  then  any  network
  2741. problems  on  other  networks suddenly appear on yours as well.  Also,
  2742. the two networks together may have enough traffic  to  overwhelm  your
  2743. network.  Thus it is well to think of choosing an appropriate level of
  2744. protection.
  2745.  
  2746. Isolation comes in  two  kinds:  isolation  against  malfunctions  and
  2747. traffic  isolation.  In order to discuss isolation of malfunctions, we
  2748. have to have a taxonomy of malfunctions.  Here are the  major  classes
  2749. of malfunctions, and which switches can isolate them:
  2750.  
  2751.    - Electrical  faults,  e.g.    a short in the cable or some sort of
  2752.      fault that distorts the signal.  All types of switch will confine
  2753.      this  to  one  side  of  the switch: repeater, buffered repeater,
  2754.      bridge, gateway.  These are worth  protecting  against,  although
  2755.      their frequency depends upon how often your cables are changed or
  2756.      disturbed.  It is rare for this sort of fault  to  occur  without
  2757.      some disturbance of the cable.
  2758.  
  2759.    - Transceiver and controller problems that general signals that are
  2760.      valid electrically but nevertheless incorrect (e.g. a continuous,
  2761.      infinitely  long  packet,  spurious  collisions,  never  dropping
  2762.                                   45
  2763.  
  2764.  
  2765.  
  2766.      carrier).  All except the  simple  repeater  will  confine  this:
  2767.      buffered  repeater, bridge, gateway.  (Such problems are not very
  2768.      common.)
  2769.  
  2770.    - Software malfunctions that  lead  to  excessive  traffic  between
  2771.      particular  hosts  (i.e.  not  broadcasts).  Bridges and gateways
  2772.      will isolate these.  (This type of failure is fairly rare.   Most
  2773.      software and protocol problems generate broadcasts.)
  2774.  
  2775.    - Software  malfunctions  that lead to excessive broadcast traffic.
  2776.      Gateways will isolate these.  Generally bridges will not, because
  2777.      they  must pass broadcasts.  Bridges with user-settable filtering
  2778.      can protect against some  broadcast  malfunctions.    However  in
  2779.      general  bridges  must  pass ARP, and most broadcast malfunctions
  2780.      involve ARP.    This  problem  is  not  severe  on  single-vendor
  2781.      networks  where software is under careful control.  However sites
  2782.      with  complex  network  environments  or   experimental   network
  2783.      software may see problems of this sort regularly.
  2784.  
  2785. Traffic isolation is provided by bridges and gateways.  The most basic
  2786. decision is how many computers can  be  put  onto  a  network  without
  2787. overloading  its capacity.  This requires knowledge of the capacity of
  2788. the network, but also how the hosts will use  it.    For  example,  an
  2789. Ethernet  may  support  hundreds of systems if all the network is used
  2790. for is remote logins and an occasional file transfer.  However if  the
  2791. computers  are diskless, and use the network for swapping, an Ethernet
  2792. will support between 10 and 40, depending upon their  speeds  and  I/O
  2793. rates.
  2794.  
  2795. When you have to put more computers onto a network than it can handle,
  2796. you split it into several networks and put some sort of switch between
  2797. them.    If  you  do  the split correctly, most of the traffic will be
  2798. between machines on the same piece.  This means putting clients on the
  2799. same  network  as  their servers, putting terminal servers on the same
  2800. network as the hosts that they access most commonly, etc.
  2801.  
  2802. Bridges and gateways generally  provide  similar  degrees  of  traffic
  2803. isolation.    In both cases, only traffic bound for hosts on the other
  2804. side of the switch is passed.  However see the discussion on routing.
  2805.  
  2806.  
  2807.  
  2808. 6.3.2 Performance
  2809.  
  2810.  
  2811. Absolute performance limits are becoming less of an issue as time goes
  2812. on,  since the switching technology is improving.  Generally repeaters
  2813. can handle the full bandwidth of the network.  (By their very  nature,
  2814. a  simple  repeater must be able to do so.) Bridges and gateways often
  2815. have performance limitations of  various  sorts.    Bridges  have  two
  2816. numbers  of  interest:  packet  scanning  rate  and  throughput.    As
  2817. explained above, a bridge must look at every packet  on  the  network,
  2818. even  ones that it does not forward.  The number of packets per second
  2819. that it can scan in this way is the packet scanning rate.   Throughput
  2820. applies  to both bridges and gateways.  This is the rate at which they
  2821.                                   46
  2822.  
  2823.  
  2824.  
  2825. can forward traffic.  Generally this depends upon datagram size.
  2826.  
  2827. Normally the number of datagrams per second that  a  unit  can  handle
  2828. will  be  greater for short datagrams than long ones.  Early models of
  2829. bridge varied from a few hundred datagrams per second to around  7000.
  2830. The higher speeds are for equipment that uses special-purpose hardware
  2831. to speed  up  the  process  of  scanning  packets.    First-generation
  2832. gateways  varied  from  a  few hundred datagrams per second to 1000 or
  2833. more.  However second-generation gateways  are  now  available,  using
  2834. special-purpose  hardware  of  the same sophistication as that used by
  2835. bridges.  They can handle on the order of 10000 datagrams per  second.
  2836. Thus  at  the  moment high-performance bridges and gateways can switch
  2837. most of the bandwidth of an Ethernet.   This  means  that  performance
  2838. should  no  longer  be  a  basis for choosing between types of switch.
  2839. However within a given type of switch, there are still specific models
  2840. with  higher or lower capacity.  And there may still be differences in
  2841. price/performance.  This is particularly true at the  low  end.    The
  2842. least  expensive bridges are currently less than half the price of the
  2843. least expensive gateway.
  2844.  
  2845. Unfortunately there  is  no  single  number  on  which  you  can  base
  2846. performance estimates.  The figure most commonly quoted is packets per
  2847. second.  Be aware that most vendors count a datagram only once  as  it
  2848. goes through a gateway, but that one prominent vendor counts datagrams
  2849. twice.  Thus their switching rates must be deflated by a factor of  2.
  2850. Also,  when comparing numbers make sure that they are for datagrams of
  2851. the same size.  A simple performance model is
  2852.  
  2853.     processing time = switching time + datagram size * time per byte
  2854.  
  2855. That is, the  time  to  switch  a  datagram  is  normally  a  constant
  2856. switching  time,  representing  interrupt  latency, header processing,
  2857. routing table lookup, etc., plus a component proportional to  datagram
  2858. size,  representing  the  time needed to do any datagram copying.  One
  2859. reasonable approach to reporting performance is to give datagrams  per
  2860. second  for  minimum and maximum size datagrams.  Another is to report
  2861. limiting switching speed in datagrams per  second  and  throughput  in
  2862. bytes per second, i.e.  the two terms of the equation above.
  2863.  
  2864.  
  2865.  
  2866. 6.3.3 Routing
  2867.  
  2868.  
  2869. Routing  refers  to  the  technology  used  to  decide where to send a
  2870. datagram next.  Of course for a repeater this is not an  issue,  since
  2871. repeaters forward every packet.
  2872.  
  2873. The  routing  strategy  for  a  bridge  turns  into two decisions: (1)
  2874. enabling and disabling links in order to maintain the  spanning  tree,
  2875. and  (2) deciding whether it should forward any particular packet, and
  2876. out what interface (if the bridge is capable of handling more than two
  2877. interfaces).    The  second  decision  is  usually based on a table of
  2878. MAC-level addresses.  As described above, this is built up by scanning
  2879. traffic  visible  from  each  interface.  The goal is to forward those
  2880.                                   47
  2881.  
  2882.  
  2883.  
  2884. packets whose destination is on the other side of the  bridge.    This
  2885. algorithm  requires  that  the  network configuration have no loops or
  2886. redundant lines.  Less sophisticated bridges  leave  this  up  to  the
  2887. system  designer.  With these bridges, you must set up your network so
  2888. that there are no loops in  it.    More  sophisticated  bridges  allow
  2889. arbitrary  topology,  but  disable  links until no loops remain.  This
  2890. provides extra reliability.  If a link fails, an alternative link will
  2891. be  turned  on  automatically.    Bridges  that  work  this way have a
  2892. protocol that allows them to detect when a unit must  be  disabled  or
  2893. reenabled,  so  that  at  any  instant the set of active links forms a
  2894. "spanning tree".  If you require the extra  reliability  of  redundant
  2895. links,  make  sure  that  the  bridges  you use can disable and enable
  2896. themselves in this way.  There is currently no official  standard  for
  2897. the  protocol  used among bridges, although there is a standard in the
  2898. proposal stage.  If you buy bridges from more than  one  vendor,  make
  2899. sure that their spanning-tree protocols will interoperate.
  2900.  
  2901. Gateways generally allow arbitrary network topologies, including loops
  2902. and  redundant  links.    Because  of  their  more   general   routing
  2903. algorithms,  gateways  must  maintain  a  model  of the entire network
  2904. topology.  Different routing techniques maintain models of greater  or
  2905. lesser   complexity,   and  use  the  data  with  varying  degrees  of
  2906. sophistication.  Gateways that handle IP should generally support  the
  2907. two  Internet  standard  routing  protocols:  RIP (Routing Information
  2908. Protocol)  and  EGP  (External  Gateway   Protocol).      EGP   is   a
  2909. special-purpose protocol for use in networks where there is a backbone
  2910. under a separate administration.  It allows exchange  of  reachability
  2911. information  with  the  backbone  in  a  controlled way.  If you are a
  2912. member of such a network, your gateway must  support  EGP.    This  is
  2913. becoming  common  enough  that it is probably a good idea to make sure
  2914. that all gateways support EGP.
  2915.  
  2916. RIP is a protocol designed to handle routing within small to  moderate
  2917. size networks, where line speeds do not differ radically.  Its primary
  2918. limitations are:
  2919.  
  2920.    - It cannot be used with networks where any path goes through  more
  2921.      than  15  gateways.  This range may be further reduced if you use
  2922.      an optional feature for giving a slow line a weight  larger  than
  2923.      one.
  2924.  
  2925.    - It  cannot  share  traffic  between parallel lines (although some
  2926.      implementations allow this if the lines are between the same pair
  2927.      of gateways).
  2928.  
  2929.    - It cannot adapt to changes in network load.
  2930.  
  2931.    - It  is  not well suited to situations where there are alternative
  2932.      routes through lines of very different speeds.
  2933.  
  2934.    - It may not be stable in networks where lines or gateways change a
  2935.      lot.
  2936.  
  2937. Some  vendors supply proprietary modifications to RIP that improve its
  2938. operation with EGP or increase the maximum path length beyond 15,  but
  2939.                                   48
  2940.  
  2941.  
  2942.  
  2943. do  not  otherwise modify it very much.  If you expect your network to
  2944. involve gateways from more  than  one  vendor,  you  should  generally
  2945. require  that  all of them support RIP, since this is the only routing
  2946. protocol that is generally available.  If you expect  to  use  a  more
  2947. sophisticated  protocol in addition, it may be useful for the gateways
  2948. to translate between their own protocol and RIP.    However  for  very
  2949. large  or  complex  networks,  there  may be no choice but to use some
  2950. other protocol throughout.
  2951.  
  2952. More sophisticated routing protocols are possible.  The  primary  ones
  2953. being considered today are cisco System's IGRP, and protocols based on
  2954. the SPF (shortest-path first) algorithms.  In general these  protocols
  2955. are designed for larger or more complex networks.  They are in general
  2956. stable under a wider  variety  of  conditions,  and  they  can  handle
  2957. arbitrary combinations of line type and speed.  Some of them allow you
  2958. to  split  traffic  among  parallel  paths,  to  get  better   overall
  2959. throughput.    Some newer technologies may allow the network to adjust
  2960. to take into account paths that are overloaded.  However at the moment
  2961. I  do  not  know of any commercial gateway that does this.  (There are
  2962. very serious problems with maintaining stable  routing  when  this  is
  2963. done.) There are enough variations among routing technology, and it is
  2964. changing rapidly enough, that you should discuss your proposed network
  2965. topology  in  detail with all of the vendors that you are considering.
  2966. Make sure that their technology can  handle  your  topology,  and  can
  2967. support  any  special  requirements  that you have for sharing traffic
  2968. among parallel lines, and for adjusting topology to take into  account
  2969. failures.    In  the  long  run,  we expect one or more of these newer
  2970. routing protocols to attain the status of a standard, at least on a de
  2971. facto basis.  However at the moment, there is no generally implemented
  2972. routing technology other than RIP.
  2973.  
  2974. One additional routing topic to consider is policy-based routing.   In
  2975. general routing protocols are designed to find the shortest or fastest
  2976. possible path for every datagram.  In some cases, this is not desired.
  2977. For  reasons  of  security, cost accountability, etc., you may wish to
  2978. limit certain paths to certain uses.   Most  gateways  now  have  some
  2979. ability to control the spread of routing information so as to give you
  2980. some administrative control over the way routes are used.    Different
  2981. gateways  vary  in the degree of control that they support.  Make sure
  2982. that you discuss any requirements that you have for control  with  all
  2983. prospective gateway vendors.
  2984.  
  2985.  
  2986.  
  2987. 6.3.4 Network management
  2988.  
  2989.  
  2990. Network  management  covers  a  wide variety of topics.  In general it
  2991. includes gathering statistical data and status information about parts
  2992. of  your network, and taking action as necessary to deal with failures
  2993. and  other  changes.    The  most  primitive  technique  for   network
  2994. monitoring  is  periodic  "pinging"  of  critical hosts.  Pinging is a
  2995. monitoring technique that depends on an "echo" datagram.   This  is  a
  2996. specific  type  of  datagram  that  requests an immediate reply.  Most
  2997. TCP/IP implementations contain a program (usually called "ping")  that
  2998.                                   49
  2999.  
  3000.  
  3001.  
  3002. sends  an echo to a specified host.  If you get a reply, you know that
  3003. the host is up, and that the network connection to the host works.  If
  3004. you  don't  get  a reply, you know that something is wrong with one of
  3005. the other.  By pinging a reasonable sample of hosts, you can  normally
  3006. tell  what  is  going on.  If all the hosts on a network suddenly stop
  3007. returning pings, it is reasonable to conclude that the  connection  to
  3008. that  network  has  gone  bad.  If one host stops returning pings, but
  3009. other hosts on the same network still do, then  it  is  reasonable  to
  3010. conclude that the host has crashed.
  3011.  
  3012. More  sophisticated  network  monitoring  requires  the ability to get
  3013. specific status and statistical information from  various  devices  on
  3014. the  network.   These should include various sorts of datagram counts,
  3015. as well as counts of errors of various kinds.  This data is likely  to
  3016. be  most detailed in a gateway, since the gateway classifies datagrams
  3017. using the protocols, and may even respond to certain types of datagram
  3018. itself.    However  bridges  and even buffered repeaters can certainly
  3019. have counts of datagrams forwarded, interface errors, etc.  It  should
  3020. be possible to collect this data from a central monitoring point.
  3021.  
  3022. There  is  now an official TCP/IP approach to network monitoring.  The
  3023. first stages use a related set of protocols, SGMP and SNMP.   Both  of
  3024. these  protocols  are designed to allow you to collect information and
  3025. to make changes in configuration parameters  for  gateways  and  other
  3026. entities  on  your  network.   You can run the corresponding interface
  3027. programs on any host in your network.    SGMP  is  now  available  for
  3028. several  commercial  gateways,  as  well  as for Unix systems that are
  3029. acting as gateways.  There is a limited set of information  which  any
  3030. SGMP  implementation  is  required  to  supply,  as  well as a uniform
  3031. mechanism for vendors to add information of their own.  By late  1988,
  3032. the  second  generation  of this protocol, SNMP, should be in service.
  3033. This is a slightly more sophisticated protocol.  It has with it a more
  3034. complete  set  of  information  that  can be monitored, called the MIB
  3035. (Management Information Base).  Unlike the somewhat ad hoc  collection
  3036. of  SGMP  variables,  the  MIB  is  the  result  of numerous committee
  3037. deliberations involving a number of vendors and users.  Eventually  it
  3038. is  expected  that  there will be a TCP/IP equivalent of CMIS, the ISO
  3039. network monitoring service.  However CMIS, and  its  protocols,  CMIP,
  3040. are  not  yet  official  ISO  standards,  so  they  are  still  in the
  3041. experimental stages.
  3042.  
  3043. In general terms all of these protocols  accomplish  the  same  thing:
  3044. They  allow  you to collect critical information in a uniform way from
  3045. all vendors' equipment.  You send commands as  UDP  datagrams  from  a
  3046. network  management  program  running  on  some  host in your network.
  3047. Generally the interaction is fairly simple,  with  a  single  pair  of
  3048. datagrams exchanged: a command and a response.  At the moment security
  3049. is fairly simple.  It  is  possible  to  require  what  amounts  to  a
  3050. password  in  the  command.   (In SGMP it is referred to as a "session
  3051. name", rather  than  a  password.)  More  elaborate,  encryption-based
  3052. security is being developed.
  3053.  
  3054. You  will  probably  want to configure the network management tools at
  3055. your disposal to do several different things.  For short-term  network
  3056. monitoring,  you will want to keep track of switches crashing or being
  3057.                                   50
  3058.  
  3059.  
  3060.  
  3061. taken down for maintenance, and of failure of communications lines and
  3062. other  hardware.  It is possible to configurate SGMP and SNMP to issue
  3063. "traps" (unsolicited messages) to a specified host or  list  of  hosts
  3064. when  some  of  these  critical events occur (e.g. lines up and down).
  3065. However it is unrealistic to expect a switch to  notify  you  when  it
  3066. crashes.    It  is  also  possible for trap messages to be lost due to
  3067. network failure or overload.  Thus  you  can't  depend  completely  on
  3068. traps.    You  should  also  poll  your  switches  regularly to gather
  3069. information.  Various displays are available, including a map of  your
  3070. network  where items change color as their status changes, and running
  3071. "strip charts" that  show  datagram  rates  and  other  items  through
  3072. selected switches.  This software is still in its early stages, so you
  3073. should expect to see a lot of change here.  However at the very  least
  3074. you  should  expect  to  be notified in some way of failures.  You may
  3075. also want to be able to take actions  to  reconfigure  the  system  in
  3076. response  to  failures,  although  security  issues make some managers
  3077. nervous about doing that through the existing management protocols.
  3078.  
  3079. The second type of monitoring you are likely  to  want  to  do  is  to
  3080. collect information for use in periodic reports on network utilization
  3081. and  performance.    For  this,  you  need  to  sample   each   switch
  3082. perodically,  and  retrieve numbers of interest.  At Rutgers we sample
  3083. hourly, and get the number of datagrams forwarded for IP and DECnet, a
  3084. count  of reloads, and various error counts.  These are reported daily
  3085. in some detail.  Monthly summaries are produced giving traffic through
  3086. each  gateway,  and a few key error rates chosen to indicate a gateway
  3087. that is being overloaded (datagrams dropped in input and output).
  3088.  
  3089. It should be possible to use monitoring techniques of this  kind  with
  3090. most  types  of switch.  At the moment, simple repeaters do not report
  3091. any statistics.  Since they do not generally have processors in  them,
  3092. doing  so  would  cause  a  major  increase in their cost.  However it
  3093. should be possible to put  network  management  software  in  buffered
  3094. repeaters,  bridges,  and  gateways.   Gateways are the most likely to
  3095. contain sophisticated  network  management  software.    Most  gateway
  3096. vendors  that  handle  IP  are  expected  to  implement the monitoring
  3097. protocols described above.  Many bridge vendors make  some  provisions
  3098. for   collecting   performance   data.      Since   bridges   are  not
  3099. protocol-specific, most of them do not have the software necessary  to
  3100. implement  TCP/IP-based  network management protocols.  In some cases,
  3101. monitoring can be done only by typing commands to a  directly-attached
  3102. console.    (We  have  seen one case where it is necessary to take the
  3103. bridge out of service to gather this data.)  In  other  cases,  it  is
  3104. possible  to  gather data via the network, but the monitoring protocol
  3105. is ad hoc or even proprietary.
  3106.  
  3107. Except for very small networks, you should probably  insist  that  any
  3108. switch  more  complex than a simple repeater should collect statistics
  3109. and provide some way of querying  them  remotely.    Portions  of  the
  3110. network  that  do  not  support  such  operations  can be monitored by
  3111. pinging.  However ping simply detects  gross  failures.  It  does  not
  3112. allow  you  to  look  at  the  noise  level of a serial line and other
  3113. quantities needed to do high-quality maintenance.  In  the  long  run,
  3114. you  can  expect  the  most  software  to  be  available  for standard
  3115. protocols such as SGMP/SNMP and CMIS.  However proprietary  monitoring
  3116.                                   51
  3117.  
  3118.  
  3119.  
  3120. tools may be sufficient as long as they work with all of the equipment
  3121. that you have.
  3122.  
  3123.  
  3124.  
  3125. 6.3.5 A final evaluation
  3126.  
  3127.  
  3128. Here is a summary of the places where each kind of  switch  technology
  3129. is normally used:
  3130.  
  3131.    - Repeaters are normally confined to a single building.  Since they
  3132.      provide no traffic isolation, you must make sure that the  entire
  3133.      set of networks connected by repeaters can carry the traffic from
  3134.      all of the computers on it.   Since  they  generally  provide  no
  3135.      network  monitoring tools, you will not want to use repeaters for
  3136.      a link that is likely to fail.
  3137.  
  3138.    - Bridges and gateways should be placed sufficiently frequently  to
  3139.      break  your  network  into pieces for which the traffic volume is
  3140.      manageable.  You may want to place bridges or  gateways  even  in
  3141.      places  where  traffic  level  alone  would  not require them for
  3142.      network monitoring reasons.
  3143.  
  3144.    - Because bridges must pass broadcast datagrams, there is  a  limit
  3145.      to the size network you can construct using them.  It is probably
  3146.      a good idea to limit  the  network  connected  by  bridges  to  a
  3147.      hundred systems or so.  This number can be increased somewhat for
  3148.      bridges with good facilities for filtering.
  3149.  
  3150.    - Because certain kinds of  network  misbehavior  will  be  passed,
  3151.      bridges should be used only among portions of the network where a
  3152.      single group is responsible for diagnosing problems.  You have to
  3153.      be  crazy  to  use  a  bridge between networks owned by different
  3154.      organizations.  Portions of your network  where  experiments  are
  3155.      being  done  in network technology should always be isolated from
  3156.      the rest of the network by gateways.
  3157.  
  3158.    - For many applications it is more important to  choose  a  product
  3159.      with  the  right  combination  of performance, network management
  3160.      tools, and other features  than  to  make  the  decision  between
  3161.      bridges and gateways.
  3162.  
  3163.  
  3164.  
  3165. 7. Configuring Gateways
  3166.  
  3167.  
  3168. This  section  deals  with  configuration  issues that are specific to
  3169. gateways.  Gateways that handle  IP  are  themselves  Internet  hosts.
  3170. Thus  the  discussions  above  on  configuring  addresses  and routing
  3171. information apply to gateways as well as to hosts.  The exact way  you
  3172. configure  a  gateway will depend upon the vendor.  In some cases, you
  3173. edit files stored on a disk  in  the  gateway  itself.    However  for
  3174. reliability reasons most gateways do not have disks of their own.  For
  3175.                                   52
  3176.  
  3177.  
  3178.  
  3179. them, configuration information is stored in non-volatile memory or in
  3180. configuration  files  that  are uploaded from one or more hosts on the
  3181. network.
  3182.  
  3183. At a minimum, configuration involves specifying  the  IP  address  and
  3184. address  mask  for each interface, and enabling an appropriate routing
  3185. protocol.  However generally a few other options are desirable.  There
  3186. are often parameters in addition to the IP address that you should set
  3187. for each interface.
  3188.  
  3189. One important parameter is the broadcast address.  As explained above,
  3190. older  software may react badly when broadcasts are sent using the new
  3191. standard broadcast address.  For this reason, some vendors  allow  you
  3192. to choose a broadcast address to be used on each interface.  It should
  3193. be set using your knowledge of what  computers  are  on  each  of  the
  3194. networks.    In  general  if the computers follow current standards, a
  3195. broadcast address of 255.255.255.255 should be used.    However  older
  3196. implementations  may  behave better with other addresses, particularly
  3197. the address that uses zeros for the host number.    (For  the  network
  3198. 128.6  this  would be 128.6.0.0.  For compatibility with software that
  3199. does not implement subnets, you would use 128.6.0.0 as  the  broadcast
  3200. address  even  for  a  subnet  such as 128.6.4.) You should watch your
  3201. network with  a  network  monitor  and  see  the  results  of  several
  3202. different  broadcast address choices.  If you make a bad choice, every
  3203. time the gateway sends a routing update broadcast,  many  machines  on
  3204. your  network  will respond with ARP's or ICMP errors.  Note that when
  3205. you change the broadcast address in  the  gateway,  you  may  need  to
  3206. change  it on the individual computers as well.  Generally the idea is
  3207. to change the address on the systems that you can  configure  to  give
  3208. behavior that is compatible with systems that you can't configure.
  3209.  
  3210. Other interface parameters may be necessary to deal with peculiarities
  3211. of the network it is connected to.  For example,  many  gateways  test
  3212. Ethernet  interfaces  to make sure that the cable is connected and the
  3213. transceiver is working correctly.  Some of these tests will  not  work
  3214. properly  with  the older Ethernet version 1 transceivers.  If you are
  3215. using such a transceiver, you would have  to  disable  this  keepalive
  3216. testing.    Similarly, gateways connected by a serial line normally do
  3217. regular testing to make sure that the line is still  working.    There
  3218. can be situations where this needs to be disabled.
  3219.  
  3220. Often  you  will have to enable features of the software that you want
  3221. to use.  For example, it is often necessary to  turn  on  the  network
  3222. management  protocol explicitly, and to give it the name or address of
  3223. a host that is running software to accept traps (error messages).
  3224.  
  3225. Most gateways have options that relate to security.    At  a  minimum,
  3226. this may include setting password for making changes remotely (and the
  3227. "session name" for SGMP).  If you need to control  access  to  certain
  3228. parts  of  your  network,  you will also need to define access control
  3229. lists or whatever other mechanism your gateway uses.
  3230.  
  3231. Gateways that load configuration information over the network  present
  3232. special  issues.    When  such  a  gateway  boots,  it sends broadcast
  3233. requests of various kinds, attempting to find its Internet address and
  3234.                                   53
  3235.  
  3236.  
  3237.  
  3238. then  to load configuration information.  Thus it is necessary to make
  3239. sure that there is some computer that is prepared to respond to  these
  3240. requests.    In  some cases, this is a dedicated micro running special
  3241. software.  In other cases, generic software is available that can  run
  3242. on a variety of machines.  You should consult your vendor to make sure
  3243. that this can be arranged.  For reliability reasons, you  should  make
  3244. sure  that  there  is  more  than  one  host  with the information and
  3245. programs that your gateways need.  In some  cases  you  will  have  to
  3246. maintain  several  different files.  For example, the gateways used at
  3247. Rutgers use a program called "bootp" to supply their Internet address,
  3248. and  they then load the code and configuration information using TFTP.
  3249. This means that we have to maintain a file  for  bootp  that  contains
  3250. Ethernet  and  Internet addresses for each gateway, and a set of files
  3251. containing other configuration information for each gateway.  If  your
  3252. network  is  large,  it is worth taking some trouble to make sure that
  3253. this information remains consistent.  We keep master copies of all  of
  3254. the  configuration information on a single computer, and distribute it
  3255. to other systems when it changes, using the Unix  utilities  make  and
  3256. rdist.    If  your  gateway  has  an  option  to  store  configuration
  3257. information in non-volatile memory, you will eliminate some  of  these
  3258. logistical  headaches.    However this presents its own problems.  The
  3259. contents of non-volatile memory should be backed up  in  some  central
  3260. location.   It will also be harder for network management personnel to
  3261. review configuration  information  if  it  is  distributed  among  the
  3262. gateways.
  3263.  
  3264. Starting   a   gateway   is   particularly  challenging  if  it  loads
  3265. configuration information from  a  distant  portion  of  the  network.
  3266. Gateways  that  expect  to  take  configuration  information  from the
  3267. network generally issue broadcast requests on all of the  networks  to
  3268. which  they  are  connected.    If there is a computer on one of those
  3269. networks that is prepared  to  respond  to  the  request,  things  are
  3270. straightforward.    However  some  gateways may be in remote locations
  3271. where there are no  nearby  computer  systems  that  can  support  the
  3272. necessary protocols.  In this case, it is necessary to arrange for the
  3273. requests to be routed back to the network where there are  appropriate
  3274. computers.  This requires what is strictly speaking a violation of the
  3275. basic design philosophy for gateways.  Generally a gateway should  not
  3276. allow  broadcasts  from  one  network  to  pass through to an adjacent
  3277. network.  In order to allow  a  gateway  to  get  information  from  a
  3278. computer  on  a  different  network,  at  least one of the gateways in
  3279. between will have to be configured to pass  the  particular  class  of
  3280. broadcasts  used  to retrieve this information.  If you have this sort
  3281. of configuration, you should test the loading process regularly.    It
  3282. is  not  unusual  to  find  that gateways do not come up after a power
  3283. failure because someone changed the configuration of  another  gateway
  3284. and made it impossible to load some necessary information.
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.                                   54
  3294.  
  3295.  
  3296.  
  3297. 7.1 Configuring routing for gateways
  3298.  
  3299.  
  3300. The final topic to be considered is configuring routing.  This is more
  3301. complex for a gateway than for a normal host.    Most  TCP/IP  experts
  3302. recommend that routing be left to the gateways.  Thus hosts may simply
  3303. have a default route that points to the nearest gateway.    Of  course
  3304. the  gateways  themselves  can't  get by with this.  They need to have
  3305. complete routing tables.
  3306.  
  3307. In order to understand how to configure a gateway, we have to look  in
  3308. a  bit more detail at how gateways communicate routes.  When you first
  3309. turn on a gateway, the only networks it knows about are the ones  that
  3310. are   directly   connected   to  it.    (They  are  specified  by  the
  3311. configuration information.)  In order to find out how to get  to  more
  3312. distant  parts  of  the  network,  it engages in some sort of "routing
  3313. protocol".  A routing protocol is simply a protocol that  allows  each
  3314. gateway  to advertise which networks it can get to, and to spread that
  3315. information from one gateway to the next.   Eventually  every  gateway
  3316. should  know  how to get to every network.  There are different styles
  3317. of routing protocol.  In one common type, gateways talk only to nearby
  3318. gateways.    In  another  type,  every  gateway  builds  up a database
  3319. describing every other gateway in the system.    However  all  of  the
  3320. protocols have some way for each gateway in the system to find out how
  3321. to get to every destination.
  3322.  
  3323. A metric is some number or set of numbers that can be used to  compare
  3324. routes.    The  routing  table is constructed by gathering information
  3325. from other gateways.  If two other gateways claim to be able to get to
  3326. the  same destination, there must be some way of deciding which one to
  3327. use.  The metric is used to make that decision.  Metrics all  indicate
  3328. in  some  general  sense the "cost" of a route.  This may be a cost in
  3329. dollars  of  sending  datagrams  over  that  route,   the   delay   in
  3330. milliseconds,  or  some  other measure.  The simplest metric is just a
  3331. count of the number of gateways along the path.  This is  referred  to
  3332. as  a  "hop  count".   Generally this metric information is set in the
  3333. gateway configuration files, or is derived from information  appearing
  3334. there.
  3335.  
  3336. At  a minimum, routing configuration is likely to consist of a command
  3337. to enable the routing protocol that you want to  use.    Most  vendors
  3338. will have a prefered routing protocol.  Unless you have some reason to
  3339. choose another, you should use that.  The normal reason  for  choosing
  3340. another  protocol  is  for  compatibility with other kinds of gateway.
  3341. For example, your network may be  connected  to  a  national  backbone
  3342. network  that  requires  you to use EGP (exterior gateway protocol) to
  3343. communicate routes with it.  EGP is only appropriate for that specific
  3344. case.    You  should  not use EGP within your own network, but you may
  3345. need to use it  in  addition  to  your  regular  routing  protocol  to
  3346. communicate  with a national network.  If your own network has several
  3347. different types of gateway, then  you  may  need  to  pick  a  routing
  3348. protocol  that  all of them support.  At the moment, this is likely to
  3349. be RIP (Routing Information Protocol).  Depending upon the  complexity
  3350. of  your  network,  you  could  use  RIP  throughout it, or use a more
  3351. sophisticated protocol among the gateways that support it, and use RIP
  3352.                                   55
  3353.  
  3354.  
  3355.  
  3356. only at the boundary between gateways from different vendors.
  3357.  
  3358. Assuming  that  you  have  chosen a routing protocol and turned it on,
  3359. there are some additional decisions that you may need to make.  One of
  3360. the  more  basic configuration options has to do with supplying metric
  3361. information.  As indicated above, metrics are numbers which  are  used
  3362. to decide which route is the best.  Unsophisticated routing protocols,
  3363. e.g. RIP, normally just count hops.  So a route that passes through  2
  3364. gateways  would  be  considered better than one that passes through 3.
  3365. Of course if the latter route used 1.5Mbps lines and the  former  9600
  3366. bps  lines,  this  would  be  the  wrong  decision.  Thus most routing
  3367. protocols allow you to set parameters to take this sort of thing  into
  3368. account.  With RIP, you would arrange to treat the 9600 bps line as if
  3369. it were several hops.  You would  increase  the  effective  hop  count
  3370. until  the  better route was chosen.  More sophisticated protocols may
  3371. take the bit rate of the line into account automatically.  However you
  3372. should  be on the lookout for configuration parameters that need to be
  3373. set.    Generally  these  parameters  will  be  associated  with   the
  3374. particular  interface.   For example, with RIP you would have to set a
  3375. metric value for the interface connected to the 9600 bps line.    With
  3376. protocols  that  are  based on bit rate, you might need to specify the
  3377. speed  of  each  line  (if  the   gateway   cannot   figure   it   out
  3378. automatically).
  3379.  
  3380. Most  routing  protocols  are  designed  to let each gateway learn the
  3381. topology of the entire network, and to choose the best possible  route
  3382. for  each  datagram.  In some cases you may not want to use the "best"
  3383. route.  You may want traffic to stay out of a certain portion  of  the
  3384. network  for  security  or  cost  reasons.   One way to institute such
  3385. controls is by specifying routing options.  These options  are  likely
  3386. to be different for different vendors.  But the basic strategy is that
  3387. if the rest of the network doesn't know about a  route,  it  won't  be
  3388. used.    So  controls normally take the form of limiting the spread of
  3389. information about routes whose use you want to control.
  3390.  
  3391. Note that there  are  ways  for  the  user  to  override  the  routing
  3392. decisions made by your gateways.  If you really need to control access
  3393. to a certain network, you will have to do two separate things:
  3394.  
  3395.    - Use routing controls to make sure that the gateways use only  the
  3396.      routes you want them to.
  3397.  
  3398.    - Use access control lists on the gateways that are adjacent to the
  3399.      sensitive networks.
  3400.  
  3401. These two mechanisms act at different levels.   The  routing  controls
  3402. affect  what  happens  to most datagrams: those where the user has not
  3403. specified routing manually.  Your routing mechanism must be set up  to
  3404. choose an acceptable route for them.  The access control list provides
  3405. an additional limitation which prevents users from supplying their own
  3406. routing and bypassing your controls.
  3407.  
  3408. For  reliability  and  security reasons, there may also be controls to
  3409. allow you to list the gateways from which you will accept information.
  3410. It  may  also  be possible to rank gateways by priority.  For example,
  3411.                                   56
  3412.  
  3413.  
  3414.  
  3415. you might decide to listen to routes from within your own organization
  3416. before   routes  from  other  organizations  or  other  parts  of  the
  3417. organization.  This would  have  the  effect  of  having  traffic  use
  3418. internal  routes  in preference to external ones, even if the external
  3419. ones appear to be better.
  3420.  
  3421. If you use several different routing protocols, you will probably have
  3422. some  decisions  to  make regarding how much information to pass among
  3423. them.  Since multiple routing  protocols  are  often  associated  with
  3424. multiple  organizations,  you  must be sure to make these decisions in
  3425. consultation  with  management  of  all  of  the  relevant   networks.
  3426. Decisions  that  you  make may have consequences for the other network
  3427. which are not immediately obvious.  You might think it would  be  best
  3428. to  configure  the gateway so that everything it knows is passed on by
  3429. all routing protocols.  However here are some reasons why you may  not
  3430. want to do so:
  3431.  
  3432.    - The  metrics  used  by  different  routing  protocols  may not be
  3433.      comparable.  If you  are  connected  to  two  different  external
  3434.      networks,  you  want to specify that one should always be used in
  3435.      preference to the other, or that the nearest one should be  used,
  3436.      rather  than  attempting  to  compare metric information received
  3437.      from the two networks to see which has the better route.
  3438.  
  3439.    - EGP is particularly sensitive, because the  EGP  protocol  cannot
  3440.      handle  loops.    Thus  there  are  strict  rules  governing what
  3441.      information may be communicated to a backbone that uses EGP.   In
  3442.      situations  where  EGP  is being used, management of the backbone
  3443.      network should help you configure your routing.
  3444.  
  3445.    - If you have slow lines in your network (9600 bps or slower),  you
  3446.      may  prefer  not  to send a complete routing table throughout the
  3447.      network.  If you are connected to an external  network,  you  may
  3448.      prefer  to treat it as a default route, rather than to inject all
  3449.      of its routing information into your routing protocol.
  3450.  
  3451.  
  3452.  
  3453.  
  3454.  
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.                                   57
  3471.  
  3472.