DVMRP Tool: dnbr

# DVMRP tool: dnbr (DVMRP Neighbor)

## Overview:

Dnbr aims at testing DVMRP functionality. Dnbr can exchange DVMRP packets as a DVMRP router, and emulate situation that test target communicate with multiple DVMRP router. Also, dnbr can generate virtual (DVMRP) network and advertise the route information.
Behavior of dnbr can be controlled by using command decribed below. It is possible to specify command interactively or from a configuration file that describing a stream of commands(like a script).

## Running:

To run dnbr, you must be a 'root'. Starting dnbr is as follows:

  dnbr [-f <config_file>]

  -f <config_file> : Specifies configuration file. By default, dnbr run in interaction mode.

## Command:

### route-list

Specifies routing information to be advertised by Report Message.

  route-list <list_id> addr <prefix1> <metric>
  route-list <list_id> generate <prefix> <metric> <net_num>
  route-list <list_id> file <file_name>

  <list_id> : list ID
  addr <prefix> < metric> : prefix is written in "network/mask" format.
  generate <prefix> <metric> <net_num> : Routing information is automatically generated. Generated prefix ranges from <prefix> to the <net_num>th prefix, and all of these prefix shares the same metric.
  file <file_name> : routing information is read from the file <file_name>. It should be arranged in the below format.

      	<prefix1> <metric>
      	<prefix2> <metric>
                    :

  If some list ID is already specified beforehand, the contents is appended to the existing list irrespective of the format style. For example, if there're three lists as

        route-list 1 addr 192.168.10.0/24 1
        route-list 1 generate 192.168.100.0/24 2 3

  then it's equivalent to

        route-list 1 addr 192.168.10.0/24 1
        route-list 1 addr 192.168.100.0/24 2
        route-list 1 addr 192.168.101.0/24 2
        route-list 1 addr 192.168.102.0/24 2

### router-list

Configure DVMRP Router.

  router-list <list_id> addr <addr> [cap <flag>] [ver <major> <minor>]
  router-list <list_id> adv-route <route-list>
  router-list <list_id> tracefile <file>

  <list_id> : Specifies list ID.
  addr <addr> : Specifies DVMRP Router's Address.You must set specified IP address(<addr>) to machien on running dnbr.
  cap <flag> : Specifies capability flag(Hex without '0x'). Default is (0x)0e(Prune,Genid,Mtrace).
  ver <major> <minor> : Specifies DVMRP version. Default is 3.255.
  adv-route <route_list> : Specifies routing information to be advertised by Report Messsage.
  tracefile <file> : Specifies the output file for trace information of the exchanged packets.

### config-file

Specifies a configuration file. You can write part of the configuration in a different file and include it by this command.

  config-file <file>

### probe

Sending/receiving Probe message.

  probe send <interface> [src <addr>] [dst <addr>][ cap <capability> ] [ ver <major> <minor>] [ nbr <neighbor> ]
  probe recv <interface> timeout <time>

  <interface> : Specifies interface name to send/receive Probe.
  src <addr>: Specifies source address of DVMRP packet. By default, outgoing interface's address.
  dst <addr>: Specifies destination address of DVMRP packet. By default, 224.0.0.4.
  cap <capability> : Specifies capability flag(Hex without '0x').Default is (0x)0e.
  ver <major> <minor> : Specifies DVMRP version. Default is 3.255.
  nbr <neighbor> : Specifies DVMRP neighbors(IP address).
  timeout <time>: Specifies waiting time until receive Probe.

### report

Sending/receiving Report message.

  report send <interface> [src <addr>] [dst <addr>] list <route-list>
  report recv <interface> timeout <time>

  <interface> : Specifies interface name to send/receive Report.
  src <addr>: Specifies source address of DVMRP packet. By default, outgoing interface's address.
  dst <addr>: Specifies destination address of DVMRP packet. By default, 224.0.0.4.
  list <route-list> : Specifies advertising route.
  timeout <time>: Specifies waiting time until receive Report.

### prune

Sending/receiving Prune message.

  prune send <interface> [src <addr>] dst <addr> entry <src_addr> <grp_addr> [<lifetime>]
  prune recv <interface> timeout <time>

  <interface> : Specifies interface name to send/receive Prune.
  src <addr>: Specifies source address of DVMRP packet. By default, outgoing interface's address.
  dst <addr>: Specifies destination address of DVMRP packet.
  entry <src_addr> <grp_addr> <lifetime>: Specifies (S,G) entry and the entry's lifetime.
  timeout <time>: Specifies waiting time until receive Prune.

### graft/gack

Sending/receiving Graft, Graft Ack message.

  graft|gack send <interface> [src <addr>] dst <addr> entry <src_addr> <grp_addr>
  graft|gack recv <interface> timeout <time>

  <interface> : Specifies interface name to send/receive Graft/Graft Ack.
  src <addr>: Specifies source address of DVMRP packet. By default, outgoing interface's address.
  dst <dst_addr> : Specifies destination IP address of DVMRP packet.
  entry <src_addr> <grp_addr>: Specifies (S,G) entry.
  timeout <time>: Specifies waiting time until receive Graft/Graft Ack.

### router

Starts / Stops DVMRP Router.

  router up | down <router-list>

  up | down: Specifies router bring up/down.
  <router-list>: Specifies the router-list ID.

### route

Updation of this routing information (add/delete/change) is specified. This command is applied for the <route-list>, so multicast routers which has announced this route list will have to send Report packet based on the difference of metric value.

  route add | delete | change <route-list> addr <prefix> <metric>

  <route-list> : Specifies a route list to be revised.
  addr <prefix> <metric> : Specifies the prefix to be revised.

### dump

Dump specified router's information.

  dump <router-list> <file-name>

### debug/nodebug

Control output trace information to terminal.

  debug [detail] [tty <tty_name>]
  nodebug

  debug : Enable output trace information(src/dest address and type of sending or receiving DVMRP packet).
  nodebug: Disable output trace information.
  detail : If specifies, output content of each packet.
  tty <tty_name>: Specifies output terminal. Default is current terminal.

### wait

Specifies wait time(sec) until execute next command.

  wait <time>

### quit

Stop the evaluation of this script.

  quit

## Examples:

     - Example 1

          |  +----+  |                        |  +----+  |
          +--+ R2 +--+           /~\          +--+ R2 +--+
          |  +----+  |  +----+  |   |         |  +----+  |  +----+
                     +--+ R1 +--+ A |                    +--+dnbr+ UNIX host
                     |  +----+  |   |                    |  +----+
                                 \_/

             <Test Topology>                 <Test System>

     #
     # Network Information within NetA
     #
     route-list 10 addr 192.168.1/24 2
     route-list 10 addr 192.168.2/24 2
     route-list 10 addr 192.168.3/24 2
     #
     # Definition of DVMRP Router(as R1)
     #
     router-list 1 addr 192.168.3.1
     router-list 1 adv-route 10
     #
     # Start of Test
     #
     router up 1
     wait 60
     #
     # route 192.168.2.0/24 becomes unreachable after 60 seconds.
     #
     route delete 10 addr 192.168.2/24 2
     wait 60
     #
     # route 192.168.2.0/24 revives after 60 seconds.
     #
     route add 10 addr 192.168.2/24 2
     wait 60
     quit

     - Example 2
                                                        UNIX
                                                        host
                                                    |  +----+  |
          |  +----+  |          |  +----+  |        +--+dbnr+--+
        B +--+ R2 +--+          +--+ R3 +--+ A      |  +----+  |
          |  +----+  |  +----+  |  +----+  |        |          |
                     +--+ R1 +--+                   |  +----+  |
                     |  +----+  |                   +--+ R1 +--+
                                                    |  +----+  |

                <Test Topology>                  <Test System>

     #
     # Network A's Information
     #
     route-list 10 addr 192.168.5/24 2
     #
     # Network B's Information
     #
     route-list 20 addr 192.168.15/24 3
     #
     # DVMRP Router 1's Definition(as R3)
     #
     router-list 1 addr 192.168.3.1
     router-list 1 adv-route 10
     #
     # DVMRP Router 2's Definition(as R2)
     #
     router-list 2 addr 192.168.11.1
     router-list 2 adv-route 20
     #
     # Start of Test
     #
     router up 1
     wait 60
     router up 2
     wait 30
     # 192.168.2.0 becomes unreachable
     route delete 10 addr 192.168.2/24 2
     wait 60
     # Router2 goes down
     router down 2
     wait 40
     # 192.168.2.0 is rebirthed
     route add 10 addr 192.168.2/24 2
     wait 20
     # Router2 goes up again
     router up 2
     wait 60
     quit