Giter Club home page Giter Club logo

network_diagnostics's Introduction

C/C++ CI CodeQL

network_diagnostics

A tool to diagnoze network, test if firewalls, vlan, latency is in order.

Usage

Usage network_tester:
  -c       Mode client   (sends data to server)
  -r       Mode receiver (receives data from client)
  -l       Mode listener (listens to data from client)
  -i       Network interface to use
  -d       Destination address to send data (used with -c)
  -p       port number
  -s       Source address to send data (used with -r)
  -t       ethernet protocol (tcp or udp)
  -v       vlan id

Supported platforms

  • Asus rt-ac66u
  • Linux
  • Armbian
  • Raspberry Pi
  • Odroid N2
  • And more...

Why use this application?

If you have two network looking like this:

<-ComputerA-> <-LAN_A-> <-Firewall_A-> <----INTERNET----> <-Firewall_B-> <-LAN_B-> <-ServerB->

And you are sitting on ComputerA and want to reach ServerB, but the connection via TCP or UDP fails and you want to diagnose it. We need to assume that the "INTERNET" connection is working good. To be able to diagnose the problem further one way could be to use this application. You install the start the application in Client mode on ComputerA, on Firewall_A and Firewall_B you start the application in Listener mode and on ServerB you start the application in Receiever mode. When ComputerA sends the packet towards ServerB, Firewall_A should be able to see the ingress packet, Firewall_B should also be able to read the packet, if it's not blocked by the Firewall_B firewall rules. If you setup the Listener on Firewall_B WAN port, you should be able to see the incoming packet. Then you could assume that there is something wrong with Firewall_B.

How it works

First you setup one or more servers, and then you launch the client to access the endpoint server. The main goal with this application is to use these listeners which you can start on almost every device. And run them on the network equipment along the way to be able to follow the path of the packet going from Endpoind to Workstation.

For example:

|----------|                    |-----------------|                    |-------------|
| Endpoint | <--- ETHERNET ---> | Router/Firewall | <--- ETHERNET ---> | Workstation |
|----------|                    |-----------------|                    |-------------|

     ^                                  ^                                     ^
     |                                  |                                     |
     |                                  |                                     |
|----------|                       |----------|                           |--------|
| Receiver |                       | Listener |                           | Client |
|----------|                       |----------|                           |--------|

All the intermediate servers will be able to capture the sent packet from the client and can show, if the packet was successfully recieved or not. It can also print out timestamps to show how the latency looks between different endpoints.

One thing to notice, is that the application can print out when the packet was received or sent, but in order for the timestamps to make sense, the clocks needs to be synchronized with a common source, perhaps a NTP server on the internet.

Then we can see the delays between different nodes on the network, to be able to pinpoint delay issues.

Supported features will be:

  • vlan [ if requested ]
  • network latency
  • multiple servers to capture the packet along the way to the endpoint node
  • Suggestions?

How to build:

If you want to cross compile to a router and don't know how to do it, create a issue and I can build the binary for you
Otherwise, checkout this repository:
git clone https://github.com/payano/network_diagnostics.git
cd network_diagnostics
make
./network_tester

network_diagnostics's People

Contributors

payano avatar

Watchers

 avatar

network_diagnostics's Issues

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.