Table Of Contents
Table Of Contents

Visualizing Transport Connections

Goals

In a complex network with many applications and large number of nodes communicating, it can be challenging to keep track of all the active transport layer connections. Transport connection visualization makes it easier to identify the two endpoints of each connection by displaying a marker above the nodes. The markers appear in different colors to allow differentiating between connections.

In this showcase, we will present two example simulations that demonstrate the visualization of TCP connections.

INET version: 3.6

About the visualizer

The TransportConnectionVisualizer module (also part of IntegratedVisualizer) displays color-coded icons above the two endpoints of an active, established transport layer level connection. The icons will appear when the connection is established and disappear when it is closed. Naturally, there can be multiple connections open at a node, thus there can be multiple icons. Icons have the same color at both ends of the connection. In addition to colors, letter codes (A, B, AA, …) may also be displayed to help in identifying connections. Note that this visualizer does not display the paths the packets take. If you are interested in that, take a look at TransportRouteVisualizer, covered in the Visualizing Transport Path Activity showcase.

The visualization is turned off by default; it can be turned on by setting the displayTransportConnections parameter of the visualizer to true.

It is possible to filter the connections being visualized. By default, all connections are included. Filtering by hosts and port numbers can be achieved by setting the sourcePortFilter, destinationPortFilter, sourceNodeFilter, and destinationNodeFilter parameters.

The icon, colors and other visual properties can be configured by setting the visualizer’s parameters.

Enabling the visualization of transport connections

The first example simulation, configured in the EnablingVisualization section of the ini file, demonstrates the visualization with default settings. This example simulation uses the following network:

../../../../../_images/simplenetwork3.png

The network contains two StandardHost’s connected to each other, each containing a TCP application. IP addresses and routing tables are configured by a Ipv4NetworkConfigurator module. The visualizer module is a TransportConnectionVisualizer. The application in host1 is configured to open a TCP connection to host2 and send data to it. The visualization of transport connections is enabled with the visualizer’s displayTransportConnections parameter:

*.visualizer.*.displayTransportConnections = true

After the simulation is run for a while and the TCP connection is established, the icons representing the endpoints of the TCP connection will appear above the hosts. The network will look like the following:

../../../../../_images/simpleconnection.png

Multiple transport connections

The following example simulation demonstrates the visualization of multiple connections and the filtering by node and port number. The simulation can be run by choosing the MultipleConnections configuration from the ini file. It uses the following network:

../../../../../_images/complexnetwork.png

There are two StandardHost’s connected to a switch, which is connected via a router to the server, another StandardHost. IP addresses and routing tables are configured by a Ipv4NetworkConfigurator module. The visualizer module is an IntegratedVisualizer.

The hosts are configured to open TCP connections to the server:

  • host1: two connections on port 80 (HTTP), one connection on port 22 (SSH)

  • host2: one connection on port 80, another one connection on port 22

The visualizer is instructed to only visualize connections with destination port 80:

*.visualizer.*.transportConnectionVisualizer.destinationPortFilter = "80"

When the simulation is run, and the connections are established, the network will look like the following. Note that there are several icons above host1 and the server, indicating multiple connections. Endpoints can be matched by color.

../../../../../_images/port80.png

To visualize the connections that use port 22 at the server, the destinationPortFilter should be set to 22. The network will look like this:

../../../../../_images/port22.png

Additionally, to visualize port 22 connections at host2 only, the sourceNodeFilter parameter should be set to host2. The result looks like this:

../../../../../_images/port22host2.png

Sources: omnetpp.ini, TransportConnectionVisualizationShowcase.ned

Further information

For more information, refer to the TransportConnectionVisualizer NED documentation.

Discussion

Use this page in the GitHub issue tracker for commenting on this showcase.