Routing simulation - class diagram design

zhaozj2021-02-16  46

Routing simulation system class relationship map

(This document is draft)

2004-3-2

Description: The constructor of all classes in this document is omitted to the description of the description of the description function.

Routing simulation system class diagram:

About the generation of the network

The generation of the network is mainly completed by class NET and NetNode. As with a network:

In the figure, all A, B, C, D are routers, connected by fiber optic fibers. Generate this network, you need to follow these steps:

1. For topology, by matrix as parameters:

A B C D

A 1 1 1 0

B 1 1 1 0 = NetArray.

C 1 1 1 1

D 0 0 1 1

2. For physical structures, dissipation information is used as parameters:

A B C D

A 0 5 4 -1

B 5 0 6 -1 = Valarray.

C 4 6 0 2

D-1 -1 2 0

In addition, two vectors are needed, one is "router type vector", the network is:

R = (Ra, RB, RC, RD), where RA, RB, RC, and RD are "central routers".

Another vector is "Network Line Type Vector", the network is:

L = (LAB, LAC, LBC, LCD), where Lab, Lac, LBC, LCD are "optical fibers".

Therefore, in the step of establishing a network, the route simulation system and the parameters of the communication simulation are passed to:

NetArray, Valarray, R, L.

The built network will be stored using a neighboring table.

Then, the base class of the network device has NetElement, Absline, Absrout, any complex network in the class diagram, which can be inherited on this basis. And we only simply simply simulate the routing of the backbone network, so it is inherited to get two types of Fiber, Centralrout. The system should maintain a network device type table: NetlementType.

Then the class diagram of the network generator is:

About network packets (data structure) and routing tables

2004-3-3

1. The design of the network packet is completely in accordance with the IP protocol, using the IP packet. There is a queue of the packet in the router to simulate the port of the router, which is done using STL :: LIST.

2, the design of the routing table, separately using a data structure table.

It can be seen in the class diagram of the routing simulation system.

Router

The router is different, and some performance is:

1. Router performance parameters.

2, the organizational form of the router port.

3, the service interface of the router.

Therefore, Absrout is just a pure virtual class, and different routers can inherit implementation. The routing table is fill in the router and completes its maintenance. Routing calculation is separated from the implementation of the router itself. The implementation of routing calculations can be commissioned separately. Congestion and packet loss and other processing plans will also be discussed.

NetWriteData and NetReadData are interfaces with the communication simulation system for use to read or write to the router port.

The idea of ​​preparing is:

During the transfer of packets, it is lost in a certain probability; and the router that successfully receives the packet is successfully received, and the answer message needs to be returned. The data package should be lost in the network communication simulation, and the router can detect if the transmitted packet has successfully reached the next router. Calculates by the router, but is separated from the routing analog system when implementing. Overall, routing simulation and communication simulation has the following interface:

1 When you create a network, Net gets NetArray provided by the communication simulation system via GetNetInfor.

Valarray, R, L.

2 During packet transmission, the communication simulation system completes the writing and reading of the packet through CentralRout's NetWriteData and NetReadData.

More detailed interface descriptions are found in the interface description document.

Finished>

转载请注明原文地址:https://www.9cbs.com/read-25388.html

New Post(0)