在调查kubernetes的node上的重启linux网络服务后,pod无法联通的问题时,突然发现没有掌握一套行之有效的调试 linux 网络的方法。
安装:
yum install -y conntrack-tools
使用:
$ conntrack -h
Command line interface for the connection tracking system. Version 1.4.4
Usage: conntrack [commands] [options]
Commands:
-L [table] [options] List conntrack or expectation table
-G [table] parameters Get conntrack or expectation
-D [table] parameters Delete conntrack or expectation
-I [table] parameters Create a conntrack or expectation
-U [table] parameters Update a conntrack
-E [table] [options] Show events
-F [table] Flush table
-C [table] Show counter
-S Show statis
连接跟踪表的参数可以在 kernel 文档 Documentation/networking/nf_conntrack-sysctl.txt
中找到。
用 iptables 追踪报文的方法见:iptables 规则调试
Copyright @2011-2019 All rights reserved. 转载请添加原文连接,合作请加微信lijiaocn或者发送邮件: [email protected],备注网站合作
友情链接: Some Online Tools Develop by Me 系统软件 程序语言 运营经验 水库文集 网络课程 微信网文