Git Product home page Git Product logo

networksimulator's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

networksimulator's Issues

Output plotting

Real time plotting needs to be implemented.
Also, the plots need to be formatted better (including headings, units, readability).

Globally unique id

We need a globally unique id for each host/router so that link knows which devices it connects to. In addition, I think that we should unify the interface for get id, aka. flow.get_id(), router.get_id(), host.get_id() instead of host.get_host_id(), flow.get_flow_id().

[TEST 0] Bug at packet number 13

When the simulator is run on test_case_0, things work fine until packet number 13.

In round 13,
ReceivingFlow (id 3) sends ack packet_13 to its host (id 1)
Host 1 sends ack packet_13 to its link (id 2)
Link 2 enqueues ack packet_13 in its buffer

Then the link's transmit() function is called. But the program never reaches the line after "yield self.env.timeout(....)".

This is the runtime error: AttributeError: 'NoneType' object has no attribute 'callbacks'

FIN packet

Does the receiving flow respond by sending a FIN packet when it receives a FIN packet from the corresponding sending flow?

Router Design

Let's agree on a routing design before implementing it. I'd like to do dynamic routing without a statically initialized routing table. Here's one way we could do it.

Dynamic routing will use the Bellman-Ford algorithm with distance vectors, taking place every 5s. Link weights will be the propagation time of the RoutingUpdatePackets, which can be found without querying links. Based on this metric, the first distance estimate to a device must be the shortest since it reached the router first.

At the start of the simulation, all the routers will begin broadcasting their distance estimates. Hosts that receive a RoutingUpdatePacket will reply to alert the router that they are a host. Routers will mark the links corresponding to the hosts and never broadcast in that direction again. This solves the problem of routers determining where the hosts actually are. Distances to hosts will be subsequently determined by the propagation time of the last packet from the host to its adjacent router. All packets other than RoutingUpdatePackets will be dropped during this dynamic initialization phase.

Open questions:

  1. How does a router choose a "default link"?
  2. Is there a better way to trigger dynamic routing than on regular time intervals?
  3. If dynamic routing does not take place on regular time intervals, how will a router know when it has received all the proper distance estimates?

Architecture

Router:
BF, routing table, links hosts

Packet:
src, dest, size, type, timestamp

Host:
flow[], address

Link:
buffer, capacity

Flow:
congestion control

*event queue

Packet class unit test error

I got the following messages when trying to run packet_test.py:

Traceback (most recent call last):
File "test_packet.py", line 4, in
class PacketTest(unittest.TestCase):
File "test_packet.py", line 12, in PacketTest
PACKET_TYPE = Packet.PacketTypes.data_packet
AttributeError: 'Enum' object has no attribute 'data_packet'

Anyone else run into the same problem?

Reporting for flows

Should the environment call report() on a sending flow only after its start time?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.