SSF.OS.BGP4 Example: Forwarding in a Moderately Sized Network

Disclaimer
This implementation of BGP-4 is constantly improving and evolving, and examples are not always immediately updated to reflect the most current version. It is usually (though not always) safe to assume that an example still runs properly, but the DML files and the output files may look different than the way there are described in some of the accompanying documentation.

Compatibility
This example is up-to-date with SSF.OS.BGP4 version 1.1.0.

Conventions
For an explanation of the debugging output used in this example, refer to BGP Debugging Output Conventions.

Overview
This example does not examine a specific aspect of BGP, but is a more general one which reveals how BGP is operating from a more macroscopic perspective. It shows how randomly generated traffic in a network with 32 autonomous systems is correctly forwarded from source to destination.

Files
primary source:  forwarding1.dml
library source:  dictionary.dml
schema source:   net.dml
raw output:      forwarding1.out

Running
To run this example, SSFNet must be installed and the three source files, as listed in the previous subsection, must be accessible. As an example, if the three source files were together in the same directory, the following command could be used to run the simulation:

    java SSF.Net.Net 150 forwarding1.dml dictionary.dml net.dml

Network Graph

Discussion
In this example, BGP is running at 32 different interconnected ASes, using a simple shortest path policy for evaluating routes. After routing information is completely disseminated among the ASes, traffic is flooded between all pairs of hosts in the network. Each AS has only one router and one host, so that BGP can be used alone, without the need for an intra-AS routing protocol to be present. In order to generate traffic, an application protocol is running at each host. The applications are set up to send a message every 100 seconds, so the simulation must be run for at least that long in order for there to be any interesting results. Output is generated by an application each time it sends or receives a message, so the results of running the simulation will contain lines that look like this:

100.0       --- app at 0:4:1 sent msg to 3:6:1 (0.0.1.18/32)
100.0       --- app at 0:4:1 sent msg to 1:7:1 (0.0.0.42/32)
100.0       --- app at 0:4:1 sent msg to 3:4:1 (0.0.1.34/32)
100.000875  +++ app at 3:6:1 rcvd msg from 0:4:1
100.000935  +++ app at 3:4:1 rcvd msg from 0:4:1
100.001365  +++ app at 1:7:1 rcvd msg from 0:4:1

The numbers at the far left represent the simulation time in seconds. Once the example has been run (using make), output containing additional setup messages--which indicate the progress of each BGP speaker in setting up the forwarding tables--can be found in the file example-setup.out. Output without such messages will be in example.out. The only difference between the two DML files used to generate these output files is in the values of the bgpoption attributes.

The numbers at the far left represent the simulation time in seconds. The example can also be run using an alternative configuration file--forwarding1-setup.dml--which prints out additional setup messages indicating the progress of each BGP speaker in setting up the forwarding tables. The only difference between this configuration file and the other is in the values of the bgpoption attributes.