8000 GitHub - ravi-kiran/tracepkt: Trace a ping packet journey across network interfaces and namespace on recent Linux. Supports IPv4 and IPv6.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ravi-kiran/tracepkt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tracepkt

Trace a ping packet on the L2 layer, as it crosses Linux network interfaces and namespaces. Supports IPv4 and IPv6.

> sudo python tracepkt.py 172.17.0.2
    NETWORK NS        INTERFACE    TYPE ADDRESSES
[  4026531957]          docker0 request 172.17.0.1 -> 172.17.0.2
[  4026531957]      vetha373ab6 request 172.17.0.1 -> 172.17.0.2
[  4026532258]             eth0 request 172.17.0.1 -> 172.17.0.2
[  4026532258]             eth0   reply 172.17.0.2 -> 172.17.0.1
[  4026531957]      vetha373ab6   reply 172.17.0.2 -> 172.17.0.1
[  4026531957]          docker0   reply 172.17.0.2 -> 172.17.0.1

The first 2 packets going from the current network namespace to a Docker container and going back, crossing a veth pair and a bridge.

The full story

This project started as an illustration for a blog post on perf and eBPF https://blog.yadutaf.fr/2017/07/28/tracing-a-packet-journey-using-linux-tracepoints-perf-ebpf/.

Usage

To use this project, you need a working / recent BCC install on your system. Read more about BCC on their Github repository: https://github.com/iovisor/bcc.

Additionally, you'll need a recent kernel (presumably >= 4.7) and full root privilege.

License

MIT

About

Trace a ping packet jo 53E4 urney across network interfaces and namespace on recent Linux. Supports IPv4 and IPv6.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 69.9%
  • Python 30.1%
0