-
Shashi Guruprasad authored
1) IP address based routes can now be added - The IP address is set on a link object - An "$ns rlink" is used to instantiate links that get cut and cross physical partitions - Traffic agents that are across physical partitions (i.e. different instances of nse) are connected by a new "$ns ip-connect" mechanism - A new Node instproc "add-route-to-ip" adds IP address based routes. - Changed ns multicast addressing to use 3 bits instead of the default 1 - Currently, the classifier does a lookup on a complete 32 bit IP and if a target to route to is not found, uses a 24 bit IP mask. It does not try to match IP prefixes of all lengths. I'll add that later if necessary 2) NS packets that cross partitions are encapsulated in IPPROTO_ENCAP IP packets. 3) RAW IP sockets used to inject packets into the network now use a rtabid paramater so that packets can be routed according to different routing tables Tested with 2 test cases, one with UDP/CBR traffic and another with default NS TCP/FTP traffic. Setup was done manually. As I do testbed integration, there may be more changes. Here's the test setup: 2.2 2.3 1.2 1.3 3.2 3.3 n0 --------- n1 ----------- n2 ------------ n3 n0,n1 are on one physical node and n2,n3 are on another. The n1-n2 link is cut. A TCP example: ---------------------physnode0--------------------- set ns [new Simulator] $ns use-scheduler RealTime set n0 [$ns node] set n1 [$ns node] $ns duplex-link $n0 $n1 10Mb 5ms DropTail [$ns link $n0 $n1] set-ip 10.1.2.2 [$ns link $n1 $n0] set-ip 10.1.2.3 set rl0 [$ns rlink $n1 10.1.1.3 2Mb 40ms DropTail] $rl0 set-ip 10.1.1.2 set tcp0 [new Agent/TCP] # The last parameter specifies the port $ns attach-agent $n0 $tcp0 20 $ns ip-connect $tcp0 10.1.3.3 20 set ftp0 [new Application/FTP] $ftp0 attach-agent $tcp0 $n0 add-route-to-ip 10.1.3.3 10.1.2.3 $n1 add-route-to-ip 10.1.3.3 10.1.1.3 $ns at 1.0 "$ftp0 start" $ns at 10.0 "$ftp0 stop" -----------------end physnode0--------------------- ---------------------physnode1--------------------- set ns [new Simulator] $ns use-scheduler RealTime set n2 [$ns node] set n3 [$ns node] $ns duplex-link $n2 $n3 10Mb 5ms DropTail [$ns link $n2 $n3] set-ip 10.1.3.2 [$ns link $n3 $n2] set-ip 10.1.3.3 set rl1 [$ns rlink $n2 10.1.1.2 2Mb 40ms DropTail] $rl1 set-ip 10.1.1.3 set tcpsink0 [new Agent/TCPSink] $ns attach-agent $n3 $tcpsink0 20 $ns ip-connect $tcpsink0 10.1.2.2 20 $n3 add-route-to-ip 10.1.2.2 10.1.3.2 $n2 add-route-to-ip 10.1.2.2 10.1.1.2 -----------------end physnode1---------------------
1630611a