Infonet version of JavaSim

Javasim is a scalable event-driven simulator developed by Hung-Ying Tyan and many others at Ohio-State University. Javasim is written in Java for portability reasons and contains realistic models of various Internet protocols. Two stable versions are available: the javasim 1.0 release and 1.2 release. Because we need to trace the route followed by a packet between two nodes, we have modified JavaSim official release to include this feature. Other modifications have been done to support the BGP protocol or MPLS mechanism. So if you plan to use our extensions, you need our modified version of JavaSim Currently, we work with the JavaSim 1.0 release. That means that all our extentions are compatible with this version. We plan to integrate it inside the latest version of JavaSim in the future.

Download

Source only version Source and compiled version (NOT SUPPORTED)

for all versions

Description of the TraceRoute mechanism

1. Introduction

The TraceRoute mechanism allows to record a route from a node (the source) to another (the destination). To support it, we deployed code at two levels: inside the kernel of the simulator and at the application level. First, inside the core of the simulator: we have modified the packet dispatcher component to support this mechanism. Second, A new component called 'LogClient' (application layer) allows to send traceroute packets to a destination. This compoments also allows a node that receive a traceroute packet to dump this information into a file (useful for further analysis).

2. Details of TraceRoute

This is already the second version of this mechanim. Between these two versions, the API has slightly changed. For compatibility, the first version of the API is also supported but we recommend to use the latest version. The following API is supported in both versions of Javasim.

2.1 Old API (deprecated)

Inside this model, we only provide the possibility for a node to send a TraceRoute packet to a destination. The destination has only the possibility to dump this information into a file. This information can be analyzed when the simulation is terminated. This kind of mechanism allows you to know how routes are distributed in our topology when you use a dynamic routing protocol like BGP.

public LogClient()
This constructor allows you to build a LogClient component. This component is required to send TraceRoute packets and also to dump received traceroute packet into a file. This component is located at the application layer (above the Core Service Layer) and must be connected to the CSL. If you use this constructor, you need to fix some parameters by using the set() function.

public LogClient(Node n, String fileName)
This constructor creates the LogClient component. The parameters provided are required: n is the reference of the node that will be associated with the LogClient instance. The fileName is the name of the file used to dump the information where a trace route packet arrived at destination.

public void set(Node n, String fileName)
This function must be used when you are using the default constructor. It allows to associate the LogClient instance with the considered node. The name of the file given as second parameter is used to know where the trace route information have to be dumped when a trace route packet is received.

public void sendTraceRT(long dest)
This function send a trace route packet towards the specified destination. The dest parameter should be an existing IP router address. This packet will be routed like a common IP packet.

2.2 New API (recommended)

This model has the following features: So it extends our first model. The following API is available:
public LogClient()
This constructor is the same as previous. Don't forget to use functions set() and setLogTypeFile() or setLogTypeCallBack().

public void setLogTypeFile(String fileName)
This function determines the behaviour of the LogClient component when a traceroute packet arrived at destination. This function configures the component to log all information inside the given file.

public void setLogTypeCallBack(LogClientCallBack callback)
This method configures the LogClient component to call a "given function" when a traceroute packet arrives at the destination node. The parameter must be a class instance that implements the LogClientCallBack interface. This interface require to implement the following function: public void callback(TraceRTPkt packet). The TraceRTPkt class defines a specific InetPacket (see below for more information about TraceRTPkt).

public void set(Node n)
This method is used to associate the LogClient component and a node.
public LogClient(Node n, String fileName)
This constructor creates the LogClient component and associates it with the given node. Because a file name is provided, this component will dump trace information inside a file when the trace route packet is received.

public LogClient(Node n, LogClientCallBack callback)
This constructor creates also the LogClient component. This constructor can be used when a function must be called at the receipt of a traceroute packet. For more information about the LogClientCallBack, see the setLogTypeCallBack function.

public void sendTraceRTResponse (long dest)
This method is used to trace the route to the destination dest. According to the destination node configuration, it will dump or call a function.

public void sendTraceRTRequest(long src, long dest)
This method allows the source node src to ask to the destination node dest to send a trace route packet. So the traceroute packet will be send from the destination to the source.

2.3 The TraceRTPkt class

This class defines a new type of InetPacket. The InetPacket class in JavaSim define standard IP packet. Our TraceRTPkt carries specific information like the list of nodes from source to the destination. This section describes the API of TraceRTPkt. A traceroute packet has a type (REQUEST or RESPONSE) and a list of IP addresses.
public TraceRTPkt()
This constructor creates a TraceRTPkt. The default type of this packet is RESPONSE for backward compatibility.

public TraceRTPkt(int type)
This constructor allows to create TraceRTPkt with a specified type: REQUEST or RESPONSE. To mention the type, please use the following syntax: TraceRTPkt.RT_REQUEST or TraceRTPkt.RT_RESPONSE.

public Object[] getList()
This method allows to retreive the content of the trace route packet. The returned object array contains IP addresses (encoded into Long object) of traversed nodes.

public int getType()
This method returns the type of the packet. To identify the type, use the following constants: TraceRTPkt.RT_REQUEST and TraceRTPkt.RT_RESPONSE

Contacts

This patched version of JavaSim is developed by the Infonet Group. If you want to contact the authors, you can write to this address.