Ian Liu, $class is an OTcl special variable indicating the class of the proc or method currently being executed. $class set preference_ accesses the class variable called preference_. Likely you resourced the route-proto.tcl variable, and hence eliminated the definitions attached to the original Agent/rtProto/Direct class. See both the otcl documentation, and the ns-defaults.tcl file. Kannan