• No results found

OPENSHORTESTPATHFIRST SIMULATOR

N/A
N/A
Protected

Academic year: 2020

Share "OPENSHORTESTPATHFIRST SIMULATOR"

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)

OPEN SHORTEST PATH FIRST

SIMULATOR

BY USING JAVA RMI

Er. Monika Gupta

Assistant Prof. : Ludhiana College Of Engineering And Technology, Ludhiana, Punjab, INDIA

Email: [email protected]

Virpal Kaur

Ludhiana College Of Engineering And Technology, Ludhiana, Punjab, INDIA

Email: [email protected]

Abstract

In essence, internet protocol is the most essential component of communication system for data transfer and routing. Routing is achieved by routing protocols. Researchers have defined different protocols to make routing more reliable. In this paper main focus of research is to explore the Open Shortest Path First protocol and develop a simulator to explain the functionality of OSPF. This project Simulator has been developed by on the basis of Java RMI. The main reason behind using Java RMI is to develop a robust system such that simulator can easily replicated original idea of OSPF. This project implements the complete OSPF protocol such as creation of routing table on the basis of minimum cost, find shortest path, load balancing etc. This project also implements concept of distributed system . The JAVA features have been used and RMI remote objects are used as routers to simulate different routers and interfaces.

Keywords: OSPF, JAVA RMI , Client, Stub and Skeleton.

1 INRODUCTION

1.1 OSPF (Open Shortest Path First)

OSPF (Open Shortest Path First) is an interior gateway protocol. OSPF is a classless link state protocol. OSPF is standardized and widely deployed in public and private networks. According to McQuerry Steve (2004); [1],[2]“OSPF is routing protocol developed for Internet Protocol (IP) networks by Interior Gateway Protocol (IGP) working group of the Internet Engineering Task Force (IETF).” To understand the OSPF one needs to read about distance[11] vector and static routing before; which is out of scope of this project. Hence, for the better understanding of reader the explanation of OSPF is divided into sub-parts based upon the characteristic of OSPF.

(2)

indicates the information about the interface. Hence, link state is a database that includes the description of interface and its relation to neighbour routers.

 OSPF is also known as hierarchical routing protocol because of its ability to divide the large areas into small multiple areas This includes the concept of area routers and edge routers. Area routers routes within the area while edge routers provide the facility for routing between the multiple areas[5][9]. Each area is associated with an area number (also known as autonomous number system). The backbone area is always having area number 0. The areas are also divided into the backbone area, stub area, totally stub area and not-so-stubby area based upon the organisation requirements. The basic idea is to implement the one area first and further implementation of the multiple areas.

 OSPF uses the SPF (Shortest Path First) algorithm to calculate the cost. SPF works in tree structure to calculate the cost from root. Root is the router from which cost is calculated to other routers. This algorithm is known as the DijKstra’s algorithm. McQuerry Steve (2004) [1]states; “ SPF algorithm places each router at the root of a tree and calculates the shortest path to each destination based upon the cumulative cost to reach that destination”. In this project, SPF is simulated to describe the concept of distributed system in order to create the database on the basis of minimum cost.

1.2 OSPF offers a number of key benefits:

C: Cost-based routing metrics - Unlike RIP, OSPF supports descriptive [6]metrics to indicate the bandwidth and capability of each individual network link. This gives administrators great flexibility in engineering networks.

M: Multi-path routing - OSPF is able to support multiple routing paths to a given destination, giving routers a choice in deciding how to balance data forwarding over multiple paths. This increases the capability to implement load balancing and redundancy.

D: Dijkstra’s Shortest Path First algorithm - This fundamental capability of OSPF allows it to calculate a cost to every destination in the network.

2.Advancement of ospf protocol 2.1 OSPF Cost

The cost (also called metric) of an interface in OSPF is an indication of the overhead required to send packets across a certain interface. The cost of an interface is inversely proportional to the bandwidth of that interface. A higher bandwidth indicates a lower cost. There is more overhead (higher cost) [6]and time delays involved in crossing a 56k serial line than crossing a 10M ethernet line. The formula used to calculate the cost is:

 cost= 10000 0000/bandwidth in bps

2.2 Routing table calculation

This section details the OSPF routing table calculation. Using its attached areas' link state databases as input, a router runs the algorithm, building its routing table step by step. At each step, the router must access individual pieces of the link state databases (e.g., a router links advertisement originated by a certain router)[7][8].

With the shortest paths in hand, filling in the routing table is trivial.

For any given destination node, the best next hop for that destination is the node which is the first step from the root node, down the branch in the shortest-path tree which leads toward the desired destination node.

(3)

Although link state protocols are rightly considered more complex than distance vector protocols, the basic functionality is not complex at all:

1. Each router establishes a relationship—an adjacency—with each of its neighbors. 2. Each router sends link state advertisements (LSAs), some

3. Each router stores a copy of all the LSAs it has seen in a database. If all works well, the databases in all routers should be identical.

4. The completed topological database, also called the link state database, describes a graph of the internetwork. Using the Dijkstra algorithm, each router calculates the shortest path to each network and enters this information into the route table.

3 Methods

3.1 Java RMI (Remote Method Invocation):

Remote Method Invocation (RMI) represents a higher level view of networking than sockets. Much of the low level system is hidden from the programmer[4]. In particular, a protocol, the RMI protocol, is provided for you. A difficult and error prone programming situation is avoided.

Remote method invocation allows applications to call object methods located remotely, sharing resources and processing load across systems. Unlike other systems for remote execution which require that only simple data types or defined structures be passed to and from methods, RMI allows any Java [12][13]object type to be used - even if the client or server has never encountered it before. RMI allows both client and server to dynamically load new object types as required. In this article, you'll learn more about RMI

.

Basic Steps: RMI

1. Define (or locate) the remote interface in agreement with the server. 2. Write your server.

3. Run rmic (Java RMI stub compiler) to generate the network glue. 4. Write the client.

5. Ensure that the RMI registry is running. 6. Start the server.

7. Run one or more clients.

(4)

Figure :Java RMI Client Server Modules

Proxy: The RMI Proxy is an application firewall or application proxy. It does for RMI what an HTTP proxy does for HTTP—and more. Provided that any associated TCP/IP firewall permits access to the designated RMI Proxy ports, the RMI Proxy controls traffic through it, providing two critical security functions:

• it enforces the RMI protocol: any other protocol (such as HTTP, Telnet, &c) is rejected

• it provides access control, down to the class and method level, over remote objects being

accessed

Communication Module: Communication Module resides in both client and server. It carries out Request and Reply jointly. The communication module is used by the server to send messages back and fourth to the client. The communication module uses a request reply protocol .When the request has completed the dispatcher returns the message to the communication module and it sends a reply message back to the client.

Dispatcher: The dispatcher class is responsible for finding a skeleton that can handle the method call that was requested by the client. The dispatcher locates the skeleton for a remote object reference in the remote reference table on the server. The dispatcher then gets the name of the method to be invoked and the arguments of the method from the message sent from the client. The dispatcher invokes the method on the skeleton object. When the skeleton completes, it returns the results back to the dispatcher, which then returns the results back to the server.

RMI Stub and Skeleton : The skeleton is used to unmarshal and then marshal a message. When the dispatcher invokes a method on the skeleton[10] it passes it the message that was received from the communication module. Once a method is invoked on a remote object, the results are returned to the skeleton, which eventually returns the results to the client application.

• A client invokes a remote method; the call is first forwarded to stub.

• The stub is responsible for sending the remote call over to the server-side skeleton

• The stub opening a socket to the remote server, marshaling the object parameters and forwarding the data stream to the skeleton.

(5)

Since the two objects may physically reside on different machines, a mechanism is needed to transmit the client's request to invoke a method on the server object to the server object and provide a response. Java-RMI uses an approach similar to RPC in this regard. The code for the server object must be processed by an RMI compiler called rmic, which is part of the JDK.

The rmic compiler generates two files: a stub and a skeleton. The stub resides on the client machine and the skeleton resides on the server machine. When a client invokes a server method

the

JVM looks at the stub to do type checking. The request is then routed to the skeleton on the server, which in turn calls the appropriate method on the server object. In other words, the stub acts as a proxy to the skeleton and the skeleton is a proxy to the actual remote method.

Remote Reference Module: The Remote Reference Module is used to store the remote object references and skeleton for a remote object. The main use of the remote object reference module on the server is for the dispatcher to locate a reference to a skeleton object from a remote object reference.

4 Specifications of OSPF simulator

The basic idea of the project is to develop and demonstrate the concept of a distributed system. To achieve this, the option begins to develop the OSPF simulator; which implements the concepts of the [3]distributed computing environment. This section includes the clear specification (in other words a clear statement of what user wants to system to do) of the system, which can be given as:

1. To develop a router simulator; which includes six routers (topology shown in Figure .Each router has three interfaces; in which two interfaces are the external interfaces (which are linked with other routers) and one interface is local interface (which is connected to the local network). Along this, each external interface has cost associated with it.

2. Create the general interface to show the router is up. And which describes the:

o IP address of each interface.

o Router name.

o Default cost associated with each interface.

3. Create a general packet structure; which is divided into different sub types.

 Hello Packet; it is the default packet send by router after fixed interval of time to show the status that router is up

 Packet Type: Hello.

 Version: shows OSPF version running on router.  Router Id: Shows the router Id to identify router.  Area number: Shows the OSPF area number.  Router name: Shows user-friendly name.

 Data base Description Packet; is on demand packet. In other words; to see the data base user needs to type command. Data base description packet includes the information about:

 All attributes of hello packet.

 Minimum cost for each destination within area.  Minimum cost path information.

 Source name and destination name.

 Source IP address and destination IP address.

 Link state request packet; is also on demand packet. Link state request packet includes the information about:  IP address of each interface.

 Router name.

 Default cost associated with each interface.

(6)

 Link-state acknowledgement; this packet is send back by each router when they receive the link-state update packet.

4. To implement all these concepts; the basic idea is to start with the default topology, cost and IP addresses provided to routers and implementation of Open Shortest Path First algorithm to calculate the minimum cost for each link. Along this, providing the facility to use to change the cost and IP addresses and providing a fully connected mesh topology.

5. The starting of implementation is using the topology shown in Figure After this, the criterion is to implement the fully connected mesh topology and the concept of the multiple areas using the border routers.

6. Creation of six clients associated with each router; to allow them send data to each other using the path with the minimum cost.

7. Making the simulator to adaptable to changes. Path change can be defined as:  Change in the cost.

 Load balancing.

 If any one of router is down diverting the traffic from other route.

180.09.0.0/16 (3) I2 I1

I1 I2 11.0.0.0/8 (2) 159.215.0.0/16 (2) I1 I1

192.168.10.0/24 I2 I2

169.25.0.0/16 (4) 110.0.0/8 (5)

I1 I2 I2 I1

160.09.0.0/16 (2) Fig: six routers with different interfaces and IP address

I1 represents the INTERFACE 1 and I2 represents the INTERFACE 2.each interface has network address and cost associated.

ROUTER 

ROUTER 3

ROUTER 4

ROUTER 5

ROUTER 6 

ROUTER     

(7)

5 RESULTS & DISCUSSION Execution

This section explains the steps to run the simulator and includes the test results. The OSPF simulator is developed using Java as programming language. Hence, it is capable to run on Windows environment.

Execution steps: To run simulator in Unix environment a script is provides. The steps are:  Run Command Prompt.

 Set the Path to Java’s bin directory.  Change directory to OSPF.

 Compile all the files in different windows (command prompt) with ‘javac’ compiler  Compile router files with ‘rmic’ compiler.

 Run rmiregistry.

 Run Router6, then Router5 up to Router1 in different command prompt.  Run RMIdisplay.java in different command prompt.

 Check and verify the results.

Testing:

Initialisation: when router comes up it searches for neighbours and create the database. Along this, start sending the hello packets to keep synchronization with neighbors.

start sending the hello packets to keep synchronization with neighbors.

(8)

To change the Cost (router1 as test result), it provides the facility to change the cost from a remote program for any router. The remote program is referred as RMIdisplay. Along this, one can either change the cost of one interface or both. Figure shows the new database after changing the cost for the interface1 for router1.

.

Figure: changing cost

6.Conclusion

(9)

the shortest path is calculated routers exchange the database packets. The other advantage is routers are calculated dynamically. Now if new router joins the network or change in cost then the database is updated automatically

7.References :

[1] McQuerry, S., (2004), “CCNA Self-Study: Interconnecting Cisco Networking Devices”, 2nd Edition., Cisco Press, Indianapolis, IN 46240

USA

[2] Teare D., 2007, Building Scalable Cisco Internetworks (BSCI), 3rd Edition, Cisco Press, Indianapolis, IN 46240 USA

[3] Tanenbaum Andrew S. and Steen Maarten van., 2002., Distributed systems : principles and paradigms., 2nd Edition., Prentice Hall., Upper

Saddle River, N.J.

[4] Asbury Stephen and Weiner Scott R., 2001., Developing Java Enterprise Applications., 2nd Edition., Wiley computer publishing., USA

[5] John T. Moy, Ospf: Anatomy of an Internet Routing Protocol Book Description, 2nd Edition, Addison-Wesley Professional, USA

[6] Zhou Haijun , Pan Jin & Shen Pubing , Cost adaptive OSPF, 3rd Edition, Lab. of Network Eng., Xi'an Commun. Inst., China

[7] B. Fortz and M. Thorup, "Internet traffic engineering by optimizing OSPF weights," in Proc. IEEE INFOCOM, 2000, pp. 519-528.

[8] B. Fortz, J. Rexford, and M. Thorup, "Traffic engineering with traditional IP routing protocols," IEEE Commun. Mag., vol. 40, no. 10, pp.

118-124, Oct 2002.

[9] G. Rétvári and T. Cinkler, "Practical OSPF traffic engineering," IEEE Commun. Lett., vol. 8, no. 11, pp. 689-691, Nov 2004.

[10] Sanjay P.Ahjuja and Renato Quinato. “Performance Evaluation of Java RMI : Distributed Object Architecture for Internet Based

Applicaions. 0-7695-0728-X/00 C 2000 IEEE.

[11] H3C Technologies Co., Limited., 2004-2008., OSPF Introduction [Online]. Available from:

http://www.h3c.com/portal/ProductsSolutions/Technology/IP_Routing/OSPF/200702/201240_57_0.htm.

[12] Sun Microsystems (a), 1994-2008., Message Oriented Middleware [Online]. Available from:

http://docs.sun.com/app/docs/doc/819-4470/gbpdl?l=ko&a=view

[13] Sun Microsystems (b)., 2001., Java Remote Method Invocation [Online]. Available from:

Figure

Figure :Java RMI Client Server Modules
Figure (Status of Routers)

References

Related documents

Conversely, 43.7% of all respondents who misused prescription drugs met criteria for alcohol dependence, problem gambling, and (or) had used illicit drugs in the past year..

According to the statistics of the International Labor Organization (ILO) (2017), 386 million people out of the total working- age population in the world are

Planning for the 1999 Iowa Oral Health Survey began in the spring of 1999 and included personnel from the Dental Health Bureau of the Iowa Department of Public Health,

If the roll is equal to or higher then the model's shooting skill then it hits and wounds as described in close combat.. If the roll was lower then the model's shooting skill then

More precisely, we discuss the parallelization of data mining algorithms of four knowledge discovery paradigms, namely rule induction, instance-based learning, genetic algorithms

Vy´sledek je pomeˇrneˇ uspokojivy´, ale mnoho hran vlivem sˇumu nebylo detekova´no. Za b) jsme zasˇumeˇny´ obraz nejprve odsˇumili pomocı´ metody VisuShrink s

„ Certifies you to represent clients involved in negotiating an IRS appeal — a premium service that can lead to other..

If we include only age and con- trol variables in our models (see probit model 1 and count model 1), we find a inverse u-shaped effects for the count model explaining the number