Network Traffic Routing Using Neural Network Engineering Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

This application is designed to check the efficiency of the packets send in the different topology. We will be sending out packets from one client system to another client system via routing. We will be using different types of algorithm to test the efficiency of packets send.

By this we can know that what topology should be used in our network to make it more efficient and the packets will move faster. we are checking which topology is best for reducing the traffic and increasing the efficiency of the packets travelling within the node.

PROJECT PURPOSE

The purpose of the project is we are checking which topology is best for reducing the traffic and increasing the efficiency of the packets travelling within the nodes. We are also sending the packets through the shortest distance.

PROJECT SCOPE

By this we can know that what topology should be used in our network to make it more efficient and the packets will move faster.

So that the packets send should be reached safely and faster within the network without damage.

PROJECT OUTLINE

Packets send should be reached safely and faster within the network.

PROBLEM DEFINATION

The packets transferred from the server to the client or client to the server. The packet my be broken, lost , damaged within the network.

EXISTING SYSTEM AND PROBLEMS

In the existing system the packets transferred from the server to the client or client to the server. The packet my be broken, lost ,damaged within the network.

PROPOSED SYSTEM

In the existing system the packets transferred from the server to the client or client to the server. The packet my be broken, lost, damaged within the network. In the proposed system we are checking which topology is best for reducing the traffic and increasing the efficiency of the packets travelling within the nodes. We are also sending the packets through the shortest distance.

MODULES

  • Client
  • Server
  • Router

Neural Network

This site is intended to be a guide on technologies of neural networks, technologies that I believe are an essential basis about what awaits us in the future. The site is divided into 3 sections: The first one contains technical information about the neural networks architectures known, this section is merely theoretical, The second section is set of topics related to neural networks as: artificial intelligence genetic algorithms, DSP's, among others.

And the third section is the site blog where I expose personal projects related to neural networks and artificial intelligence, where the understanding of certain theoretical dilemmas can be understood with the aid of source code programs. The site is constantly updated with new content where new topics are added, this topics are related to artificial intelligence technologies.

Artificial neural network

An artificial neural network is a system based on the operation of biological neural networks, in other words, is an emulation of biological neural system. Why would be necessary the implementation of artificial neural networks? Although computing these days is truly advanced, there are certain tasks that a program made for a common microprocessor is unable to perform; even so a software implementation of a neural network can be made with their advantages and disadvantages.

Advantages:

· A neural network can perform tasks that a linear program cannot.

· When an element of the neural network fails, it can continue without any problem by their parallel nature.

· A neural network learns and does not need to be reprogrammed.

· It can be implemented in any application.

It can be implemented without any problem.

Disadvantages:

· The neural network needs training to operate.

· The architecture of a neural network is different from the architecture of microprocessors therefore needs to be emulated.

· Requires high processing time for large neural networks.

Another aspect of the artificial neural networks is that there are different architectures, which consequently requires different types of algorithms, but despite to be an apparently complex system, a neural network is relatively simple.

Artificial neural networks (ANN) are among the newest signal-processing technologies in the engineer's toolbox. The field is highly interdisciplinary, but my approach will restrict the view to the engineering perspective. In engineering, neural networks serve two important functions: as pattern classifiers and as nonlinear adaptive filters. I will provide a brief overview of the theory, learning rules, and applications of the most important neural network models.

Definitions and Style of Computation. An Artificial Neural Network is an adaptive, most often nonlinear system that learns to perform a function (an input/output map) from data. Adaptive means that the system parameters are changed during operation, normally called the training phase . After the training phase the Artificial Neural Network parameters are fixed and the system is deployed to solve the problem at hand (the testing phase ). The Artificial Neural Network is built with a systematic step-by-step procedure to optimize a performance criterion or to follow some implicit internal constraint, which is commonly referred to as the learning rule . The input/output training data are fundamental in neural network technology, because they convey the necessary information to "discover" the optimal operating point. The nonlinear nature of the neural network processing elements (PEs) provides the system with lots of flexibility to achieve practically any desired input/output map, i.e., some Artificial Neural Networks are universal mappers . There is a style in neural computation that is worth describing.

An input is presented to the neural network and a corresponding desired or target response set at the output (when this is the case the training is called supervised ). An error is composed from the difference between the desired response and the system output. This error information is fed back to the system and adjusts the system parameters in a systematic fashion (the learning rule). The process is repeated until the performance is acceptable. It is clear from this description that the performance hinges heavily on the data. If one does not have data that cover a significant portion of the operating conditions or if they are noisy, then neural network technology is probably not the right solution. On the other hand, if there is plenty of data and the problem is poorly understood to derive an approximate model, then neural network technology is a good choice. This operating procedure should be contrasted with the traditional engineering design, made of exhaustive subsystem specifications and intercommunication protocols. In artificial neural networks, the designer chooses the network topology, the performance function, the learning rule, and the criterion to stop the training phase, but the system automatically adjusts the parameters. So, it is difficult to bring a priori information into the design, and when the system does not work properly it is also hard to incrementally refine the solution. But ANN-based solutions are extremely efficient in terms of development time and resources, and in many difficult problems artificial neural networks provide performance that is difficult to match with other technologies. Denker 10 years ago said that "artificial neural networks are the second best way to implement a solution" motivated by the simplicity of their design and because of their universality, only shadowed by the traditional design obtained by studying the physics of the problem. At present, artificial neural networks are emerging as the technology of choice for many applications, such as pattern recognition, prediction, system identification, and control.

Introduction

The power and usefulness of artificial neural networks have been demonstrated in several applications including speech synthesis, diagnostic problems, medicine, business and finance, robotic control, signal processing, computer vision and many other problems that fall under the category of pattern recognition. For some application areas, neural models show promise in achieving human-like performance over more traditional artificial intelligence techniques.

What, then, are neural networks? And what can they be used for? Although von-Neumann-architecture computers are much faster than humansin numerical computation, humans are still far better at carrying out low-level tasks such as speech and image recognition. This is due in part to the massive parallelism employed by the brain, which makes it easier to solve problems with simultaneous constraints. It is with this type of problem that traditional artificial intelligence techniques have had limited success. The field of neural networks, however, looks at a variety of models with a structure roughly analogous to that of the set of neurons in the human brain.

The branch of artificial intelligence called neural networks dates back to the 1940s, when McCulloch and Pitts [1943] developed the first neural model. This was followed in 1962 by the perceptron model, devised by Rosenblatt, which generated much interest because of its ability to solve some simple pattern classification problems. This interest started to fade in 1969 when Minsky and Papert [1969] provided mathematical proofs of the limitations of the perceptron and pointed out its weakness in computation. In particular, it is incapable of solving the classic exclusive-or (XOR) problem, which will be discussed later. Such drawbacks led to the temporary decline of the field of neural networks.

The last decade, however, has seen renewed interest in neural network, both among researchers and in areas of application. The development of more-powerful networks, better training algorithms, and improved hardware have all contributed to the revival of the field. Neural-network paradigms in recent years include the Boltzmann machine, Hopfield's network, Kohonen's network, Rumelhart's competitive learning model, Fukushima's model, and Carpenter and Grossberg's Adaptive Resonance Theory model [Wasserman 1989; Freeman and Skapura 1991]. The field has generated interest from researchers in such diverse areas as engineering, computer science, psychology, neuroscience, physics, and mathematics. We describe several of the more important neural models, followed by a discussion of some of the available hardware and software used to implement these models, and a sampling of applications.

Applications

Neural networks have been applied to a wide variety of different areas including speech synthesis, pattern recognition, diagnostic problems, medical illnesses, robotic control and computer vision.

Neural networks have been shown to be particularly useful in solving problems where traditional artificial intelligence techniques involving symbolic methods have failed or proved inefficient. Such networks have shown promise in problems involving low-level tasks that are computationally intensive, including vision, speech recognition, and many other problems that fall under the category of pattern recognition. Neural networks, with their massive parallelism, can provide the computing power needed for these problems. A major shortcoming of neural networks lies in the long training times that they require, particularly when many layers are used. Hardware advances should diminish these limitations, and neural-network-based systems will become greater complements to conventional computing systems.

Since the 1970s, work has been done on monitoring the Space Shuttle Main Engine (SSME), involving the development of an Integrated Diagnostic System (IDS). The IDS is a hierarchical multilevel system, which integrates various fault detection algorithms to provide a monitoring system that works for all stages of operation of the SSME. Three fault-detection algorithms have been used, depending on the SSME sensor data. These employ statistical methods that have a high computational complexity and a low degree of reliability, particularly in the presence of noise. Systems based on neural networks offer promise for a fast and reliable real-time system to help overcome these difficulties, as is seen in the work of Dietz et al. [1989]. This work involves the development of a fault diagnostic system for the SSME that is based on three-layer back propagation networks. Neural networks in this application allow for better performance and for the diagnosis to be accomplished in real time. Furthermore, because of the parallel structure of neural networks, better performance is realized by parallel algorithms running on parallel architectures.

Routing

A simple definition of routing is "learning how to get from here to there." In some cases, the term routing is used in a very strict sense to refer only to the process of obtaining and distributing information, but not to the process of using that information to actually get from one place to. Since it is difficult to grasp the usefulness of information that is acquired but never used, we employ the term routing to refer in general to all the things that are done to discover and advertise paths from here to there and to actually move packets from here to there when necessary. The distinction between routing and forwarding is preserved in the formal discussion of the functions performed by OSI end systems and intermediate systems, in which context the distinction is meaningful.

Routing is the act of moving information across an inter network from a source to a destination. Along the way, at least one intermediate node typically is encountered. Routing is the process of finding a path from a source to every destination in the network. It allows users in the remote part Hof the world to get to information and services provided by computers anywhere in the world. Routing is accomplished by means of routing protocols that establish mutually consistent routing tables in every router in the Network.

When a packet is received by the router or is forwarded by the host, they both must make decisions as to how to send the packet. To do this, the router and the host consult a database for information known as the routing table. This database is stored in RAM so that the lookup process is optimized. As the packet is forwarded through various routers towards its destination, each router makes a decision so as to proceed by consulting its routing table.

Routing Table

A routing table consists at least two columns: the first is address of a destination point or destination Network , and the second is the address of the next element that is the next hop in the "best" path to its destination. When a packet arrives at a router the router or the switch controller consults the routing table to decide the next hop for the packet. Not only the local information but the global information is also consulted for routing. But global information is hard to collect, subject to frequent changes and is voluminous.

The information in the routing table can be generated in one of two ways. The first method is to manually configure the routing table with routes for each destination network. This is known as static routing. The second method for generating routing table information is to make use of dynamic routing protocol. A dynamic routing protocol consists of routing tables that are built and maintained automatically through and ongoing communication between routers. Periodically or on demand, messages are exchanged between routers for the purpose of updating information kept in their routing tables.

Routing table

Router

The Network forwards IP packets from a source to a destination using destination address field in the packet header. A router is defined as a host that has an interface on more than one Network.

Every router along the path has routing table with at least two fields:

A Network number and the interface on which to send packets with that network number.

The router reads the destination address from an incoming packet's header and uses the routing table to forward it to appropriate interface. By introducing routers with interfaces on more than one cluster, we can connect clusters into larger ones. By induction we can compose arbitrarily large networks in this fashion, as long as there are routers with interfaces on each subcomponent of the Network.

Packet

The Network carries all the information using packets.

A packet has two parts:

The information content called the payload, and the information about the payload, called the meta-data.

The meta-data consists of fields such as the source ands destination addresses, data length, sequence number and data type. The introduction of meta-data is a fundamental innovation in networking technology. The Network cannot determine where samples originate, or where they are going without additional context information. Meta-data makes information self-descriptive, allowing the network to interpret the data without additional context information. In particular if the meta-data contains a source and destination address, no matter where in the network the packet is, the Network knows where it came from and where it wants to go. The Network can store a packet, for hours if necessary, then "freeze" it and still know what has to be done to deliver the data. Packets are efficient for data transfer, but are not so

attractive for real-time services such as voice.

Link

Link is the connection between two routers. If there are two routers the messages are sent from one to other using the link. So link acts as a bridge between two routers. If a link goes down then information will not be transferred to the routers. We have to search for the other alternative links to reach from source to destination. Hence link plays a major role in the transmission of data as it acts as a carrier of the messages sent by the routers.

Routing Algorithm

Routing is accomplished by means of routing protocols that establish mutually consistent routing tables in every router in the Network. A routing protocol written in the form of code is routing algorithm. A routing algorithm asynchronously updates routing tables at every router or switch controller. The global information to be maintained by routing tables is voluminous. Routing algorithm summarizes this information to extract only the portions relevant to each node. The heart of routing algorithm does all the chores.

The various concepts for discussion are:

  • Design goals of Routing Algorithm
  • Factors that decide the best Path
  • Choices in Routing

Routing algorithms often have one or more of the following design goals

Optimality

Optimality refers to the capability of the routing algorithm to select the best route, which depends on the metrics and metric weightings used to make the calculation. One routing algorithm, for example, may use a number of hops and delays, but may weight delay more heavily in the calculation. Naturally, routing protocols must define their metric calculation algorithms strictly.

Simplicity and low overhead

Routing algorithms also are designed to be as simple as possible with a minimum of software and Utilization overhead. In other words, the routing algorithm must offer its functionality efficiently, with a minimum of software and utilization overhead. Efficiency is particularly important when the software implementing the routing algorithm must run on a computer with limited physical resources.

Robustness and stability

Routing algorithms must be robust, which means that they should perform correctly in the face of unusual or unforeseen circumstances, such as hardware failures, high load conditions, and incorrect implementations. Because routers are located at network junction points, they can cause considerable problems when they fail. The best routing algorithms are often those that have withstood the test of time and have proven stable under a variety of network conditions.

Rapid convergence

Routing algorithms must converge rapidly. Convergence is the process of agreement, by all routers, on optimal routes. When a network event causes routes either to go down or become available, routers distribute routing update messages that permeate networks, stimulating recalculation of optimal routes and eventually causing all routers to agree on these routes. Routing algorithms that converge slowly can cause routing loops or network outages.

Flexibility

Routing algorithms should also be flexible, which means that they should quickly and accurately adapt to a variety of network circumstances. Routing algorithms can be programmed to adapt to changes in network bandwidth, router queue size, and network delay, among other variables.

Factors that decide the best path

Routing algorithms have used many different metrics to determine the best route. Sophisticated routing algorithms can base route selection on multiple metrics, combining them in a single (hybrid) metric. All the following metrics have been used:

Path Length

Path length is the most common routing metric. Some routing protocols allow network administrators to assign arbitrary costs to each network link. In this case, path length is the sum of the costs associated with each link traversed. Other routing protocols define hop count, a metric that specifies the number of passes through internetworking products, such as routers, that a packet must take en route from a source to a destination.

Reliability

Reliability, in the context of routing algorithms, refers to the dependability (usually described in terms of the bit-error rate) of each network link. Some network links might go down more often than others. After a network fails, certain network links might be repaired more easily or more quickly than other links. Any reliability factors can be taken into account in the assignment of the reliability ratings, which are arbitrary numeric values usually assigned to network links by network administrators.

Delay

Routing delay refers to the length of time required to move a packet from source to destination through the internet work. Delay depends on many factors, including the bandwidth of intermediate network links, the port queues at each router along the way, network congestion on all intermediate network links, and the physical distance to be traveled. Because delay is a conglomeration of several important variables, it is a common and useful metric.

Bandwidth

Bandwidth refers to the available traffic capacity of a link. All other things being equal, a 10-Mbps Ethernet link would be preferable to a 64-kbps leased line. Although bandwidth is a rating of the maximum attainable throughput on a link, routes through links with greater bandwidth do not necessarily provide better routes than routes through slower links. If, for example, a faster link is busier, the actual time required to send a packet to the destination could be greater.

Load

Load refers to the degree to which a network resource, such as a router, is busy. Load can be calculated in a variety of ways, including CPU utilization and packets processed per second. Monitoring these parameters on a continual basis can be resource-intensive itself.

Communication Cost

Communication cost is another important metric, especially because some companies may not care about performance as much as they care about operating expenditures. Even though line delay may be longer, they will send packets over their own lines rather than through the public lines that cost money for usage time.

Choices in Routing

Routing algorithms can be classified by type. Key differentiators include:

Static versus dynamic (Non-adaptive versus Adaptive)

Non-adaptive algorithms do not base their routing decisions on measurements or estimates of the current traffic and topology. The choice of route is computed in advance, offline and downloaded to the routers when the network is booted. Adaptive algorithms in contrast change their decisions.

Single-path versus Multi-path

Some sophisticated routing protocols support multiple paths to the same destination. Unlike single-path algorithms, these multi path algorithms permit traffic multiplexing over multiple lines. The advantages of multi path algorithms are obvious: They can provide substantially better throughput and reliability.

Flat versus Hierarchical

Some routing algorithms operate in a flat space, while others use routing hierarchies. In a flat routing system, the routers are peers of all others. In a hierarchical routing system, some routers form what amounts to a routing backbone. Packets from non-backbone routers travel to the backbone routers, where they are sent through the backbone until they reach the general area of the destination. At this point, they travel from the last backbone router through one or more non-backbone routers to the final destination.

Host-intelligent versus Router-intelligent

(Source Routing versus Hop by hop)

Some routing algorithms assume that the source end-node will determine the entire route. This is usually referred to as source routing. In source-routing systems, routers merely act as store-and-forward devices, mindlessly sending the packet to the next stop. Other algorithms assume that hosts know nothing about routes. In these algorithms, routers determine the path through the inter network based on their own calculations. In the first system, the hosts have the routing intelligence. In the latter system, routers have the routing intelligence.

Intra domain versus Inter domain

Some routing algorithms work only within domains; others work within and between domains. The nature of these two algorithm types is different. It stands to reason, therefore, that an optimal intradomain- routing algorithm would not necessarily be an optimal interdomain- routing algorithm.

Centralized versus Decentralized

In centralized routing, a central processor collects information about the status of each link and processes this information to compute a routing table for every node. It then distributes these tables to all the routers. In decentralized routing, routers must cooperate using a distributed routing protocol to create mutually consistent routing tables.

Routing Algorithms

Algorithms Used

  • Flooding
  • Hot-Potato
  • Source Routing
  • Distance Vector (Bellman-Ford)
  • RIP (Routing Information Protocol)
  • Link state
  • Broad Casting
  • Multicasting

Flooding

Every incoming packet is sent out on every other link by every router. Super simple to implement, but generates lots of redundant packets. Interesting to note that all routes are discovered, including the optimal one, so this is robust and high performance (best path is found without being known ahead of time). Good when topology changes frequently (USENET example).

Some means of controlling the expansion of packets is needed. It could try to ensure that each router only floods any given packet once. Could try to be a little more selective about what is forwarded and where. The station initiating a packet stores the distance of the destination in the submitted packet (or the largest distance in the network). Each node reduces the counter by one, and resubmits the packet to all the adjacent nodes (but not to the node from where it received the packet). Packets with counter 0 are discarded. The destination node doesn't resubmit the packet .

Hot - Potato Routing

Hot-potato routing, or deflection routing, the nodes of a network have no buffer to store packets in before they are moved on to their final predetermined destination. In normal routing situations, when multiple packets contend for a single outgoing channel, packets that are not buffered are dropped to avoid congestion. But in hot potato routing, each packet that is routed is constantly transferred until it reaches its final destination because the individual communication links can not support more than one packet at a time.

The packet is bounced around like a "hot-potato," sometimes moving further away from its destination because it has to keep moving through the network. This technique allows multiple packets to reach their destinations without being dropped. This is in contrast to "store and forward" routing where the network allows temporary storage at intermediate locations.

This is a simple and effective way to route packets in communication networks. In these networks, nodes have no buffer to store the messages in transit, thus causing the messages to move from node to node each time. In other words, the messages are treated like hot potatoes.

Hot-potato routing is used for the following applications:

Real Networks

Immediate applications

Optical Networks

Hot potato routing has applications in optical networks where messages made from light can not be stored in any medium.

Non-optical networks

We obtain cheaper and easier to build networks, since nodes are simpler without buffers.

Source Routing

Source Routing is a technique whereby the sender of a packet can specify the route that a packet should take through the network. As a packet travels through the network, each router will examine the "destination IP address" and choose the next hop to forward the packet to. In source routing, the "source" (i.e. the sender) makes some or all of these decisions.

In strict source routing, the sender specifies the exact route the packet must take. This is virtually never used.

The more common form is loose source record route (LSRR), in which the sender gives one or more hops that the packet must go through. In high-level terms, it may look like:

To : A

From : D

Via : T

Source routing is used for the following purposes:

Mapping the network

Used with trace route in order to find all the routes between points on the network.

Troubleshooting

Trying to figure out from point "A" why machines "F" and "L" cannot talk with each other.

Performance

A network manager might decide to force an alternate link (such as a satellite connection) that is slower, but avoids congesting the correct routes.

Hacking

LSRR can be used in a number of ways for hacking purposes. Sometimes machines will be on the Internet, but will not be reachable. (It may be using a private address like 10.0.0.1). However, there may be some other machine that is reachable to both sides that forwards packets. Someone can then reach that private machine from the Internet by source routing through that intermediate machine.

Distance Vector

(Also known as Bellman-Ford or Ford-Fulkerson)

The heart of this algorithm is the routing table maintained by each router. The table has an entry for every other router in the subnet, with two pieces of information: the link to take to get to the router, and the estimated distance from the router. For a router A with two outgoing links L1, L2, and a total of four routers in the network, the routing table might look like this:

Router

Distance

link

B

5

L1

C

7

L1

D

2

L2

Neighboring nodes in the subnet exchange their tables periodically to update each other on the state of the subnet (which makes this a dynamic algorithm). If a neighbor claims to have a path to a node which is shorter than your path, you start using that neighbor as the route to that node. Notice that you don't actually know the route the neighbor thinks is shorter - you trust his estimate and start sending packets that way.

RIP

(Routing Information Protocol)

The Routing Information Protocol (RIP) is a distance-vector protocol that uses hop count as its metric. RIP is widely used for routing traffic in the global Internet and is an interior gateway protocol (IGP), which means that it performs routing within a single autonomous system. Peer routers exchange distance vectors every 30 sec, and a router is declared dead if a peer does not hear from it from 180 sec. The protocol uses split horizon with poisonous reverse to avoid the count-to infinity problem.

RIP sends routing-update messages at regular intervals and when the network topology changes. When a router receives a routing update that includes changes to an entry, it updates its routing table to reflect the new route. The metric value for the path is increased by one, and the sender is indicated as the next hop. RIP routers maintain only the best route (the route with the lowest metric value) to a destination. After updating its routing table, the router immediately begins transmitting routing updates to inform other network routers of the change. These updates are sent independently of the regularly scheduled updates that RIP routers send.

RIP Stability Features

To adjust for rapid network-topology changes, RIP specifies a number of stability features that are common to many routing protocols. RIP, for example, implements the split-horizon and hold-down mechanisms to prevent incorrect routing information from being propagated. In addition, the RIP hop-count limit prevents routing loops from continuing indefinitely.

Applications

RIP is useful for small subnets where its simplicity of implementation and configuration more than compensates for its inadequacies in determining with link failures and providing multiple metrics.

Link-State Routing

Widely used today as OSPF in the Internet, replaced Distance Vector in the ARPANET. Link State improves the convergence of Distance Vector by having everybody share their idea of the state of the net with everybody else (more information is available to nodes, so better routing tables can be constructed).

Neighbor discovery

Send a HELLO packet out. Receiving routers respond with their addresses, which must be globally unique.

Measure delay

Time the round-trip for an ECHO packet, divide by two. Question arises: do you include time spent waiting in the router (i.e. load factor of the router) when measuring round-trip ECHO packet time or not?

Bundle your info

Put information for all your neighbors together, along with your own id, a sequence number and an age.

Distribute your info

Ideally, every router would get every other router data simultaneously. This can't happen, so in effect you have different parts of the subnet with different ideas of the topology of the net at the same time. Changes ripple through the system, but routers that are widely spread can be using very different routing tables at the same time. This could result in loops, unreachable hosts, and other types of problems.

Compute shortest path tree

Using an algorithm like Dijkstra's, and with a complete set of information packets from other routers, every router can locally compute a shortest path to every other router.

Advantages

OSPF uses authentication for routing messages. This avoids the problem of miss configured, "crazy" routers suddenly trying to tell the world that they are the center of the universe and are directly connected to a wormhole time travel machine. It also helps prevent malicious attacks on networks via their routing tables.

OSPF uses the idea of "area" within a routing domain. This decreases the amount of state information, and exchange of routing messages

OSPF allows for load balancing among multiple routers

Problem Definition

Problem Definition

For sending information from one network to other network through a subnet efficiently, one has to select a better routing technique among the several techniques available. So far no routing Algorithm is reported to be outright choice for all possible cases. So an attempt is made to provide such a routing technique which provides better results for a given configuration of the subnet in real time.

The main objective of our project is to maximize the efficiency of the routing process by suggesting the potential user a better algorithm.

Calculation of Efficiency of Subnet:

Efficiency of Routing Algorithm = å hi / n

Where

hi is Efficiency of Router i

n is Number of Routers in the Subnet

Objectives of the System

The NETWORK TRAFFIC ROUTING OVER NURAL NETWORK has the following objectives:

  • The topology of the subnet should be displayed with routers designated with computer images and links with lines.
  • The congestion table should be printed showing the congestion on various links.
  • Various Statistics for the router like efficiency, average packet size are to be displayed when required.
  • Statistics for the link like propagation delay, buffers filled are to be displayed when congestion table is clicked.
  • A provision for router crash is required which should show an outline when a router is crashed.
  • When a link is down, it should be highlighted. This gives an idea of how the routing goes when a link is down.
  • The statistics for the router and the link are to be calculated for every 500 m sec.
  • A provision for redrawing the congestion table and network is to be provided.
  • The routing should be controlled by a speed controller.

System Design

Design

In the design phase we identify the different objects that are required to get the required results:

Router

A router generates packets and places them in the router buffer. It consults the routing algorithm and places the appropriate packets on the link from which packets are placed on the link and transmitted. The router at the other end of the link picks up the packets from the link and places them in its buffer. From the router's buffer packets are processed. Processing includes checking if the packet is destined to that router or not. If yes the router reads the message and sends acknowledgement else it sends it to the router buffer from which it is forwarded to the next router.

The router contains the following fields:

  • Id of router
  • Size of Network
  • Distance matrix to every router

Simcore object

  • Buffer object
  • Maximum Size of Buffer
  • Current Size of Buffer;
  • Routing Algorithm
  • Routing Algorithm Status
  • Router Status
  • Checking Probability

Threshold

  • Start Delay
  • Outgoing link matrix
  • Incoming Links matrix

Link

The link acts as a bridge between the two routers. There are buffers at both ends of a link in which packets are placed while routing. The link transmits the packets based on the propagation delay specified. According to the delay the packets are sent immediately to the next router or delayed in the link buffer. When the state of a link is up transmission occurs. If the link goes down packets in the link buffers are lost.

The link contains the following fields:

  • Head Packet
  • Tail Packet
  • Queue Size
  • Thread for Link
  • Propagation Time
  • Bit Rate
  • Status of Link
  • Router at one end
  • Router at the other end
  • Simcore object

Routing Algorithm

A routing algorithm decides the path from source to the destination.

It performs three major functions:

Routing of next packet

To do with packet as algorithm decides.

Processing of Packet

If the packet is for that router, we can use this method to send some kind of hello messages or replies.

Selection of Packet to be routed

A packet from the router's buffer will be selected to be routed next. This is useful when packets have different priorities.

Packet

A packet is an entity which contains the actual message to be sent to the router. The router generates packets that are transmitted through a link. The packets are dummy entities and are just required to know that the path given by the routing algorithm is followed or not. The rate of transfer of packets depends on bandwidth of the link.

The Packet has the following fields:

  • Size of the Packet
  • Packet Source
  • Packet destination
  • Sequence Number (equivalent to packet id)
  • Fragment Offset
  • Total Size
  • Time when Packet reaches other side of link
  • Creation Time
  • Time when Put In Link
  • Previous Router
  • Next Router
  • Hop count
  • Time when Inserted In Buffer
  • Fragment Flag
  • Fragmented Flag

Fragment

If the size of the packet is large as compared with the size of the buffers, the packet is divided into number of fragments. These fragments are numbered and are placed on links for transmission. At the other end of the buffer, the fragments are again combined to get the original packet.

Fragment contains the following fields:

  • Sequence number
  • Time when Fragmented
  • Fragment Number
  • Fragment Size

Core of the simulator

This acts as the project manager and is the heart of the Simulator. It takes the input from the input file and initializes the routers and links based on the Network Configuration. It manages the time constraint based on which packets are generated and lost. It consults the routing algorithm and decides the path and gives instructions to the packets in the buffers about the paths. Based on probabilities of link to be down, it downs a link and after sometimes brings it back to normal state. It checks each and every condition of every other object in the system and takes decisions accordingly. It is responsible for drawing the congestion table and Network diagram in the Panel.

Parameters of the network include:

  • Factor for Converting Computer Time to loop-count i.e. our clock
  • Frequency of generation of packets at a particular router
  • Scaling factor for generating packets
  • Distance between routers i & j. Set by the user
  • Maximum Packet Size
  • Minimum Packet Size
  • Number of routers in the N/W. Set by the user
  • Header Size
  • Array of references to routers
  • Head of linked list containing packets which are on their path on a link
  • Tail of linked list containing packets which are on their path on a link
  • Number of packets lost
  • Number of packets sent from particular router
  • History of packets which have reached their
  • History of packets which have been sent
  • Lost History
  • When The Underlying layer will be free
  • Propagation Delay between Router i & j
  • Bit Rate of links between Router i & j
  • No of protocol Packets from i to j
  • Gross Lost - lost but duplicate of packet may have reached destination
  • Net lost - no copy has reached destination
  • Protocol packets lost
  • Probability of Packet Loss On Link
  • Maximum Link Size
  • Snap Shot Interval
  • Maximum fragment size

The different issues handled by the Simulator are:

  • Throughput
  • Read speed of graphical display/routing
  • warning message shown for how much time

The some of the modules in the core of the Simulator include:

  • Setting the Topology
  • Drawing the Table
  • Filling the Table
  • Drawing the Network
  • Restoring the State
  • Setting the Physical distance
  • Notifying the Link
  • Notifying the Router
  • Making the Router Status Down

Making the Link Status Down

  • Making the Router Status Up
  • Making the Link Status Down

Aims & Objectives

To enable the student to produce a Distributed Computer application, using the Java programming language utilizing the TCP/IP protocol.

Brief

Design, implement and test a Routing program using the Java programming language. The implementation may use a peer-to-peer model or a client-server model and my use connection networking programming or a mixture of both. The minimum acceptable implementation is two Java applications which can send and receive lines of text across a network connection as well as the deliverables details below.

Extra marks will be given for additional features and functionality which enhances the user experience such as

- a graphical user interface

- logging of connections

- logging of messages sent and received

- a server based chat program which relays messages between clients

These extra features are only suggestions and are not exhaustive. Evidence of cross platform testing will also merit extra marks.

Client Application Overview

The application will consist of two programs. The first program will be the server that will administer all connected users, log activity and relay packets to the clients. The send application will be the client messenger application that will connect to the remote server.

When a user loads the client application, they will be required to log into the remote server. Demonstrates the appearance of the login window. This will involve assigning a desired username to the session. This username will be used by the server to distinguish between different connections and therefore is important they remain unique. For example, two users cannot have the same username.

Additional the username field, the user can also specify the remote server host name or IP address and the port that the server is listening on. By default, this value will be 127.0.0.1 and port 1000. Should the application go live for public use then these values would most likely be hidden from the user and the server would run on a dedicated IP address and port number.

Immediately the server will inform the client of all members currently connected. These values will populate a list of connected users in the main application window. The user will see two text fields, the first will display the entire conversation and system messages (for example, a user joins or leaves) for the session of the user. The user will also have a text window where they can type their own messages to the conversation window.

Network Communication Design

The server application will listen for any new connections from client connections on port 1000. Any new client connections will be added to an internal stack of client connections. All client applications will only communicate to the server and not to other client computers. This ensures that a client system cannot show the remote address of a particular remote user and results in improved security against other users of the application.

The data flow of the application between the clients and server. Each client will have a two-way communication link (send and receive) with the server. The server is responsible for relaying any messages between clients. The server may also log any events and data to a local file on the server computer.

CLIENT

LOG FILE

SERVER

CLIENT

CLIENT

Server Application Overview

When the server application is launched, the listen port number can be specified as a parameter during execution of the program. If the port number is not specified then the application uses a default port number of 1000.

The server will run in a command window and have a text based menu system to navigate through the server commands.

  • Start server
  • Enable logging
  • Clear log file
  • View log file
  • View current users
  • Exit

Enter option: _

Pressing ‘1' starts the server listening on the designated port. If the server is listening the menu option will state ‘Stop server' and will stop the server from listening and close all existing connections.

Pressing ‘2' will make the server log all activities and traffic. The log will go to Router. log debugging. If logging is currently enabled then the option will state ‘Disable logging' and will stop logging each event.

Pressing ‘3' will delete the log file on the server.

Pressing ‘4' will show all the contents of the log file on screen.

Pressing ‘5' will show a list of all currently connected users on screen.

Pressing ‘x' will close any active connections and terminate the server application.

Implementation

Structure of the Server Application

The server application creates an instance of a menu thread class, a listen thread class monitoring new connections and a list of clients running in their own threads tracking incoming data from individual clients. Figure 1.5 shows the structure of the server application classes.

ROUTING SERVER is the main application class that create an instance of the text menu, listen thread and stores the client threads. Each sub class uses action events to return data and user responses to the main class ready for processing.

CTextMenuThread displays the server menu options and reads the user response via the keyboard. This class calls the following action events defined in CMenuListener that are implemented in ROUTING SERVER:

    • onServerRunning

Used to start or stop the server from listening to new connections and relaying messages from connected users.

    • onShutdown

Shuts down the server application and exits back to the operating system.

    • onLogging

Used to enable or disable server logging.

    • onLogFileClear

Used when the user requests to clear the log file.

    • onViewLogFile

Used when the user requests to view the log file.

    • onShowConnectedUsers

Used when the user requests to view all connected users.

CListenThread

listens for incoming connections from remote clients. The class listens for a connection for a 10th of a second and then loops. The timeout is set to a 100 milliseconds to enable the application to stop listening if required. This class calls the following action events defined in CListenListener that are implemented in ROUTING SERVER:

    • onListen
  • Used to inform the application that the server socket is listening on the specified port.
    • onClose
  • Used to inform the application that the server socked was closed.
    • onNewConnection
  • Used to inform the application that a new client connection has been made.
    • onListenError
  • Used to inform the application that there was an error relating to the server socket listen thread.

CClientListenThread handles all the individual operations relating to a particular client connection. This class will deal with incoming data from the client and will also send data to the client. This class calls the following action events defined in CClientListenListener and are implemented in ROUTING SERVER:

CCommandParser (shared by the server and client applications) is used to extract the data from a command send to or from the server. The commands follow the following specification.

Character

Description

This is a response code. It can relate to + for success or - for failure.

The remaining characters are the data characters. This can either be a username on its own, a message on its own or a combination of a username and message separated by the tilde character (~).

Structure of the Client Application

The client application creates instances of window classes and relays information from the Graphical User Interface (GUI) and the network connection through CTransport.

CLIENT is the main application that controls the visual windows and the network connection and processes data to send and data received from the server.

JLogin is the window where the user enters their desired username and specifies the server address and port. This class calls the following action events that are defined in CLoginListener and are implemented in CLIENT:

Ultimately this will display a private message window if one is not already open.

CTransport is used to handle the two-way communications with the client application and the remote server. This class implements the CCommandParser, which has been described earlier in this documentation. This class calls the following action events defined in CTransportListener and are implemented in CLIENT:

CListenThread is a dedicated thread class that listens for incoming data from the remote server. This process is independent of the rest of the application allowing the user to navigate through the GUI interface and send data to the server. This class calls the following action events defined in CListenThreadListener and are implemented in CTransport:

Data Flow Diagrams

Design Implementation

Software Used

Java Development Kit 1.4

The JDK 1.4 is a development environment for writing GUI and applications that confirm to the Java core API. Its compiler and other tools are run from a shell and have no GUI interface.

Java Tools:

Java Compiler (javac)

Compiles programs written in Java programming Language into byte codes.

Java Interpreter (java)

It executes java byte codes. In other words it runs programs written in the Java programming language.

Java run-time Interpreter (jre)

It is similar to Java interpreter, but intended for end users who do not enquire all the development-related options available with the java tool.

Java Debugger (jdb)

It helps in finding bugs in Java programs.

Class File Disassembler (javap)

It disassembles compiled Java files and prints out a representation of Java byte codes.

Java Documentation Generator (javadoc)

Parses the declarations and documentation comments in a set of Java source files and produces a set of HTML pages describing the public and protected classes, interfaces, constructors, methods and fields. Also produces a class hierarchy on an index of all members.

Java Archive Tool (jar)

Combine many Java class files and other resources into a single jar file it also prepares an executable which can be run by javaw.exe.

User Documentation

Requirements:

  • The user has to install JRE 1.3 or above to run this NETWORK TRAFFIC ROUTING OVER NURAL NETWORK 1.0

How to Run

  • The user has to double click the executable jar file to run the NETWORK TRAFFIC ROUTING OVER NURAL NETWORK 1.0.
  • The user will see a window to operate the NETWORK TRAFFIC ROUTING OVER NURAL NETWORK 1.0.

Operating

  • First the user have to select the topology in the box provided in the lower right corner of the screen then there will be a dialog appears on the screen prompting the user to give number nods in the network enter a positive integer then click “OK” button then on the left side of the screen the network topology can be viewed with the selected no nodes.
  • The can view the routing tables for each and every router by just clicking icon the routers for this the user have to select a algorithm in the panel provided on the top right corner of the window then clicking the “Simulate” button
  • The routing algorithm efficiency can be viewed by clicking the button in the panel provided in the top right corner of the screen.
  • For the process of evaluating the Routing Algorithm one can even crash the Router by right Clicking on the Router and selecting the “Down” button in the popup menu the same process for reactivating a router.
  • The user can also view the routing buffer by clicking the “Router Buffer” option in the popup menu, before that user have to send some number of packets using different algorithms using the button “Send Packets” which is provided in the top right corner of the screen. We can send packets from one client to the other client's via Routing server.
  • The user also can use the short notes provided on different routing algorithms for verification by just clicking the “Notes” button in the “Help” menu.

Testing

System testing makes a logical assumption that if all parts of the system are correct the goal will be successfully achieved. System Testing is utilized as user-oriented vehicle before implementation. Programs are invariably related to one another and interact in a total system. Each portion of the system is tested to see whether it conforms to related programs in the system. Each portion of the entire system is tested against the entire module with both test and live data before the entire system is ready to be tested.

The first test of a system is to see whether it produces correct output. The other tests that are conducted are:

1. Online - Response

When the mouse is clicked on the router the statistics of the router for the selected algorithm have to be displayed on the screen. The router must crash immediately when it the “Down” button clicked in the popup menu.

2. Stress Testing

The purpose of stress testing is to prove that the system does not malfunction under peak loads. In the simulator we test it with the greater number of nodes and getting the correct results for each and every router applying different routing algorithms. All the routers are purposely crashed to generate a peak load condition and the working is tested.

3. Usability Documentation and Procedure

The usability test verifies the user friendly nature of the system. The user is asked to use only the documentation and procedure as a guide to determine whether the system can run smoothly.

FEATURES OF THE LANGUAGE USED

About Java

Initially the language was called as “oak” but it was renamed as “Java” in 1995. The primary motivation of this language was the need for a platform-independent (i.e., architecture neutral) language that could be used to create software to be embedded in various consumer electronic devices.

  • Java is a programmer's language.
  • Java is cohesive and consistent.
  • Except for those constraints imposed by the Internet environment, Java gives the programmer, full control.

Finally, Java is to Internet programming where C was to system programming.

Applications and Applets

The Frame class extends Window to define a main application window that can have a menu bar.

Heavy weight components like Abstract Window Toolkit (AWT), depend on the local windowing toolkit. For example, java.awt.Button is a heavy weight component, when it is running on the Java platform for Unix platform, it maps to a real Motif button. In this relationship, the Motif button is called the peer to the java.awt.Button. If you create two Buttons, two peers and hence two Motif Buttons are also created. The Java platform communicates with the Motif Buttons using the Java Native Interface. For each and every component added to the application, there is an additional overhead tied to the local windowing system, which is why these components are called heavy weight.

javax.Swing package. All components in Swing, except JApplet, JDialog, JFrame and JWindow are lightweight components.

The peerless components are called light weight components.

The FontMetrics class is used to define implementation-specific properties, such as ascent and descent, of a Font object

A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.

The elements of a GridBagLayout are organized according to a grid. However, the elements are of different sizes and may occupy more than one row or column of the grid. In addition, the rows and columns may have different sizes.

Java uses layout managers to lay out components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.

Without layout managers, Java programmers are faced with determining how their GUI will be displayed across multiple windowing systems and finding a common sizing and positioning that will work within the constraints imposed by each windowing system.

Applet:

1. Normal small programs in java get executed in the console(cmd).An Applet program gets

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.