Recent Posts
-
2019-01-25
Cilium Cheat Sheet
TL;DRCilium is an eBPF-based open sourcesoftware. It provides transparent network connectivity, L3-L7 security, andloadbalancing between application workloads [1].This post serves as a cheat sheet of cilium 1.5.0 CLIs. Note that command setvaries among different cil...
-
2018-12-17
[译] Linux 网络栈监控和调优:发送数据(2017)
译者序本文翻译自 2017 年的一篇英文博客Monitoring and Tuning the Linux Networking Stack: Sending Data。如果能看懂英文,建议阅读原文,或者和本文对照看。这篇文章写的是 “Linux networking stack”,这里的 ”stack“ 不仅仅是内核协议栈,而是包括内核协议栈在内的,从应用程序通过系统调用写数据到 socket,到数据被组织成一个或多个数据包最终被物理网卡发出去的整个路径。所以文章有三方面,交织在一起,看起来非常累(但是很过瘾): 原理及代码...
-
2018-12-16
DNS 问题分析示例(2019)
1 DNS 基础知识互联网基于 TCP/IP 协议。为了方便管理网络内的主机,整个互联网分为若干个域(domain),每个域又可以再分为若干个子域,例如,.com,.org,.edu 都是顶级域,而google.com 是.com 下面的子域。网络中的任意一台主机(host)都会属于某个域,并且有自己的名字,称为主机名(hostname)。例如 example.com 就是.com 域中一台主机名为 example.com(或example,hostname 和 domain name 的区别,见这里)的主机。域名/主机名是为了...
-
2018-12-14
tcpdump/wireshark 抓包及分析(2019)
本文将展示如何使用 tcpdump 抓包,以及如何用 tcpdump 和 wireshark 分析网络流量。文中的例子比较简单,适合作为入门参考。 1 基础环境准备 1.1 Pull Docker 镜像 1.2 运行容器 1.3 安装 tcpdump 2 HTTP/TCP 抓包 2.1 HTTP 请求:下载测试页面 2.2 抓包:打到标准输出 2.3 抓包:存文件 3 流量分析: tcpdump 3.1 每...
-
2018-12-05
[译] Linux 网络栈监控和调优:接收数据(2016)
注意:本文内容已经太老,基于 kernel 3.13 和 1Gbps 网卡驱动 igb,建议移步 kernel 5.10 + 25Gbps 驱动版: Linux 网络栈原理、监控与调优:前言 Linux 中断(IRQ/softirq)基础:原理及内核实现 Linux 网络栈接收数据(RX):原理及内核实现 Monitoring Linux Network Stack Linux 网络栈接收数据(RX):配置调优译者序本文翻译自 2016 年的一篇英文博客Monitoring and Tuning the Linux N...
-
2018-12-03
[译] eBPF 内核探测:如何将任意系统调用转换成事件(2016)
译者序本文翻译自 2016 年的一篇英文博客How to turn any syscall into an event: Introducing eBPF Kernel probes。由于译者水平有限,本文不免存在遗漏或错误之处。如有疑问,请查阅原文。以下是译文。 译者序 太长不读(TL; DR) 1 消息系统:Push 还是 Pull 2 内核跟踪和 eBPF 简史 3 Hello, World! 4 改进 4.1 抓取 TCP backlog 信息 4.2 抓取 Port 和 IP ...
-
2018-11-30
[译] 使用 Linux tracepoint、perf 和 eBPF 跟踪数据包 (2017)
译者序本文翻译自 2017 年的一篇英文博客 Tracing a packet’s journey using Linuxtracepoints, perf andeBPF,并添加了章节号以方便阅读。由于译者水平有限,本文不免存在遗漏或错误之处。如有疑问,请查阅原文。以下是译文。 译者序 1 破局 1.1 逃离迷宫:上帝视角 1.2 网络跟踪:渴求利器 1.3 巨人肩膀:perf/eBPF 2 Perf 2.1 安装 perf 2.2 测试环境 ...
-
2018-11-28
tcpdump: An Incomplete Guide
1 Basic options 1.1 Capture options 1.2 Output options Verbosity IP, Protocol, Port MAC Address Packet Content 1.3 Save to file & read from file Split captured file ...
-
2018-11-20
Monitoring Docker Registry
We run a customized image service in our private cloud, whichinitially based on vmware/harbor 0.4.5, and developed internally since then.A public presentation PDF (in Chinease) has mentioned part of this[2].This article, however, is not about the design andimplementa...
-
2018-11-10
Traffic Mirroring With OVS
1 Preliminary Knowledge 1.1 OVS Bridge 1.2 OVS Port 1.3 OVS Port Mirroring 1.4 Container Network Basics 2 Mirror Traffic With OVS 2.1 Prepare Environment 2.2 Create Mirror 2.3 Add Traffic Source 3 Test ...