This document gives a brief overview of the Router device configured in the device tree of the Network Designer. The devices support SNMP and TFTP .
In this sample, the IP router with the following network configuration is simulated. As shown in the diagram, the Router has four interfaces. One local loop back interface and three network interfaces. According to this sample, the network interface with IP address 192.168.1.133 belongs to the users network where the simulated agent is running. The router agent implements the RFC 1213 MIB.

The configuration of the IP Router is given in the table below :
| IP of the Interface | Interface If Index Value | Interface Type | Network Connected |
|---|---|---|---|
|
192.168.60.133 |
1 |
Network Interface |
Connects the network 192.168.60.0 (netmask 255.255.255.0) |
|
192.168.65.133 |
2 |
Network Interface |
Connects the network 192.168.65.0 (netmask 255.255.255.0) |
|
192.168.1.133 |
3 |
Network Interface |
Connects the network 192.168.1.0 (netmask 255.255.255.0) |
|
127.0.0.1 |
4 |
Local LoopBack Interface |
|
To view the MIB values configured, select SNMP Agent Values option from the right-click menu of the device in the device tree.
The real time behavior of the sample router is defined by configuring Jython scripts and traps. The following table explains the router behavior and how it is achieved using scripts. the router configuration and script files are available in <Simulator_Home>/examples/IpRouter directory.
To learn about the steps involved in defining your own scripts, refer to the topic Configuring Network Behavior.
| Behavior of the Sample Router | How this Behavior is Achieved Using Jython Scripts |
|---|---|
|
Script Files configured
The following conditions and actions are defined in the script :
Condition to execute the script
The script will be executed when an SNMP Get Request is made under icmp group of the RFC 1213 MIB
Actions to be performed when the script is executed
The actions specified in Column 1 are configured to be performed when the above condition is satisfied.
|
|
Script Files configured
The following conditions and actions are defined in the script :
Condition to execute the script
The script will be executed when an SNMP GET-NEXT request is made under egp group of the RFC 1213 MIB
Actions to be performed when the script is executed
The actions specified in Column 1 are configured to be performed when the above condition is satisfied. |
|
Script Files configured
The following conditions and actions are defined in the script :
Condition to execute the script
The script will be executed when an SNMP SET request is made under ipRoutTable of the RFC 1213 MIB.
Actions to be performed when the script is executed
The actions specified in Column 1 are configured to be performed when the above condition is satisfied. |
|
For a router device whose ipForwarding is set to forwarding (1),
|
Script Files configured
The following conditions and actions are defined in the script :
Condition to execute the script
The script will be executed when an SNMP SET request is made on ipForwarding of the RFC 1213 MIB.
Actions to be performed when the script is executed
The actions specified in Column 1 are configured to be performed when the above condition is satisfied. |
|
When a SNMP Set Request is made on ifAdminStatus of an interface in the router network with value down(2),
|
Script File configured
The following conditions and actions are defined in the script :
Condition to execute the script
The script will be executed, when a SNMP Set Request is made on ifAdminStatus of the RFC 1213 MIB with the required instance.
Actions to be performed when the script is executed
The actions specified in Column 1 are configured to be performed when the above condition is satisfied. |
|
When a SNMP Set Request is made on ifAdminStatus of an interface in the router network with value up(1),
|
Script File configured
The following conditions and actions are defined in the script :
Condition to execute the script
The script will be executed, when a SNMP Set Request is made on ifAdminStatus of the RFC 1213 MIB.
Actions to be performed when the script is executed
The actions specified in Column 1 are configured to be performed when the above condition is satisfied. |
|
If a Get is made on the System group, for any of the nodes in the router network,
|
Script File configured
The following conditions and actions are defined in the script :
Condition to execute the script
The script will be executed, when a GET Request is made on the System group of the RFC 1213 MIB .
Actions to be performed when the script is executed
The actions specified in Column 1 are configured to be performed when the above condition is satisfied. |
To view the scripts configured, select SNMP Behavior option from the right-click menu of the device in the device tree. To create a network with the Router device, refer to section, Creating and Configuring a Network.
Start the Network Designer from <SimulatorHome>/bin directory.
You will find the Router device added in the device tree. This device supports SNMP and TFTP.
Create a network using the router device.
Start the device by selecting the right-click option "Start Device". The device will be started at default SNMP port 8001 and TFTP port 69.
To view the MIB values configured, you can select the SNMP -> Agent Values option and query the agent from the MIB Browser.