Tuesday, April 2, 2013

About NS2


Basic Steps for Setting Simulation Environment:

Here, we are going to introduce the concepts of:-

Part of introduction to TCP/IP model
Where can you write scripts?
Basic NS2 programming steps
Template
Golden rules
Simple Examples


1.                                  TCP/IP model 
Application Layer
                Applications agents are Telnet, FTP, CBR
 .

Transport Layer
               The transport uses two protocols, UDP and TCP. UDP which stands for User Datagram Protocol does not guarantee packet delivery and applications which use this must provide their own means of verifying delivery. TCP does guarantee delivery of packets to the applications which use it.


Network Layer
               The network layer is concerned with packet routing and used low level protocols such as ICMP, IP, and IGMP. Here Network protocols are omitted for simple examples


Link Layer
            The link layer is concerned with the actual transmittal of packets as well as IP to Ethernet address translation. Data transfer in two modes i.e. simplex mode and in duplex mode.
All the links are created at data link layer. Network layer next is to data link layer. 



                        Part of Introduction to TCP/IP Model                                                                                                   
Application LayerCBR,FTP,telnet..
Transport layerTCP,UDP
Network layerrtproto
Data link LayerTransmission mode
  • Simplex mode
  • Duplex mode
Physical layer 











Where can we/you write tcl Scripts?                                                                                                                

After login into terminal, follow step given below

1. vi filename.tcl
           It will open page, there you can write tcl scripts.

2. save file
          Press esc-> colon (shift + semicolon) ->wq (save and quit)
It save the file

3. To run tcl script
          ns filename.tcl
or 
 In case of  ubuntu operating system
1.open any editor(document)
2.there you can write tcl scripts.
3.save this with .tcl extension,i.e filename.tcl.
4.for run tcl script
     type at terminal ns filename.tcl,e.g ns DSDV.tcl,ns DSR.tcl.





No comments:

Post a Comment

Machine Learning for Agriculture

  Machine learning has the potential to revolutionize agriculture by helping farmers make more informed decisions and optimize their operati...