1 / 20

NETWORK SIMULATOR

NETWORK SIMULATOR. Duke Lee, Mustafa Ergen, Jeff Ko WOW UC Berkeley. Simulator. Animator input Define geographical distribution Define the functional parameters of the network nodes. Define network layer protocols Define traffic characteristics down to each node. Simulator core

wileya
Télécharger la présentation

NETWORK SIMULATOR

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NETWORK SIMULATOR Duke Lee, Mustafa Ergen, Jeff Ko WOW UC Berkeley WOW

  2. Simulator • Animatorinput Define geographical distribution Define the functional parameters of the network nodes. Define network layer protocols Define traffic characteristics down to each node. • Simulator core Network Modules Drive the event. • Analyzer output Statistical graphing tool. • Visual Tracer output Packet-level visualization tool. (NAM) WOW

  3. Simulator Finite State Machine Event Driven Simulation Seed State List Simulation Functions Handler Functions WOW

  4. Event Scheduler • Application • WTP • timers • IP • DSDV, etc. • Link Layer • Timers,WTRP • Channel • Packet transmission • Node Info • position • topology SCHEDULER Application INFO. QUEUE TCP UDP ICMP IP LINK LAYER PHSICAL LAYER NODE CHANNEL WOW

  5. Scheduler Algorithm • struct event { struct event *next; struct event *prev; unsigned long expiration; unsigned long data; void (*handler)(unsigned long); • } WOW

  6. Event Scheduler • add_timer( event *ev); • delete_timer(event *ev); • mod_timer(event *ev); • while(1) { tmp=take_event(); update_clock ; update_position; tmp.handler(); • } SIMULATOR Event Queue add_event take_event WOW

  7. Event Queue CHANNEL Event Queue • Packet Transmission • Timer initialization Packet transmission tx_1 tm_7 timer_7 rx_5 rx_2 rx_1 WOW

  8. Simulator Functions • update_topology(); • record_topology(); • record_transmission(); • record_reception(); • Record Function is a periodic event which periodically starts monitoring SIMULATOR Event Queue record_function record_topology Output Files record_transmission record_reception WOW

  9. Architecture • Overall Design SIMULATOR MODULE CHANNEL MODULE LINUX MODULES VISUAL TRACER GUI DEV1 DEV2 DEV3 … INFO INFO INFO ANIMATOR GUI State List State List State List ANALYZER GUI SCHEDULER WOW

  10. Interface CBR SCHEDULER MONITORING [1] [4] Network Module [5] [2] CHANNEL [3] • Initialize_simulation; • Initialize_topology; • Initialize_traffic; • Initialize_record_function; • Main Loop WOW

  11. [1] CBR-Data Traffic • used to send periodic packet to the module. • sits in the Logical Link Control above the network module. • transmit (received something from the top layer) • int tx_handler (struct device *dev, struct sk_buff * skb) • receive • int app_rx (struct device * dev, struct sk_buff * inskb, unsigned short network_proto) WOW

  12. [2] Scheduler • used to send data to channel module • transmit first schedule a event and wait about a transmission time. • int transmit (struct device *dev, struct sk_buff skb) • called when the module get the event from the scheduler. • received something from the bottom layer. • void rx_handler(struct device *dev , struct sk_buff *skb) WOW

  13. [3] Channel • scheduler to channel • void _transmit (struct device * dev) • channel go through for each node and assign packet reception for those who can get the packet. • channel to scheduler • void add_timer (struct timer_list * timer) WOW

  14. [4] Monitoring Functions I • void record_topology (struct simulation_struct * siminfo, struct device *device_list, struct device * dev, float time, float difftime); • void start_transmission (struct simulation_struct * siminfo, struct device * sender, float time); • void end_transmission (struct simulation_struct * siminfo, struct device * sender, float time); • void start_reception (struct simulation_struct * siminfo, struct device * sender, float time); • void end_reception (struct simulation_struct * siminfo, struct device * sender, float time); WOW

  15. [4] Monitoring Functions II • void record_transmission (struct simulation_struct * siminfo, struct device * device_list, struct device * sender, unsigned char * packet, float time); • void record_reception (struct simulation_struct * siminfo, struct device * device_list, struct device * sender, unsigned char * packet, float time); • printpacketinfo (* packet); needed for different packet types. WOW

  16. [5] Inside Functions • Randomize Functions • basic random function should be used for determinism. • unsigned long net_random(void); WOW

  17. Conclusion • Unique Simulator Functions • Specific Handler Functions • Linux Scheduler Functions • General Event Type • NAM WOW

  18. NAM • Allows backward and forward run • Node variables: color,shape … • Node marking • Variable Tracing • Annotation • Node Exec Button • Save frames as a movie WOW

  19. Appendix I • Transport protocol create sk_buff from output buffers • While device drivers create them for incoming data. TCP sk_buff IP MAC sk_buff Dev. WOW

  20. Appendix II • struct cbr_struct { • struct cbr_struct * next; • unsigned long start_time; • struct device * source; • struct device * dest; • struct timer_list cbr_timer; • int packetsize; • int numpackets; • int bandwidth; • void * handler; • }; • sk_buff • sk – pointer to owning socket • stamp – arrival time • dev - pointer to receiving/transmiting device • h- pointer to transport layer header • nh- pointer to network layer header • mac- pointer to link layer header • dst – pointer to dst_entry • cb –TCP per –packet control information • len – actual data length • csum- checksum • protocol- packet network protocol • truesize- buffer size • head- pointer to head of buffer • data- pointer to data head • Tail- pointer to tail • End- pointer to end • Destructor-pointer to destruct function • struct timer_list { • struct timer_list *next; • struct timer_list *prev; • unsigned long expires; • unsigned long data; • void(*function)(unsigned long); • }; WOW

More Related