- Home Page of ProjectGuideline.com ›
- Forums ›
- Get Help to do your B.E., and M.E., M.Tech., & M.S., Project in Ns2 ›
- Configuring HTTP Traffic
Hi there,
I just installed ns to do my school project. Our teacher wants us to simulate a HTTP Traffic with 5 different pages.
I’ve found out that I can do this with PackMimeHTTP but couldn’t be able to build a page by looking at ns documentation.
All I found is the following code:
##########################
#Setup a HTTP Connection 1
set rate 15
set pm1 [new PackMimeHTTP]
$pm1 set-client $nH1; # name $nH1 as client
$pm1 set-server $nZ; # name $nZ as server
$pm1 set-rate $rate; # new connections per second
$pm1 set-http-1.1; # use HTTP/1.1
# SETUP PACKMIME RANDOM VARIABLES
global defaultRNG
# create RNGs (appropriate RNG seeds are assigned automatically)
set flowRNG [new RNG]
set reqsizeRNG [new RNG]
set rspsizeRNG [new RNG]
# create RandomVariables
set flow_arrive [new RandomVariable/PackMimeHTTPFlowArrive $rate]
set req_size [new RandomVariable/PackMimeHTTPFileSize $rate $CLIENT]
set rsp_size [new RandomVariable/PackMimeHTTPFileSize $rate $SERVER]
# assign RNGs to RandomVariables
$flow_arrive use-rng $flowRNG
$req_size use-rng $reqsizeRNG
$rsp_size use-rng $rspsizeRNG
# set PackMime variables
$pm1 set-flow_arrive $flow_arrive
$pm1 set-req_size $req_size
$pm1 set-rsp_size $rsp_size
# record HTTP statistics
#$pm1 set-outfile $http1log
with nH1 as the client and nZ is the server. I copy/paste this code 5 times to produce different HTTP traffic but it’s lame and little bit far from what I’m supposed to do.
Can someone help me to produce 5 HTTP Traffic, coming from 4 clients to one or two servers?
The exact topology is as the following:
A ---- /---X
B
0=========1---Y
C ----/| ---Z
D ----/
and expects me to choose one or more servers from X,Y,Z; and minimum two clients from A,B,C,D to produce 5 page visit traffic.
I hope I could explain what I need.
All help will be appreciated.
Thanks from now.
That’s quite an interesting but difficult work. Sorry I cant help u now. Pls wait for the others’ help. 😥