visualization teaching tool for simulation of osi seven ... · 4/8/2012  · importance of the osi...

8
Visualization Teaching Tool for Simulation of OSI Seven Layer Architecture Jyothsna Kethireddy and Shan Suthaharan Department of Mathematical science University of North Carolina at Greensboro NC 27402, USA [email protected] , [email protected] Abstract Computer students need to understand both the theoretical and practical aspects of computer networking. As computer science teaching methods continue to mature, experiences in mixing theory and application have been shared in the community. Combining theory and practice in a single course on computer networks is difficult because of the complexity and scale of modern networks. Classroom modeling of networks is a technique to illustrate the theoretical aspects of networking through practical models of computer networks. In this paper a visualization tool is developed and it would be useful for students to understand the difficult concepts of computer networks. It provides the design and working of network architecture, which allows communication between computer systems. This approach provides the opportunity to learn and teach computer networking. 1. Introduction OSI Seven layer architecture is designed and simulated using Java, Java Swing, JNI, C++. This program takes the data or a file as input at the source node, and then each layer passes its PDU to the layer beneath. The underlying layer then adds a header, creating its own PDU. The “data payload” for the layer waiting below is the PDU of the layer immediately above. The message starts from the highest layer and travels down its own protocol stack until it reaches the network medium (usually a wire) and reaches the router, which makes use of the routing table to find the destination node. After traveling across this router to the destination node, the message travels from the receiving nodes lowest layer and passes to the top layer. While implementing the theory behind the computer networking, the following are implemented 1. Interface 2. TCP segment 3. IP Datagram 4. Ethernet Frame and 5. Routing table. The OSI reference model, which consists of 7 layers, is the world's most popular networking architecture. It is also a good mechanism for learning about computer networks and their functionality. Each layer has three things: Functions (what are the layer's responsibility) Interface (how it is supposed to communicate with the layer above and below) Protocol (the rules on how to communicate to its peer layer on other network devices) The OSI reference model describes various functions as modular building blocks that must be provided to achieve program-to-program communications between hosts. Each functional area describes specific tasks to be performed by network hardware or software in order for the communication to take place [1]. One of the best methods for understanding the OSI model is to remember that each layer adds functionality and this functionality normally corresponds to additional administrative information being glued onto the front of the encapsulated data from the layer below. A layered model provides clean partitioning of information. If a change is made at one layer it does not mean that changes need to be made at other layers. It means that the layers are built on the independent tasks. This allows for compatibility - which is what really sums up the importance of the OSI model. This layered model is divided in to three architectures - Physical, Network and Application. Physical architecture, includes the Physical Layer and the Data Link Layer, is one of the most important layers in the OSI seven-layer architecture. The terms Ethernet, Token Ring, and other networking systems (ARCNET, Local Talk, FDDI, etc.), reference the Physical Layer and Data Link Layer descriptions of a network’s architecture [1]. Ethernet is implemented in the Physical architecture as a part of this teaching tool. In order to implement, the following Ethernet frame format is studied. Based on certain tasks, Ethernet frame consists of seven fields.

Upload: others

Post on 25-Feb-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

Visualization Teaching Tool for Simulation of OSI Seven Layer Architecture

Jyothsna Kethireddy and Shan Suthaharan Department of Mathematical science

University of North Carolina at Greensboro NC 27402, USA

[email protected], [email protected]

Abstract

Computer students need to understand both the theoretical and practical aspects of computer networking. As computer science teaching methods continue to mature, experiences in mixing theory and application have been shared in the community. Combining theory and practice in a single course on computer networks is difficult because of the complexity and scale of modern networks. Classroom modeling of networks is a technique to illustrate the theoretical aspects of networking through practical models of computer networks. In this paper a visualization tool is developed and it would be useful for students to understand the difficult concepts of computer networks. It provides the design and working of network architecture, which allows communication between computer systems. This approach provides the opportunity to learn and teach computer networking. 1. Introduction

OSI Seven layer architecture is designed and simulated using Java, Java Swing, JNI, C++. This program takes the data or a file as input at the source node, and then each layer passes its PDU to the layer beneath. The underlying layer then adds a header, creating its own PDU. The “data payload” for the layer waiting below is the PDU of the layer immediately above. The message starts from the highest layer and travels down its own protocol stack until it reaches the network medium (usually a wire) and reaches the router, which makes use of the routing table to find the destination node. After traveling across this router to the destination node, the message travels from the receiving nodes lowest layer and passes to the top layer.

While implementing the theory behind the computer networking, the following are implemented

1. Interface 2. TCP segment 3. IP Datagram 4. Ethernet Frame and 5. Routing table.

The OSI reference model, which consists of 7 layers,

is the world's most popular networking architecture. It is also a good mechanism for learning about computer networks and their functionality.

Each layer has three things:

• Functions (what are the layer's responsibility) • Interface (how it is supposed to communicate

with the layer above and below) • Protocol (the rules on how to communicate to

its peer layer on other network devices)

The OSI reference model describes various functions as modular building blocks that must be provided to achieve program-to-program communications between hosts. Each functional area describes specific tasks to be performed by network hardware or software in order for the communication to take place [1].

One of the best methods for understanding the OSI model is to remember that each layer adds functionality and this functionality normally corresponds to additional administrative information being glued onto the front of the encapsulated data from the layer below. A layered model provides clean partitioning of information. If a change is made at one layer it does not mean that changes need to be made at other layers. It means that the layers are built on the independent tasks. This allows for compatibility - which is what really sums up the importance of the OSI model. This layered model is divided in to three architectures - Physical, Network and Application.

Physical architecture, includes the Physical Layer and the Data Link Layer, is one of the most important layers in the OSI seven-layer architecture. The terms Ethernet, Token Ring, and other networking systems (ARCNET, Local Talk, FDDI, etc.), reference the Physical Layer and Data Link Layer descriptions of a network’s architecture [1].

Ethernet is implemented in the Physical architecture as a part of this teaching tool. In order to implement, the following Ethernet frame format is studied. Based on certain tasks, Ethernet frame consists of seven fields.

Page 2: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

Each field has a specific task such as synchronization, delimiter, physical addresses, data, and error detection. Ethernet does not provide any mechanism for acknowledging received frames, making it what is known as an unreliable medium. Acknowledgments must be implemented at the higher layers [2], [6].

The next most important layers in the OSI seven-layer architecture is the Network architecture, which includes the Network layer and the Transport layer. Network Layer is the OSI layer 3, and it corresponds to IP protocol and the Transport Layer is OSI layer 4 and it corresponds to TCP. These layers focus on the logical layout of the network.

The Network Layer defines the addressing and routing structure of how a series of exchanges over data links can deliver data between any two nodes in a network. It decides which physical path the data should take - based on network conditions, priority of service, and other factors. Protocols for this layer includes IP. Flow control monitors the network connections [1].

IP Datagram has been implemented in the Network layer. Packets in the IP layer are called datagram. A datagram is a variable-length packet consisting of two parts: header and data. The header can be 20 to 60 bytes and contains information essential to routing and delivery [2].

Transport layer uses Connection-Oriented Network Service (CONS) in this tool. In this layer the packets created are known as Segments. TCP segment is implemented here. TCP is considered a stream transport layer service. TCP offers full-duplex service. TCP is a reliable transport protocol. It uses the acknowledgement mechanism to check the safe and sound arrival of data [1]. In order to implement, the TCP segment format is studied which consists of different fields. Each field has a specific task such as port address, sequence number, acknowledgement, length of header, error detection, flags, etc [2].

The top three layers combine together to provide the user with the Application platform for sharing information over a network. In this tool the top three layers belong to application program, which is not implemented at this stage and so it contains only the user input.

The next most important is the Router which checks in the routing table the destination and sends the packets. Routing of data packets is an important aspect of network design. It is the network layer that is responsible for routing packets from the source machine to the destination machine. A host or a router keeps a routing table, with an entry for each destination, to route IP packets. The routing table can be either static or dynamic. In this Tool is not done as a real time project, Static Routing Table has been implemented. This static routing table contains information entered manually; it

cannot update automatically when there is a change in the Internet. The table must be manually altered. The routing table implemented has seven fields: mask, destination address, next-hop address, flags, reference-count, use, and interface [2], [3], [4]. 2. Methodology

Considering the theory discussed in introduction, this concept is implemented using Java classes (components). There are 15 classes involved. The design of the classes in this tool is as shown in Figure 1.In this methodology we used component technology so that we can add or remove classes. Classes can be Re-useable and with this technology it is easy to enhance existing design. The brief description of the classes are given below:

TopLayout class is the main class, which draws

graphical user interface (GUI) with Java Swing components and Java swing image icons. This takes user input, which passes to the source.

NetCanvas class paints computer system icons and router icons. It also implements a method to show packet flow from source to destination.

SrcDestOSILayer class brings up another window with OSI layers of source and destination systems with the given IP addresses and also the router.

SendPackets class reads from input text area and divides the input data into 8-byte packets each and sends them from source to destination.

Pkt class reads given input file and sets data to source text area.

Checksum class calculates checksum of the data packets by converting the complete information into binary form and divides into 2 arrays with MSB (most significant bits) and LSB (least significant bits) each with 16bits and returns checksum value.

CalCRC class uses JNI techniques to call CRC C++ program, which calculates the CRC for the given packet using CRC-32.

MyTableModel class constructs a data model for routing table.

SrcIPDatagram class is implemented to display the source IP datagram dialog box with all latest values of IP datagram, when clicked on the source network layer for the packet information.

DestIPDatagram class is implemented to display the destination IP datagram dialog box with all latest values of IP datagram, when clicked on the destination network layer for the packet information.

SrcTCPSegment class is implemented to display the source TCP segment dialog box with all latest values, when clicked on the Transport layer at the source for the packet information.

Page 3: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

DestTCPSegment class is implemented to display the destination TCP segment dialog box with all latest values, when clicked on the transport layer at the destination for the packet information.

SrcEthernetFrame class is implemented to display source Ethernet frame dialog box with all latest values, when clicked on physical and data link layer at the source for packet information.

DestEthernetFrame class is implemented to display destination Ethernet frame dialog box with all latest values, when clicked on physical and data link layer at the destination for packet information.

RoutingTable class is implemented to display routing table when clicked on the router.

In the implementation the classes, NetCanvas,

SrcDestOSILayer, SendPackets, Pkt, Checksum, CalCRC, and MtTableModel are derived form the TopLayout class , and therefore, the TopLayout class has to be used first. Referring to Figure 1, these classes communicate at the source and the destination nodes of a simulated computer networks. For example,

At the source node: The SrcIPDatagram class is

implemented in the network layer, which makes use of the TCP segment that comes from the SrcTCPSegment class, and generates the data for the IP datagram. Similarly, SrcEthernetFrame class is implemented in the Physical, and Data link layers, and it makes use of the IP datagram and generates the data for the Ethernet frame.

At the destination node: The DestIPDatagram class makes use of the DestEthernetFrame class, as the IP datagram is nothing but the data in the Ethernet frame, which is obtained after removing the physical layer header. Also the DestTCPSegment class makes use of the DestIPDatagram class, as the TCP segment is the data in the IP datagram, which is obtained after removing the Network layer header.

To display this information in the respective layers, these classes inherit SrcDestOSILayer class. 3. Simulation results

The user can input data or a file using ‘Open File’ option, then, enter the source and destination IP addresses for sending the protocol data unit (PDU’s). If user wants to set a delay for a packet going through the layers, the user can do so by enabling the checkbox shown in the graphical user interface (GUI). Delay need to be set in milliseconds only. When clicked on ‘Send’ button you get another GUI, which shows the OSI layers of the source and destination nodes. The user will also see the packet moving from one layer to another with a blinking action, (See Fig 2). When clicked on each layer

its respective packet information is displayed except for the top three layers, which belong to the application programs. The system also displays the routing table when click on the intermediate system( e.g router). See Figs. 3-7.

4. Conclusion

In this paper we have presented a Visualization teaching tool for OSI Seven Layer Architecture and it provides the sophisticated technique for understanding and teaching the difficult concepts of computer networks. This tool gives the visual picture of how the packets travel in layers and how the header is added to the packets. It help the students and encourages them to learn the functioning of the network architecture. It satisfies (i) the unavailability of a teaching tool; (ii) Understanding how the seven-layer architecture works; and (iii) Understanding communication between the hosts and other devices such as routers. This can also be used for research. But however some future work needs to be done to make it completely reliable tool for research. 5. Future work

As this project is the initial implementation, it is not implemented as a real time project, so only the initial simulation has been done and the remaining is left for the future work.

Some of the implementation has been left for the future work like:

1. Packet fragmentation and reassembly. 2. Adding more network interfaces and more routers. 3. Redesigning the routing table dynamically. 4. Enhance this project to implement real time packet

transfer. 5. Build new software for creating icons for this tool,

which can be dragged and dropped to create a new network. Once a network has been built it should be linked to the software of this tool to show the simulation and the working of the network.

6. In this tool packet size has been taken as 8- bytes by

default, but this can be changed to variable size, for the user to study the flow for different packet sizes.

Page 4: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

6. Benefits 1. The tool is extremely useful for students, as it

clearly and visually explains all the layers involved in OSI Seven Layer architecture.

2. It gives a clear picture of the protocols and their

formats present in the layers. 3. It gives a visual presentation of packet flow from

layer to layer, which is extremely useful for the students who are new to this field.

4. It gives students networking basics and better

understanding of how communication happens between the systems in the network.

5. This tools is great useful for Instructors of Computer

Networking course, to teach OSI seven layers and their formats through visualization-teaching tool in order to have better understanding of the subject.

6. This tool gives students the idea of having Visual Tool for better understanding. In future they can develop their own visual tools to explain to others.

7. We used component technology in the design, which

helps students the importance of component technology and implement in their own designs.

7. References [1] On-line information: http://www.wagoneers.com [2] B. A.Forouzan , TCP/IP Protocol Suite, McGraw-Hill, USA, 2000. [3] D. E. Comer , Computer Networks and Internets , Prentice-Hall, USA, 2nd Edition, 1999. [4] D. E. Comer, Internetworking with TCP/IP, vol. 1 , and vol2, Prentice-Hall, USA, 3rd edition, 1995. [5] F. Halsall, Data Communications, Computer Networks and Open systems, Addison-Wesley, USA, 4ht edition, 1995. [6] On-line information: www.createwindow.com

Page 5: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

Fig 1: Design

TopLayout

MyTableModel

CRC

CheckSum SrcDestOSILayer

SendPacketNetCanvas Pkt

SrcIPDatagram SrcEthernetFrame

SrcTCPSegment

RoutingTable

DestIPDatagram

DestTCPSegment

DestEthernetFrame

Page 6: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

Fig 2: OSI Seven Layer Simulation

Page 7: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

Fig 3: OSI Seven Layer of Source and Destination nodes

Fig 4: TCP Segment

Page 8: Visualization Teaching Tool for Simulation of OSI Seven ... · 4/8/2012  · importance of the OSI model. This layered model is divided in to three architectures - Physical, Network

Fig 5: IP Datagram

Fig 6: Ethernet Frame

Fig 7: Routing Table