The intrinsic routing policy of NS2—a network simulation tool— based on flat or hierarchical address has the disadvantage such as small topology scale,high resource consumption,low efficiency and so on.This paper pr...The intrinsic routing policy of NS2—a network simulation tool— based on flat or hierarchical address has the disadvantage such as small topology scale,high resource consumption,low efficiency and so on.This paper proposes an IP based hierarchical routing strategy in network simulation to extend the topology scale and improve performance in simulating.Firstly,a stratification mechanism to identify IP address of nodes is described.Then,an algorithm of packet transmitting method(PTM) is presented for packet forwarding in the same subnet.Finally,algorithms of region partition(RP),routing computation based on region division(RCBRD) and routing distribution(RD) is proposed to implement regional segmentation,route calculation and route distribution for forwarding packets in different subnets respectively.The experiment results show that under the same condition,compared with plane address,the topology scale of the network simulation is extended two times and the consumption of time and memory during simulation is reduced by approximately 73%and 45.8% respectively.Compared with hierarchical address,the topology scale of the network simulation is expanded by more than 50%,and the consumption of time and memory is reduced by about 59.2% and 25% respectively.In addition,along with the growth of the node size,the proportion of reducing total simulation time and memory consumption would gradually increase.展开更多
基金Supported by the National Science and Technology Support Project(No.2012BAH45B01)the National Natural Science Foundation of China(No.61100189,61370215,61370211,61402137)the National Information Security 242 Project of China(No.2016A104)
文摘The intrinsic routing policy of NS2—a network simulation tool— based on flat or hierarchical address has the disadvantage such as small topology scale,high resource consumption,low efficiency and so on.This paper proposes an IP based hierarchical routing strategy in network simulation to extend the topology scale and improve performance in simulating.Firstly,a stratification mechanism to identify IP address of nodes is described.Then,an algorithm of packet transmitting method(PTM) is presented for packet forwarding in the same subnet.Finally,algorithms of region partition(RP),routing computation based on region division(RCBRD) and routing distribution(RD) is proposed to implement regional segmentation,route calculation and route distribution for forwarding packets in different subnets respectively.The experiment results show that under the same condition,compared with plane address,the topology scale of the network simulation is extended two times and the consumption of time and memory during simulation is reduced by approximately 73%and 45.8% respectively.Compared with hierarchical address,the topology scale of the network simulation is expanded by more than 50%,and the consumption of time and memory is reduced by about 59.2% and 25% respectively.In addition,along with the growth of the node size,the proportion of reducing total simulation time and memory consumption would gradually increase.