[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: classifier and routing




> From: "Huiwen Li" <[email protected]>
> To: "'Tarik Alj'" <[email protected]>
> Subject: RE: classifier and routing
> Date: Fri, 15 Oct 1999 15:23:20 -0700
> MIME-Version: 1.0
> 
> Tarik,
> 
> Thank you so much. You have helped me a lot. I will try as you suggested and
> see what will come up.
> 
> I still have some questions regarding what you suggested.
> 
> > Use a Hash/Fid classifier instead of the addr-classifier. 
> > This way you can 
> > classify packets on a fid basis.
> 
> How can I change the classifier for a node? Sorry if this is a trivial
> question. 
> Should I just use 
> $node set classifier [new Classifier/Hash/Fid $num]? where num is the number
> of slots I wish the classifier to have.

I think this should work. Num is not the number of slots but rather the number 
of hash buckets.
But watch it when it's going to compute routes.
> 
> When I tried this, I got "unknown flow" error, but I already update my ns
> several days ago because of this problem.
> 
> If I use address classfier, and if I dump the classifier, I found that it
> has more slots than the links I have. I only have 10 links, but it gave me
> 33 slots. I guess other slots are used for demux_ and any else? I couldn't
> easily distinguish which slots are used for filling next object.

You could do a put of very link's head and compare with what you got in your 
classifier.

> 
> 
> > 
> > You don't change the routing table but the classifier's entry.
> 
> But the route logic decides which is the next hop and which should be filled
> in classifier's slot, right?
> 
> > Maybe you should try using [$link_($node1_id)($node($i)_id) 
> > head]. Where link_ 
> > is Simulator's link array. 
> 
> Actually I just found out that the route for the whole network is computed
> after the $ns run. I am not sure if I am right, but I think only in
> Simulator instproc run {}, the simulator generate the route object to
> compute the routes. So in this way I could only change sth. inside the run
> proc, otherwise what I changed before $ns run will be overloaded by the
> default routing.

Yes, that's what i meant by watch it. You could also have your routing done 
after $ns run. Might be safer.
> 
> > And you could use add-route too.
> 
> Since I was supposing the simulator already calculated the routes, so I
> didn't use add-route, which increase the routing table size. I just want to
> overwrite the original routing table calculation, so I use install. But if I
> use classifier/Hash/Fid, I don't know how the default routing works. I think
> the routelogic just find out what the next hop should be and then put this
> next hop in classifier's slot. In my case, I am not sure how this routelogic
> find the next hop for hash classifier. I think hash classifier only decides
> which bucket to send the packets, not decides which node to send the
> packets, so the important thing is what to fill in the classifier slot,
> which classifier itself doesn't do. In my impression, it is the routelogic
> which use add-route and also installs objects in the slot. 

Yes the simulator computes the routes in compute-flat-routes, uses add-route to 
fill the classifier, by using routelogic's lookup to find the nhop. When using 
the addr-classifier you put the link's head in the slot that matches the 
destination's id. With the hash classifier you ask for the next available slot 
and install the object in it (installNext) and say this slot is going to match 
this flowid (set-hash). 

>  
> Is there anything wrong here with my understanding??? I seem to be messed up
> with all these ideas.
> 
> I sincerely hope more clarification.
> 
> Huiwen

Hope this clarifies it a bit. 
(note: this is also my understanding, so if i'm wrong i hope to be corrected.)

Tarik