Scalable Simulation Framework
Manual IP address aggregation in SSFNet

back to list of tutorials...

Complete example of a network with cidr attributes

This mini-tutorial shows with pictures how to annotate DML networks with cidr attributes to achieve a user-defined IP address aggregation. We begin with several small networks, and illustrate how DML mechanism of Net inclusion is used to reuse them to construct a larger network. The pictures can be consulted when you read the DML code, as they contain annotations showing the router id numbers and explicit assignment of VLSM IP address blocks to subnets.

It is best to view the DML file campus2.dml (will open in new window), and examine it side-by-side with the graphical representation of networks. By the way, this network is included in the SSFNet 1.1 distribution as

       ssfnet/examples/littleComboDemo2/campus2.dml

Note that the cidr attribute values are defined relative to the enclosing Net. This allows to include a Net in a larger Net, without making any changes: the larger, enclosing Net will prepend its own cidr attribute. This illustrates the most important property on the Net inclusion construct: when you include a pre-configured Net, nothing is modified in the included Net. This property allows a modeler to maintain a database of pre-configured Nets, and share them among multiple composite models.

network0. A tiny backbone network. Rectangles are IP routers. Router ids are shown in regular black font. Links' cidr attributes shown in oblique blue font. [ PDF version for printing. ]

network1. A small server farm. Rectangles are IP routers, squares are server hosts connected with point-to-point links to routers. [ PDF version for printing. ]

network2. Rectangles are IP routers, ovals are LANs (links with three or more attached interfaces). Router and host ids are shown in regular black font. Links' cidr attributes shown in oblique blue font. Each LAN has two identical client hosts connected to it (not drawn). [ PDF version for printing. ]

network3. Is similar to network2 in structure, see it in the complete figure below.

campus2. The complete model - named "campus2.dml" - is constructed by importing networks 0 - 3 shown above. Here routers' and hosts' ids are expressed in fully expanded NHI notation relative to the toplevel network. Similarly, fully expanded CIDR values are prefixed with the cidr number assigned to the enclosing network. See the DML file at the bottom of this page for complete specification. [ PDF version for printing. ]


IP addresses computed by SSFNet

Below we show the IP address allocation for our example network shown above. The IP addresses are automatically computed by SSFNet from the network configuration database campus2.dml at the beginning of the simulation, according to the cidr attributes explicitly specified in this file.

In this example for readability we used the default base address 0.0.0.0, however, you can use an arbitrary base address prefix as the command line argument when running SSF.Net.Net.

CIDR           IP Block            b16           NHI                 
--             0.0.0.0/23          0x00000000    
0              0.0.1.192/27        0x000001c0    0
0/0            0.0.1.212/30        0x000001d4    0:0(1) 0:1(2) 
0/1            0.0.1.208/30        0x000001d0    0:1(0) 0:2(1) 
0/2            0.0.1.204/30        0x000001cc    0:0(0) 0:2(2) 
0/3            0.0.1.200/30        0x000001c8    0:0(2) 4(0) 
0/4            0.0.1.196/30        0x000001c4    0:1(1) 5(0) 
0/5            0.0.1.192/30        0x000001c0    0:2(0) 1:0(3) 
1              0.0.1.128/26        0x00000180    1
1/0            0.0.1.160/30        0x000001a0    1:0(2) 1:1(0) 
1/1            0.0.1.144/28        0x00000190    
1/1/0          0.0.1.148/30        0x00000194    1:0(0) 1:2(0) 
1/1/1          0.0.1.144/30        0x00000190    1:0(1) 1:3(0) 
1/2            0.0.1.128/28        0x00000180    
1/2/0          0.0.1.132/30        0x00000184    1:1(1) 1:4(0) 
1/2/1          0.0.1.128/30        0x00000180    1:1(2) 1:5(0) 
2              0.0.0.0/24          0x00000000    2
2/1            0.0.0.128/26        0x00000080    
2/1/1          0.0.0.156/30        0x0000009c    2:0(1) 2:1(2) 
2/1/2          0.0.0.152/30        0x00000098    2:0(2) 2:2(0) 
2/1/3          0.0.0.148/30        0x00000094    2:2(1) 2:3(3) 
2/1/4          0.0.0.144/30        0x00000090    2:2(2) 2:4(0) 
2/1/5          0.0.0.136/29        0x00000088    2:2(3) 2:7(0) 2:8(0) 
2/1/6          0.0.0.128/29        0x00000080    2:4(1) 2:9(0) 2:10(0) 
2/2            0.0.0.0/25          0x00000000    
2/2/1          0.0.0.76/30         0x0000004c    2:1(1) 2:3(0) 
2/2/2          0.0.0.64/29         0x00000040    2:3(1) 2:11(0) 2:12(0) 
2/2/3          0.0.0.72/30         0x00000048    2:3(2) 2:5(0) 
2/2/4          0.0.0.0/26          0x00000000    
2/2/4/1        0.0.0.32/29         0x00000020    2:5(1) 2:13(0) 2:14(0) 
2/2/4/2        0.0.0.40/30         0x00000028    2:5(2) 2:6(0) 
2/2/4/3        0.0.0.0/27          0x00000000    
2/2/4/3/1      0.0.0.16/29         0x00000010    2:6(3) 2:15(0) 2:16(0) 
2/2/4/3/2      0.0.0.8/29          0x00000008    2:6(2) 2:17(0) 2:18(0) 
2/2/4/3/3      0.0.0.0/29          0x00000000    2:6(1) 2:19(0) 2:20(0) 
2/3            0.0.0.196/30        0x000000c4    4(3) 2:0(0) 
2/4            0.0.0.192/30        0x000000c0    4(2) 2:1(0) 
3              0.0.1.0/25          0x00000100    3
3/0            0.0.1.72/29         0x00000148    3:0(3) 3:4(0) 3:5(0) 
3/1            0.0.1.64/29         0x00000140    3:0(2) 3:6(0) 3:7(0) 
3/2            0.0.1.88/30         0x00000158    3:0(1) 3:1(3) 
3/3            0.0.1.0/26          0x00000100    
3/3/1          0.0.1.48/30         0x00000130    3:1(2) 3:2(0) 
3/3/2          0.0.1.44/30         0x0000012c    3:2(1) 3:3(3) 
3/3/3          0.0.1.40/30         0x00000128    3:1(1) 3:3(0) 
3/3/4          0.0.1.32/29         0x00000120    3:2(2) 3:8(0) 3:9(0) 
3/3/5          0.0.1.0/27          0x00000100    
3/3/5/1        0.0.1.8/29          0x00000108    3:3(2) 3:10(0) 3:11(0) 
3/3/5/2        0.0.1.0/29          0x00000100    3:3(1) 3:12(0) 3:13(0) 
3/4            0.0.1.84/30         0x00000154    5(2) 3:0(0) 
3/5            0.0.1.80/30         0x00000150    5(1) 3:1(0) 
4              0.0.1.224/30        0x000001e0    4(1) 5(3) 

NHI Addr            CIDR Level          IP Address Block    % util    
--                  --                  0.0.0.0/23          94.921875 
0                   0                   0.0.1.192/27        81.25     
1                   1                   0.0.1.128/26        59.375    
2                   2                   0.0.0.0/24          78.90625  
3                   3                   0.0.1.0/25          73.4375   

continue the tutorials...