Git Product home page Git Product logo

packetbroker's Introduction

CircleCI Codefresh build status Coverage Status

Overview

PacketBroker is a network packet capture, aggregation, and forwarding solution for moving network packets of any protocols to a centralized location for persistence and analysis. It is designed to run in the following devices to perform packet encapsulation, aggregation, and transport:

  • Inside timestamping switches such as the Metamako MetaApp 32 which does tapping, timestamping, and aggregation.
  • On commodity servers with packet capture and timestamping cards such as the Solarflare SFN8522PLUS which does the timestamping.

Features

  • Move packets from one interface to another local interface or to a remote location.
  • Connect to multiple remote edge nodes to receive packets captured from remote locations and aggregate with packets captured locally.
  • Multiple hop forwarding through intermediate nodes is supported if a direct end to end connection is not permitted due to network security requirements.
  • Prepend packets with a header identifying original source node and intermediate nodes with sequence numbers, timestamps, and configurable descriptions.
  • Support jumbo frames with MTU (9000 bytes) + Ethernet FH (14 bytes) + Original FCS (4 bytes) and any configurable number of trailer based timestamps of any given sizes, useful when packets have been cross fed through multiple timestamping switches.
  • Lightweight non blocking design with one thread serving multiple remote consumer nodes.
  • Handle slow or dead remote nodes by resending packets for a configurable time before placing on Dead Letter Queue.

Alternatives and issues

Traditional approach typically involves either of the following setup.

  • Use a single high performance switch to do switching, tapping, timestamping, and tunneling over SPAN.
  • Use an inline tap and a dedicated switch to do just timestamping and tunneling over SPAN.

Both suffers from a number of issues, most obviously the inability of most switches to utilize all ports due to loading. Following is a list of additional issues with these approaches.

SPAN

Most enterprise switches support SPAN / monitor sessions whereby packets traversing through selected ports can be redirected to another port typically connected to a device performing timestamping and packet capture. For latency monitoring in financial trading whereby solutions such as Velocimetrics or Corvil appliances are deployed this necessitates one appliance per rack. Another issue with SPAN is the technology was designed for troubleshooting and occasionally suffers form packet drops.

GRE / ERSPAN

While ERSPAN supports receiving packets from remote switches which alleviates the need to deploy multiple remote monitoring appliances it uses GRE as a protocol for transport which does not guarantee delivery with packets arriving in order. The Cisco N7K config guide is a good read but there are lots of restrictions with this approach such as:

  • A small number (eg 2) ERSPAN source sessions can only run simultaneously despite being able to configure many (eg 48). This may be higher for newer switch firmware versions but is still generally much lower than available ports on the switch.
  • Aggregation from multiple source devices to one destination port is not supported.
  • No support for L2 trunk or L3 subinterfaces as source sessions.
  • Performance impact to some switches potentially impacting packet forwarding and routing.

Linux TUN / TAP

This is an excellent built in feature for replicating packets efficiently to remote locations but does not work if trailer based timestamps are applied which simply replaces the original Frame Check Sum with the timestamp as such packets will be dropped by the Linux network stack as a malformed packet.

Example Implementation

Following diagram illustrates how it can be used on the Metamako MetaApp 32, highlighting how the configuration parameters in configs/defaults.conf influences how packets are to be processed.

Example Implementation on Metamako MetaApp 32

License

Apache License 2.0

packetbroker's People

Contributors

cheungtitus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

packetbroker's Issues

POM file errors appearing only when executing via Maven

Description

POM file errors appearing only when executing via Maven.

Environment

  • Windows 10
  • JDK 1.8.0_162

Steps to reproduce

Run Maven Test

Expected behaviour

No warnings printed

Actual behaviour

Warnings printed

Error Message & Stack Trace

[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 91, column 21
[WARNING] 'dependencies.dependency.scope' for org.apache.logging.log4j:log4j-bom:pom must be one of [provided, compile, runtime, test, system] but is 'import'. @ line 39, column 20

Investigate if Ethernet pause frames is required to be sent to MetaWatch

Description

Investigate if it is required to send Ethernet pause frames to MetaWatch during congested periods when queues are filled up.

Environment

  • JDK 1.8.0_162
  • Metamako MetaApp 32

Expected behaviour

Under high ingress and slow egress (eg slow remote consumers), PacketCaptureCallback may block due to queues being full and memory will continue to grow until out of memory condition occurs. Given the high memory available for MetaApp 32 (16GB per MetaWatch), packets can buffer by receiving an Ethernet pause frame from PacketBroker.

Actual behaviour

To be determined.

org.testng.reporters.JUnitReportReporter failed

Description

When running Maven test lifecycle following is shown in console.
[TestNG] Reporter org.testng.reporters.JUnitReportReporter@5594a1b5 failed
java.util.ConcurrentModificationException

Environment

  • Windows 10
  • JDK 1.8.0_162

Steps to reproduce

  1. Uncomment line

    <skipTests>true</skipTests>

  2. Run Maven Test

Expected behaviour

No exceptions.

Actual behaviour

Exception thrown.

Error Message & Stack Trace

[TestNG] Reporter org.testng.reporters.JUnitReportReporter@5594a1b5 failed
java.util.ConcurrentModificationException
	at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909)
	at java.util.ArrayList$Itr.next(ArrayList.java:859)
	at org.testng.reporters.JUnitReportReporter.getNextConfiguration(JUnitReportReporter.java:220)
	at org.testng.reporters.JUnitReportReporter.generateReport(JUnitReportReporter.java:105)
	at org.testng.TestNG.generateReports(TestNG.java:1175)
	at org.testng.TestNG.run(TestNG.java:1102)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:193)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:94)
	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:379)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:340)
	at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:413)

Intellij run configurations missing

Description

None of the Intellij run configurations were pushed to GitHub.

Environment

  • Windows 10
  • JDK 1.8.0_162

Steps to reproduce

  1. Fork project on GitHub.
  2. Clone forked project to desktop.
  3. Import project into Intellij.

Expected behaviour

Run configurations visible.

Actual behaviour

No run configurations visible.

Enable TunnelServer to bind to specific interface

Description

Binding to specific interface by TunnelServer should be configurable.

Environment

  • JDK 1.8.0_162
  • Windows 10 / RHEL 7.x / Yockto 2.x

Expected behaviour

TunnelServer should be permitted to bind to and listen on a specific interface for incoming connections.

Actual behaviour

Listening on local loopback.

Generated by org.testng.reporters.JUnitReportReporter have issue that it doesn't show if the testcase was a config class i.e, beforeTest, AfterTest etc

Description

JunitReports xml Generated by org.testng.reporters.JUnitReportReporter have issue that it doesn't show if the testcase was a config class i.e, beforeTest, AfterTest etc

Environment

  • OS distro and version
  • JDK version
  • Hardware (eg switch model, CPU model, RAM, Network Interfaces, etc)

Steps to reproduce

How can this be reproduced?

Expected behaviour

What is the expected behavior?

Actual behaviour

What is the actual behavior?

Error Message & Stack Trace

COPY THE ERROR MESSAGE, INCLUDING STACK TRACE HERE

Config

Copy the relevant section from defaults.conf:

paste config here

Copy the relevant section from the switch:

paste config here

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.