NETWORK SIMULATOR - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

NETWORK SIMULATOR

Description:

Define geographical distribution. Define the functional parameters of the network nodes. ... Define network layer protocols. Define traffic characteristics down ... – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 21
Provided by: mustaf5
Category:

less

Transcript and Presenter's Notes

Title: NETWORK SIMULATOR


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

2
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
  • Network Modules
  • Drive the event.
  • Analyzer output
  • Statistical graphing tool.
  • Visual Tracer output
  • Packet-level visualization tool. (NAM)

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

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
5
Scheduler Algorithm
  • struct event
  • struct event next
  • struct event prev
  • unsigned long expiration
  • unsigned long data
  • void (handler)(unsigned long)

6
Event Scheduler
  • add_timer( event ev)
  • delete_timer(event ev)
  • mod_timer(event ev)
  • while(1)
  • tmptake_event()
  • update_clock
  • update_position
  • tmp.handler()

SIMULATOR
Event Queue
add_event
take_event
7
Event Queue
Event Queue
CHANNEL
Packet transmission
tx_1
timer_7
tm_7
rx_5
rx_2
rx_1
  • Packet Transmission
  • Timer initialization

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
9
Architecture
  • Overall Design

SIMULATOR MODULE
LINUX MODULES
CHANNEL MODULE
VISUAL TRACER GUI
DEV1
DEV2

DEV3
INFO
INFO
INFO
ANIMATOR GUI
State List
State List
State List
ANALYZER GUI
SCHEDULER
10
Interface
  • Initialize_simulation
  • Initialize_topology
  • Initialize_traffic
  • Initialize_record_function
  • Main Loop

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)

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)

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)

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)

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.

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

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

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

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.
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)
Write a Comment
User Comments (0)
About PowerShow.com