The examples for traffic patterns may be found in ~ns/tcl/mobility/scene/cbr-50-{10-4-512, 20-4-512}.
The traffic generator is located under ~ns/indep-utils/cmu-scen-gen/ and are called cbrgen.tcl and tcpgen.tcl. They may be used for generating CBR and TCP connections respectively.
To create CBR connecions, run
ns cbrgen.tcl [-type cbr|tcp] [-nn nodes] [-seed seed] [-mc connections] [-rate rate]To create TCP connections, run
ns tcpgen.tcl [-nn nodes] [-seed seed]You will need to pipe the outputs from above to a cbr-* or a tcp-* file.