Netis / packet-agent

A toolset for network packet capture in Cloud/Kubernetes and Virtualized environment.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

English ∙ 简体中文

packet agent's title

Netis Packet Agent 0.6.0

Stable release Software License

What is Netis Packet Agent?

Netis Packet Agent is an open source project to deal with such situation: it captures packets on Machine A but has to use them on Machine B. This case is very common when you try to monitor network traffic in the LAN but the infrastructure is incapable, for example

  • There is neither TAP nor SPAN device in a physical environment.
  • The Virtual Switch Flow Table does not support SPAN function in a virtualization environment.

Also, this project aims at developing a suite of low cost but high efficiency tools to survive the challenge above.

  • pktminerg is the very first one, which makes you easily capture packets from an NIC interface, encapsulate them with GRE and send them to a remote machine for monitoring and analysis.

packet agent's pktminerg capture traffic flow via GRE/Cloud

With 3 utilities:

  • pcapcompare is a utility for comparing 2 different pcap files.
  • gredump is used for capturing GRE packet with filter, and save them to pcap file.
  • gredemo is a demo app which is used to read packet from a pcap file and send them all to remote NIC. This can be only used when built from source code.

Getting Started

Installation

CentOS 7/8 and RedHat 7

  1. Install wget
yum install wget
  1. Download and install the RPM package. Find the latest package from Releases Page.
wget https://github.com/Netis/packet-agent/releases/download/v0.6.0/netis-packet-agent-0.6.0.x86_64_centos.rpm
rpm -ivh netis-packet-agent-0.6.0.x86_64_centos.rpm

SUSE 12

  1. Download and install the RPM package. Find the latest package from Releases Page.
wget https://github.com/Netis/packet-agent/releases/download/v0.6.0/netis-packet-agent-0.6.0.x86_64_suse.rpm
rpm -ivh netis-packet-agent-0.6.0.x86_64_suse.rpm

Ubuntu 18.04LTS

  1. Install libpcap and wget
sudo apt-get install libpcap-dev wget
  1. Download and install the DEB package. Find the latest package from Releases Page.
wget https://github.com/Netis/packet-agent/releases/download/v0.6.0/netis-packet-agent-0.6.0_amd64.deb
sudo dpkg -i netis-packet-agent-0.6.0_amd64.deb

Remarks: If it encounter a library dependency error when install from rpm, you should install boost_1_59_0 or later. If this also can't work, you can build and run from source.

Remarks: Now only support CentOS 6/7, RedHat 7, SUSE 12, Ubuntu 18.04 LTS.

Windows 2019 server x64

  1. Download the package for win. Find the latest package from Releases Page.
  2. install npcap from the zip file.
  3. Extract pktminerg and other utilities from zip, and run it in cmd in Administrator Mode. Use example:
    C:\> pktminerg.exe "-i Ethernet -r 172.24.103.201" 

Engineering team contacts


Usage

Remarks: Make sure the firewall allows GRE packets to be sent to the target. https://lartc.org/howto/lartc.tunnel.gre.html provides a way to check firewall allows GRE packets to be sent.

# Capture packet from NIC "eth0" and "eth1", encapsulate with GRE header and send to 172.16.1.201, and encapsulate with VNI1 and send to 172.16.1.202 
pktminerg "-i eth0 -k 12 -r 172.16.1.201" "-i eth1 -v1 12 -r 172.16.1.202"

# compare 2 pcap files
pcapcompare --lpcap /path/to/left_file.pcap --rpcap /path/to/right_file.pcap

# Capture packet from NIC "eth0" and save them to gredump_output.pcap
gredump -i eth0 -o /path/to/gredump_output.pcap

packet agent's pktminerg : network capture use case

For more information on using these tools, please refer to this document.

For docker usage, please refer to this document.

Build from source.

You can also clone source from Github and build Netis Packet Agent in local, then check"/path/to/packet-agent/bin" to find all binary.
For build precondition and steps, please refer to this document.

Documentation / Useful link

Contributing

Fork the project and send pull requests. We welcome pull requests from members of all open source community.

License

Copyright (c) 2018 - 2020 Netis.
The content of this repository bound by the following licenses:

Contact info


About

A toolset for network packet capture in Cloud/Kubernetes and Virtualized environment.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 99.3%Language:C 0.5%Language:Makefile 0.1%Language:Python 0.0%Language:CMake 0.0%Language:Shell 0.0%Language:HTML 0.0%Language:M4 0.0%Language:Batchfile 0.0%Language:Perl 0.0%Language:Puppet 0.0%Language:Dockerfile 0.0%