📄 printout.ps
字号:
( # set up the edge nodes) N( while { $i < $edge_count } {) N() S 8 T (set E\($i\) [$self create-edge-node $edge_count]) N( set nid [$E\($i\) id]) N( set string1 "E\($i\) node id: $nid") N( puts $string1) N() S 8 T (incr i) N( }) N( ) N( set i 0) N( # set up the core nodes) N( while { $i < $core_count } {) N() S 8 T (set C\($i\) [$self create-core-node $core_count]) N( set nid [$C\($i\) id]) N( set string1 "C\($i\) node id: $nid") N( puts $string1) N() S 8 T (incr i) N( }) N( ) N( $self createDuplexFiberLink $E\(0\) $C\(0\) $bwpc $delay $ncc $ndc $maxch) N( $self createDuplexFiberLink $C\(0\) $E\(1\) $bwpc $delay $ncc $ndc $maxch) N() N() N(stdin) (Page 5/26) (Feb 11, 04 16:20) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(basic5a-nam.tcl) K( Feb 11 10:34 2004 Page: 4) p n() N( $self build-routing-table) N( ) N(}) N() N() N() N() N($ns create_topology) N(#set ftp0 [$ns create-ftp-connection $E\(0\) $E\(1\)]) N() N(#puts "constructed a ftp connection between Edge node 0 and 1 ") N(#$ns at 1.0 "$ftp0 start") N(#$ns at 1000.0 "$ftp0 stop") N() N(Agent/UDP set packetSize_ 1250) N() N(set udp0 [new Agent/UDP]) N($ns attach-agent $E\(0\) $udp0) N() N(set cbr0 [new Application/Traffic/CBR]) N($cbr0 set packetSize_ 1250) N($cbr0 set interval_ 0.1) N($cbr0 attach-agent $udp0) N() N(set null0 [new Agent/Null]) N($ns attach-agent $E\(1\) $null0) N() N($ns connect $udp0 $null0) N() N($ns at 0.1 "$cbr0 start") N($ns at 11.0 "$cbr0 stop") N() N($ns at 11.1 "finish") N($ns run) N() N() N() N() N() N() N(stdin) (Page 6/26) (Feb 11, 04 16:20) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (3/13) (Wednesday February 11, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (7-8) 4%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(basic5a.tcl) K( Feb 11 09:57 2004 Page: 5) p n() N(# Copyright \(c\) University of Maryland, Baltimore County, 2003.) N(# Original Authors: Ramakrishna Shenai, Sunil Gowda and Krishna Sivalingam.) N() N(# This software is developed at the University of Maryland, Baltimore County u) N(nder) N(# grants from Cisco Systems Inc and the University of Maryland, Baltimore Coun) N(ty.) N() N(# Permission to use, copy, modify, and distribute this software and its) N(# documentation in source and binary forms for non-commercial purposes) N(# and without fee is hereby granted, provided that the above copyright) N(# notice appear in all copies and that both the copyright notice and) N(# this permission notice appear in supporting documentation. and that) N(# any documentation, advertising materials, and other materials related) N(# to such distribution and use acknowledge that the software was) N(# developed by the University of Maryland, Baltimore County. The name of) N(# the University may not be used to endorse or promote products derived from) N(# this software without specific prior written permission.) N() N(# Copyright \(C\) 2000-2003 Washington State University. All rights reserved.) N(# This software was originally developed at Alcatel USA and subsequently modif) N(ied) N(# at Washington State University, Pullman, WA through research work which was) N(# supported by Alcatel USA, Inc and Cisco Systems Inc.) N() N(# The following notice is in adherence to the Washington State University) N(# copyright policy follows.) N() N(# License is granted to copy, to use, and to make and to use derivative) N(# works for research and evaluation purposes, provided that Washington) N(# State University is acknowledged in all documentation pertaining to any such) N(# copy or derivative work. Washington State University grants no other) N(# licenses expressed or implied. The Washington State University name) N(# should not be used in any advertising without its written permission.) N() N(# WASHINGTON STATE UNIVERSITY MAKES NO REPRESENTATIONS CONCERNING EITHER) N(# THE MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE) N(# FOR ANY PARTICULAR PURPOSE. The software is provided "as is") N(# without express or implied warranty of any kind. These notices must) N(# be retained in any copies of any part of this software.) N() N() N() N() N(# Example demo topology as shown below :) N(#) N(# ___________ ___________ ___________) N(# | | | | | |) N(# | Edge node |========| Core node |========| Edge node |) N(# |___________| |___________| |___________|) N(#) N(#) N() N(StatCollector set debug_ 0) N(Classifier/BaseClassifier/EdgeClassifier set type_ 0) N(Classifier/BaseClassifier/CoreClassifier set type_ 1) N(# Per node bhp processing time is 1 micro-second) N(source ../lib/ns-obs-lib.tcl) N() N(stdin) (Page 7/26) (Feb 11, 04 16:20) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(basic5a.tcl) K( Feb 11 09:57 2004 Page: 6) p n() N(source ../lib/ns-obs-defaults.tcl) N(source ../lib/ns-optic-link.tcl ) N() N(set ns [new Simulator]) N(set sc [new StatCollector]) N(#open trace file for IPKTs and data pkts dropped within the network) N(set tf [open trace5a.tr w]) N(#open trace file for data pkts entering and leaving network) N(set ndf [open ndtrace5a.tr w]) N() N() N(#trace IPKTs and dropped data pkts) N($ns trace-all $tf) N(#trace data pkts at ingress and egress) N($ns nodetrace-all $ndf) N() N() N(#====================================================================#) N(# constant definitions) N(# set the offset time To to 20 microseconds) N(#BurstManager offsettime 0.00002) N(BurstManager offsettime 0.002) N(BurstManager maxburstsize 1250) N(BurstManager bursttimeout 0.1) N(# set the bhp processing time 1 microsecond) N(Classifier/BaseClassifier/CoreClassifier set bhpProcTime 0.000006) N(Classifier/BaseClassifier/EdgeClassifier set bhpProcTime 0.000006) N(Classifier/BaseClassifier set proc_time 0.0) N(OBSFiberDelayLink set FDLdelay 0.000005) N() N(# total number of edge nodes) N(set edge_count 2) N(# total number of core routers) N(set core_count 1) N() N(# total bandwidth/channel \(1mb = 1000000\)) N(set bwpc 1000000) N(#set bwpc ) N(# delay in milliseconds) N(set delay 1ms) N() N(# total number of channels per link) N(set maxch 16) N(# number of control channels per link) N(set ncc 4) N(# number of data-channels) N(set ndc 12) N() N(# set the variables too.) N($ns set bwpc_ $bwpc) N($ns set maxch_ $maxch) N($ns set ncc_ $ncc) N($ns set ndc_ $ndc) N() N(#====================================================================#) N(# support procedures) N() N(stdin) (Page 8/26) (Feb 11, 04 16:20) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (4/13) (Wednesday February 11, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (9-10) 5%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(basic5a.tcl) K( Feb 11 09:57 2004 Page: 7) p n() N() N(# finish procedure) N(proc finish {} {) N( global ns sc tf) N( $ns flush-trace) N( close $tf) N( ) N( $sc display-sim-list) N() N( puts "Simulation complete";) N( exit 0) N(}) N() N() N() N() N(#create a edge-core-edge topology) N(Simulator instproc create_topology { } {) N( $self instvar Node_) N( global E C ) N( global edge_count core_count) N( global bwpc maxch ncc ndc delay) N() N( set i 0) N( # set up the edge nodes) N( while { $i < $edge_count } {) N() S 8 T (set E\($i\) [$self create-edge-node $edge_count]) N( set nid [$E\($i\) id]) N( set string1 "E\($i\) node id: $nid") N( puts $string1) N() S 8 T (incr i) N( }) N( ) N( set i 0) N( # set up the core nodes) N( while { $i < $core_count } {) N() S 8 T (set C\($i\) [$self create-core-node $core_count]) N( set nid [$C\($i\) id]) N( set string1 "C\($i\) node id: $nid") N( puts $string1) N() S 8 T (incr i) N( }) N( ) N( $self createDuplexFiberLink $E\(0\) $C\(0\) $bwpc $delay $ncc $ndc $maxch) N( $self createDuplexFiberLink $C\(0\) $E\(1\) $bwpc $delay $ncc $ndc $maxch) N() N( $self build-routing-table) N( ) N(}) N() N() N() N() N($ns create_topology) N(#set ftp0 [$ns create-ftp-connection $E\(0\) $E\(1\)]) N() N() N(stdin) (Page 9/26) (Feb 11, 04 16:20) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(basic5a.tcl) K( Feb 11 09:57 2004 Page: 8) p n() N(#puts "constructed a ftp connection between Edge node 0 and 1 ") N(#$ns at 1.0 "$ftp0 start") N(#$ns at 1000.0 "$ftp0 stop") N() N(Agent/UDP set packetSize_ 1250) N() N(set udp0 [new Agent/UDP]) N($ns attach-agent $E\(0\) $udp0) N() N(set cbr0 [new Application/Traffic/CBR]) N($cbr0 set packetSize_ 1250) N($cbr0 set interval_ 0.01) N($cbr0 attach-agent $udp0) N() N(set null0 [new Agent/Null]) N($ns attach-agent $E\(1\) $null0) N() N($ns connect $udp0 $null0) N() N($ns at 1.0 "$cbr0 start") N($ns at 101.0 "$cbr0 stop") N() N($ns at 105.0 "finish") N($ns run) N() N() N() N() N() N() N(stdin) (Page 10/26) (Feb 11, 04 16:20) titlebordergrestore(Printed by U-GMGPC2\\Geoffrey M. Garner) rhead(stdin) (5/13) (Wednesday February 11, 2004) footerend % of iso1dictpagesave restoreshowpage%%Page: (11-12) 6%%BeginPageSetup/pagesave save defsh 0 translate 90 rotate%%EndPageSetupiso1dict begingsavellx lly 12 add translate/v 0 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub storex0 y0 moveto(basic8a-nam.tcl) K( Feb 11 10:01 2004 Page: 9) p n() N(# Copyright \(c\) University of Maryland, Baltimore County, 2003.) N(# Original Authors: Ramakrishna Shenai, Sunil Gowda and Krishna Sivalingam.) N() N(# This software is developed at the University of Maryland, Baltimore County u) N(nder) N(# grants from Cisco Systems Inc and the University of Maryland, Baltimore Coun) N(ty.) N() N(# Permission to use, copy, modify, and distribute this software and its) N(# documentation in source and binary forms for non-commercial purposes) N(# and without fee is hereby granted, provided that the above copyright) N(# notice appear in all copies and that both the copyright notice and) N(# this permission notice appear in supporting documentation. and that) N(# any documentation, advertising materials, and other materials related) N(# to such distribution and use acknowledge that the software was) N(# developed by the University of Maryland, Baltimore County. The name of) N(# the University may not be used to endorse or promote products derived from) N(# this software without specific prior written permission.) N() N(# Copyright \(C\) 2000-2003 Washington State University. All rights reserved.) N(# This software was originally developed at Alcatel USA and subsequently modif) N(ied) N(# at Washington State University, Pullman, WA through research work which was) N(# supported by Alcatel USA, Inc and Cisco Systems Inc.) N() N(# The following notice is in adherence to the Washington State University) N(# copyright policy follows.) N() N(# License is granted to copy, to use, and to make and to use derivative) N(# works for research and evaluation purposes, provided that Washington) N(# State University is acknowledged in all documentation pertaining to any such) N(# copy or derivative work. Washington State University grants no other) N(# licenses expressed or implied. The Washington State University name) N(# should not be used in any advertising without its written permission.) N() N(# WASHINGTON STATE UNIVERSITY MAKES NO REPRESENTATIONS CONCERNING EITHER) N(# THE MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE) N(# FOR ANY PARTICULAR PURPOSE. The software is provided "as is") N(# without express or implied warranty of any kind. These notices must) N(# be retained in any copies of any part of this software.) N() N() N() N() N(# Example demo topology as shown below :) N(#) N(# ___________ ___________ ___________) N(# | | | | | |) N(# | Edge node |========| Core node |========| Edge node |) N(# |___________| |___________| |___________|) N(#) N(#) N() N(StatCollector set debug_ 0) N(Classifier/BaseClassifier/EdgeClassifier set type_ 0) N(Classifier/BaseClassifier/CoreClassifier set type_ 1) N(# Per node bhp processing time is 1 micro-second) N(source ../lib/ns-obs-lib.tcl) N() N(stdin) (Page 11/26) (Feb 11, 04 16:20) titleborder/v 1 store/x0 x v get 3.362408 add sx cw mul add store/y0 y v get bfs th add sub store
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -