Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

DECLARATION

We hereby declare that the project work entitled as Simulation of Network Protocols, is done
by us for the partial fulfilment of the requirements for the degree of Bachelor of Technology
(B.Tech) under the guidance of Ms Prabha Gupta. The matter embodied in this project work has
not been submitted earlier for award of any degree or diploma to the best of my knowledge and
belief.

TANYA NANDA
Enroll no. 16113302710

ANKITA VERMA
Enroll no. 16513302710

NIYATI JAIN
Enroll no. 17213302710

CERTIFICATE
This is to certify that the project entitled SIMULATION OF NETWORK PROTOCOLS
submitted by Tanya Nanda, Ankita Verma and Niyati Jain to the Department of Computer
Science, HMR Institute of Technology & Management, New Delhi-36 for the partial fulfilment
of the requirements of the Minor-Project of Bachelor of Technology, is a record of the original
bonafide project work carried out by them under my supervision and guidance.
The results contained in this report have not been submitted in part or full to any other University
or Institute for the award of any Degree, Diploma or Certificate.

Ms PRABHA GUPTA
Assistant Professor
Department Of Computer Science & Engineering
HMRITM

ii

ACKNOWLEDGEMENT
It gives us great pleasure in proliferation of this project during the academic year 2013
denominated Simulation of Network protocols. I express my sincere gratitude to the HOD of
Computer science Dept. Mr. Anil Kr. Vats , our proctors Mr. Ravinder Beniwal and Mrs.
Asha Pahuja and last but not the least our guide, Ms Prabha Gupta, for her valuable guidance,
proper advice and constant encouragement under her tutelage. Last but not the least, I wish to
express my sincere thanks to all our professors, friends and colleagues who helped us directly or
indirectly in the completion of this project.

TANYA NANDA
Enroll no. 16113302710

ANKITA VERMA
Enroll no. 16513302710

NIYATI JAIN
Enroll no. 17213302710

iii

ABSTRACT
The well planned, minor project helps a lot in including good team culture. It plays a very
important role in the engineering course of the student because this helps him/her in gaining
tremendous knowledge & experience as he/she can learn about the bundle of things which cant
be learnt in campus, so these projects are added in the course by various universities.
The project has been developed using Java language providing a good user interface. The project
will aid in understanding the key development concepts related to programming in Java for
customer requirement. The study would be exploratory in nature & hopefully lay the foundation
for future work in this area.
The project Simulation of Network Protocols is an application Software developed using
Java (Eclipse IDE) as front-end. It is an offline system that is used to simulate networking
protocols like Go back N and Selective Repeat using java concepts like applet etc. Throughout
the project the focus has been on presenting information and comments in an easy and
intelligible manner.

iv

CONTENTS
1. Introduction...................................................................................................................1
1.1 What is Simulation.1
1.1.1

Definition1

1.1.2

Types.......2

1.2 Encapsulation and Layered Communication..3


1.2.1 Encapsulation Illustration4
2. System Overview..........................................................................................................6
2.1 Product Perspective........6
2.2 Product Function........6

3. System Analysis...........................................................................................................7
3.1. Scope.....................................................................................................................7
3.2. Need for the Proposed System..............................................................................7
4. Software Requirement Specification............................................................................8
4.1. Modules and its Description..................................................................................8
4.1.1 Encapsulation.8
4.1.2 Protocols...9
4.1.3 Decapsulation.14
4.2. Functional Requirements.............................................................................15
4.3. Performance Requirements........................................................................... .15
4.4. Non Functional Requirements................................................................... .....16
4.5. External Interfaces Requirements........................................................................16
v

4.5.1. User Interface............................................................................................16


4.5.2. Hardware Interface...................................................................................17
4.5.3. Software Interface...................................................................................17
4.6. General Constraints, Assumptions, Dependencies, Guidelines.......................... 17
4.6.1. General Constraints..................................................................................17
4.6.2. Assumptions and Dependencies...........................................................18
5. Technology Description..19
5.1 Java...19
6. System Design Specification .....................................................................................27
6.1. Flow Chart...........................................................................................................27
6.2. Sequence Diagrams.28
6.2.1 Ideal case in go back n and selective repeat..28
6.2.2 Frame lost in Go Back n....29
6.2.3 Acknowledgment lost in Go Back n.30
6.2.5

Frame lost in Selective Repeat..31

6.2.5 Acknowledgment lost in Selective Repeat..32


6.3 Collaboration Diagrams.................................................33
6.3.1 Ideal case in go back n and selective repeat...33
6.3.2 Frame lost in Go Back ...33
6.3.3 Acknowledgment lost in Go Back n...........34
7. Project Feasibility Study.............................................................................................36
vi

7.1 Technical Feasibility...37


7.2 Schedule Feasibility...37
7.3 Operational Feasibility....38
7.4 Economic Feasibility......39
8. Literature Review.......................................................................................................40
9. Methodology Used......................................................................................................41
9.1 Selection of Methodology.41
9.2 Software Development Methodology...41
9.3 Why using his methodology.43
9.4 Project Stages....45
9.5 Research and Planning..45
9.6 Analysis46
9.7 Design...46
9.8 Implementation.46
9.9 Development.46
9.10 Support46
10. Testing........................................................................................................................48
10.1 Levels of Testing................................................................................................48
10.2 Unit Testing....48
10.3 System Testing49
10.4 Integration Testing..50
10.5 Test Cases...50
10.5.1For Go Back N.50

vii

10.5.2 For Selective Repeat...56


11. Maintenance..62
12. Conclusion and Future Extension.64
13. References.66
14. Appendix...67
Appendix-A..67
Appendix-B......71
Appendix-C..73
Appendix-D..84
15. Checklist...87

viii

LIST OF TABLES
Table No.

Page No.

Table 1: Depicts the PDU names at different layers...3


Table 2: Test cases for Go back N protocol.84
Table 3: Test cases description for Selective Repeat Protocol85

ix

LIST OF FIGURES
Figure No.

Page No.

Figure 1: Encapsulation occurs at different layers.....8


Figure 2: Encapsulation of data at various layers of TCP/IP Model .....9
Figure 3: Go Back N in operation.11
Figure 4: Selective Repeat in operation .......13
Figure 5: Encapsulation of data at various layers of TCP/IP Model ...15
Figure 6: Program Execution20
Figure 7: Platform Independent21
Figure 8: Program Execution on different platforms26
Figure 9: Flow chart for whole application..27
Figure 10: Sequence diagram for ideal case.28
Figure 11: Sequence diagram for lost frame and time out in Go Back N........................29
Figure 12: Sequence diagram for lost acknowledgement in Go Back N..30
Figure 13: Sequence diagram for lost frame and time out in Selective Repeat...31
Figure 14: Sequence diagram for lost acknowledgement in Selective Repeat.32
Figure 15: Collaboration diagram for ideal case...33

Figure 16: Collaboration diagram for lost frame and time out in Go Back N......33
Figure 17: Sequence diagram for lost acknowledgement in Go Back N .34
Figure 18: Collaboration diagram for lost acknowledgement in Selective Repeat ....35
Figure 19: Collaboration diagram for lost frame and time out in Selective Repeat ...35
Figure 20: Spiral Model ................42
Figure 21: Test case1 frame sent by sender........51
Figure 22: Test case1 frame received by receiver.....................51
Figure 23: Test case 2 acknowledgement sent.....52
Figure 24: Test case 2 acknowledgement received.52
Figure 25: Test case3 resend frame after timeout .............................53
Figure 26: Test case 3 acknowledgement for resent frames.......53
Figure 27: Test case 3 acknowledgement received ..................................................54
Figure 28: Test case4 frame killed54
Figure 29: Test case 4 acknowledgement for received frames55
Figure 30: Test case 4 killed frame resend after time out55
Figure 31: Test case 4 acknowledgement received..56
For Selective Repeat

xi

Figure 32: Test case1 frame sent by sender........56


Figure 33: Test case1 frame received by receiver.....................57
Figure 34: Test case 2 acknowledgement sent.....57
Figure 35: Test case 2 acknowledgement received.58
Figure 36: Test case3 resend frame after timeout .............................58
Figure 37: Test case 3 acknowledgement for resent frames.......59
Figure 38: Test case 3 acknowledgement received ..................................................59
Figure 39: Test case4 frame killed60
Figure 40: Test case 4 acknowledgement for received frames and buffered...60
Figure 41: Test case 4 killed frame resend after time out.61
Figure 42: Test case 4 acknowledgement received..61
Figure 43: Application Interface...73
Figure 44: Depicts Encapsulation.73
Figure 45: For selecting the protocol74
Figure 46: Go Back N Interface74
Figure 47: Sending Frame75
Figure 48:Receiving Acknowledgement..75

xii

Figure 49: Kill Frame...76


Figure 50: Acknowledgement of left frames being sent..76
Figure 51: When time out occurs.77
Figure 52: Selective Repeat interface...77
For selective repeat
Figure 53: Sending Frame78
Figure 54: Receiving Acknowledgement....78
Figure 55: Kill Frame...79
Figure 56: Acknowledgement of left frames being sent..79
Figure 57: When time out occurs.80
Figure 58: Depicts Decapsulation80
Web Integration Version
Figure 59: Application Interface...81
Figure 60: Depicts Encapsulation.81
Figure 61: For selecting the protocol82
Figure 62: Go Back Interface...82
Figure 63: Selective Repeat Interface...83

xiii

You might also like