

            Routing Protocol Simulator(RPS) V1.20

                           Manual



1    Usage


1.1   environment


         Router                   input  
           or                WS    <-  simulation configuration file
          GateD             (RPS)      command sequence file
           |                  |        network configuration file
      _____|__________________|____

	OS	: SunOS 4.1.x, FreeBSD, BSD/OS
	protocol: OSPF

1.2   usage

     % rps command-sequence-file


2    command sequence file (*.cmd)


Specifies behavior of RPS. Following command is available.


(1) start
start is used to initialize RPS. Specifies simulation configuration file
and network configuration file.

     start(conf_file,network_file)

     conf_file:simulation configuration file(See section 3)

     network_file:network configuration file(See section 4)

(2) routerUP,routerDOWN
routerUP is used to generate routing table(LSDB) and announce the LSDB
to target router or Gated until OSPF neighbor state become Full.
routerDOWN is used to stop sending (OSPF) packets.

     routerUP (router_id)
     routerDOWN (router_id)


     router_id:simulated router's routerID. This routerID must be specified
               in simulation configuration file.

(3) interfaceUP,interfaceDOWN
interfaceUP is used to generate routing table (LSDB) on particular interface
and enable to send packets. Note that don't send (OSPF) packet until receive
OSPF Hello packet from target router or Gated.
interfaceDOWN is used to stop sending OSPF packet.

     interfaceUP(router_id,if_addr)
     interfaceDOWN (router_id,if_addr)

     router_id: simulated router's routerID. This routerID must be specified
                in simulation configuration file.

     if_addr: Specifies interface's IP address which actually send/receive
              packets. This interface must be specified in simulation
              configuration file.


(4) traceON,traceOFF
traceON / traceOFF is used to control tracing.

     traceON(router_id,trace_file)
     traceOFF (router_id)

     router_id:Specifies routerID which want to trace.

     trace_file:Specifies output trace file. If the file exit, append it.

(5) wait
wait is used to continue protocol process for paticular time.

     wait(router_id,time)

     router_id:Specifies routerID which run protocol process.

     time:Specifies time in second.


(6) routerDUMP
routerDUMP is used to output configuration and routing information of RPS.

     routerDUMP(router_id,dump_file)


     router_id:Specifies routerID which want to output routing table.

     dump_file:Specifies output dump file. If the file exit, append it.


(7) hopUP,hopDOWN
hopUP / hopDOWN is used to update in network configuration file.

     hopUP (router_id)
     hopDOWN (router_id)

     router_id:Specifies routerID.


(8) end
end is used to terminate RPS.

     end

(9) networkUP, networkDOWN
networkUP / networkDOWN is used to announce that specified network
is reachable/unrechable.

     networkUP(network_addr)
     networkDOWN(network_addr)

     network_addr:Specifies network address you want to announce that
                  network is reachable/unrechable. This network_addr
                  must be specified in network configuration file.

(10) areaUP, areaDOWN
areaUP / areaDOWN is used to announce that all networks within specified
OSPF area are reachable/unreachable. 

     areaUP(area_num)
     areaDOWN(area_num)

     area_num:Specifies area number you want to announce that all networks
              are reachable/unrechable. This area_num must be specified in
              network configuration file.

(11) asUP, asDOWN
asUP / asDOWN is used to announce that all networks within specified AS are 
reachable/unreachable.

     asUP(as_num)
     asDOWN(as_num)

     as_num:Specifies AS number you want to announce that all networks
            are reachable/unrechable. This as_num must be specified in
            network configuration file.



3    network configuration file (*.net)


Specifies whole network topology.



 as < as_num > {
     [area < area_num > {
          network < network_addr > mask < network_mask > {
              router < router_id > [interface < if_addr >][ cost < cost>] ;
               ...
          }
            ...
      } ]
      network < network_addr > mask < network_mask > {
           router < router_id > [interface < if_addr >][ cost < cost >] ;
             ...
      }
 }



1.as < as_num >
   Specifies AS number.


2.area < area_num >
   Specifies OSPF area ID within each AS.


3.network < network_addr > mask < network_mask >
   Specifies network address and network mask within each domain(AS,area).


4.router < router_id > [ interface < if_addr > ][cost < cost > ]
   Specifies routerID, interface IP address and cost which connect to each net-
work.




4    simulation configuration file (*.conf )


Specifies parameter to communicate between WS running RPS and router or
Gated.


    router < router_id > {
         protocol ospf {
             interface < local_addr > neighbor < remote_addr >[ {
                 [ hellointerval < time > ; ]
                 [ routerdeadinterval < time > ; ]
                 [ priority < priority > ; ]
             } ] ;
             ...
         }
    }



1.router < router_id >
 Specifies simulated router's routerID. The routerID must be used which
specifies by network configuration file.


2.interface < local_addr > neighbor < remote_addr >
   Specifies interface IP address and neighbor IP address which actually
send/receive packet.


3.hellointerval < time >,routerdeadinterval < time >
   Specifies time in second. Default hellointerval is 10s, default
routerdeadinterval is 40s.


4.priority < priority >
   Specifies priority about each interface. Default priority is 0.




5    Example


5.1   Case1: Announcing OSPF route

Fig5.2 shows example of network configuration file for network topology shown
in Fig5.1.

                       <--         area 0.0.0.0         -->
                       ------------------------------------
                        |         158.217.1.0            |
                        |                                |
                --------R1-------                        R2
  158.214.1.0  |                 | 158.215.1.0           |  158.216.1.0
       ________|________    _____|_______          ______|_________
         |          |                |                        |
         R3         R4               R5                       R6
      ___|_____   __|_____         __|_______               __|______
     158.214.2.0  158.214.3.0     158.215.2.0              158.216.2.0

    <--    area 158.214   -->  <- area 158.215 ->     <- area 158.216 ->

		R1: ID=0.0.0.1, R2: ID=0.0.0.2, R3: ID=0.0.0.3
		R4: ID=0.0.0.4, R5: ID=0.0.0.5, R6: ID=0.0.0.6

			Fig5.1 network topology example


	as 1 {
	     area 0.0.0.0 {
                  network 158.217.1.0 mask 255.255.255.0 {
                      router 0.0.0.1 interface 158.217.1.2 ;
                      router 0.0.0.2 interface 158.217.1.1 ;
                  }
             }
             area 158.214.0.0 {
                  network 158.214.1.0 mask 255.255.255.0 {
                      router 0.0.0.1 ;
                      router 0.0.0.3 ;
                      router 0.0.0.4 ;
                  }
                  network 158.214.2.0 mask 255.255.255.0 {
                      router 0.0.0.3 ;
                  }
                  network 158.214.3.0 mask 255.255.255.0 {
                      router 0.0.0.4 ;
                  }
             }
             area 158.215.0.0 {
                  network 158.215.1.0 mask 255.255.255.0 {
                      router 0.0.0.1 ;
                      router 0.0.0.5 ;
                  }
                  network 158.215.2.0 mask 255.255.255.0 {
                      router 0.0.0.5 ;
                  }
             area 158.216.0.0 {
                  network 158.216.1.0 mask 255.255.255.0 {
                      router 0.0.0.2 interface 158.216.1.1 ;
                      router 0.0.0.6 interface 158.216.1.2 ;
                  }
                  network 158.216.2.0 mask 255.255.255.0 {
                      router 0.0.0.6 ;
                  }
             }
	}

		Fig5.2 example of network configuration file
				(case1.net)

   Fig5.3 shows test network system , Fig5.4 shows example of simulation
configuration file , when target router is R2(ID=0.0.0.2), simulated router is
R1(ID=0.0.0.1) and R6(ID=0.0.0.6) in Fig5.1. Fig5.5 shows example of com-
mand sequence file for above example.


                             158.217.1.0/24
                  -------------------------------------------
                      |.1    <- OSPF route from R1     | .2
                      |                                |
                   Router                              WS
                 (ID=0.0.0.2)                         (RPS)
                      |                                |
                      |.1    <- OSPF route from R6     | .2
                  ____|________________________________|_____
                             158.216.1.0/24

			Fig5.3 test network system



	router 0.0.0.1 {
	    protocol ospf {
                interface 158.217.1.2 neighbor 158.217.1.1;
            }
        }
        router 0.0.0.6 {
            protocol ospf {
                interface 158.216.1.2 neighbor 158.217.1.1;
            }
        }

		Fig5.4 example of simulation configuration file
                		 (case1.conf)


	start(case1.net, case1.conf)
	routerUP(0.0.0.1)  # Announce OSPF route from R1
	wait(0.0.0.1,30)
	routerUP(0.0.0.6)  # Announce OSPF route from R6
	wait(0.0.0.6,30)
	end

		Fig5.5 example of command sequence file
			(case1.cmd)



5.2   Case2:Announcing OSPF ASE route

Fig5.7 shows example of network configuration file for network topology shown
in Fig5.6.


                   R2 ----------------------------- R6
    158.217.1.0    |          158.220.12.0          |    158.215.1.0
        ___________|____                      ______|______
             |                                         |
             |                                         |
             R1                                        R7
             | 158.214.1.0                             | 158.216.1.0
        _____|__________                      _________|___
                  |
                  R3
    158.214.3.0   |
        __________|_____
         |            |
         R4           R5
      ____|____   ____|_____
    158.214.3.0   158.214.4.0  


    <----      AS 1     ----->                 <----    AS 2   ----> 


		R1: ID=0.0.0.1, R2: ID=0.0.0.2, R3: ID=0.0.0.3
		R4: ID=0.0.0.4, R5: ID=0.0.0.5, R6: ID=0.0.0.6
		R7: ID=0.0.0.7

			Fig5.6 network topology example(2)


	as 1 {
	     area 0.0.0.0 {
                  network 158.217.1.0 mask 255.255.255.0 {
                       router 0.0.0.1 interface 158.217.1.2;
                       router 0.0.0.2 interface 158.217.1.1;
                  }
		  network 158.214.1.0 mask 255.255.255.0 {
                       router 0.0.0.1 interface 158.214.1.1;
                       router 0.0.0.3 interface 158.214.1.2;
                  }
                  network 158.214.2.0 mask 255.255.255.0 {
                       router 0.0.0.3 ;
                       router 0.0.0.4 ;
                       router 0.0.0.5 ;
                  }
             }
             network 158.220.12.0 mask 255.255.255.0 {
                  router 0.0.0.2 ;                #    \
             }                                    #  inter-AS
	}                                         #    network
        as 2 {                                    #    /
             network 158.220.12.0 mask 255.255.255.0 {
                  router 0.0.0.6 ;
             }
             area 0.0.0.0 {
                  network 158.215.1.0 mask 255.255.255.0 {
                       router 0.0.0.5 ;
                       router 0.0.0.6 ;
                  }
                  network 158.215.2.0 mask 255.255.255.0 {
                       router 0.0.0.6 ;
                  }
	     }
	}

		Fig5.7 example of network configuration file(2)
				(case2.net)

   Fig5.8 shows test network system , Fig5.9 shows example of simulation
configuration file , when target router is R1(ID=0.0.0.1), simulated router is
R2(ID=0.0.0.2) in Fig5.5.  Fig5.10 shows example of command sequence file
about above example.


                   Router                               WS
                 (ID=0.0.0.2)                          (RPS)
                      |                                  |
                      |.1  <- OSPF ASE route from R2     | .2
               _______|__________________________________|____
                             158.217.1.0/24

			Fig5.8 test network system (2)



	router 0.0.0.2 {
             protocol ospf {
                   interface 158.217.1.2 neighbor 158.217.1.1 ;
             }
     	}

   	   Fig5.9 example of simulation configuration file(2)
		   	       (case2.net)



	start(case2.net, case2.conf)
	routerUP(0.0.0.2)  # Announce OSPF ASE route from AS2
	wait(0.0.0.2,30)
	hopDOWN(0.0.0.6)   # AS2's network is down
        wait(0.0.0.2,30)
        hopUP(0.0.0.6)     # AS2's network is up
        wait(0.0.0.2,30)
 	end







