How to Adjust Hello Period of Geographic Routing Protocol in NS2


Currently geographic / location based routing protocols are more frequently used than topology based routing protocol in highly dynamic mobile ad hoc network. Greedy Perimeter Stateless Routing algorithm (GPSR) is the most commonly used location based routing protocol. In GPSR, neighbors are identified using hello message with default broadcasting period of 1.0 s. Hello period can be adjusted in the variable hello_period_ as in file hello.tcl

#Filename: hello.tcl

# Agent/GPSR setting
Agent/GPSR set planar_type_ 1 ;#1=GG planarize, 0=RNG planarize
Agent/GPSR set hello_period_ 0.5;#Hello message period