随笔分类 -  Network

摘要:单项抓包 tcpdump -nn -e -i eth0 "ip proto 4 and (ip[20+16:1]=10 and ip[20+17:1]=244 and ip[20+18:1]=72 and ip[20+19:1]=10)" 双向抓包 tcpdump -nn -e -i eth1 "i 阅读全文
posted @ 2024-05-17 18:00 salami_china 阅读(19) 评论(0) 推荐(0) 编辑
摘要:at 后面值是偏移量,偏移是从以太网头末尾开始计算的,在这之后用正数表示偏移量,在这之前用负数表示偏移量 以太网数据包格式:【https://blog.csdn.net/hhpingyear/article/details/80216680】 at等于0就是上面红色区域的其实位置,负数向前偏移,正数 阅读全文
posted @ 2023-04-14 19:35 salami_china 阅读(92) 评论(0) 推荐(0) 编辑
摘要:在使用命令 ip link add bond0 type bond 创建 Bond 接口时,可以指定不同的 Bond 模式。常见的 Bond 模式有以下几种: mode=balance-rr:即 Round-robin 模式,是默认的 Bond 模式。在该模式下,数据包会按照轮流分发到不同的物理接口 阅读全文
posted @ 2023-04-11 16:41 salami_china 阅读(990) 评论(0) 推荐(0) 编辑
摘要:参考链接:https://developer.aliyun.com/ask/336089 当开启只有不在tcp窗口内的rst包被标志为无效,当关闭(默认)所有不在tcp窗口中的包都被标志为无效. 0:关闭 1:开启 “When packets with sequence number out-of- 阅读全文
posted @ 2023-03-23 17:02 salami_china 阅读(556) 评论(0) 推荐(0) 编辑
摘要:运行 dropwatch -l kas,不加参数会显示函数地址,不方便观察 #dropwatch -l kas Initalizing kallsyms db dropwatch> start Enabling monitoring... Kernel monitoring activated. I 阅读全文
posted @ 2023-03-06 20:43 salami_china 阅读(376) 评论(0) 推荐(0) 编辑
摘要:参考文档: https://www.nuomiphp.com/serverfault/zh/60480e758726d95932321906.html # dhcp 配置 option rfc3442-classless-static-routes code 121 = array of integ 阅读全文
posted @ 2022-11-29 19:09 salami_china 阅读(156) 评论(0) 推荐(0) 编辑
摘要:1. struct iphdr *ip_header = (struct iphdr *)skb_network_header(skb); struct tcphdr *tcp_header = (struct tcphdr *)skb_transport_header(skb); 2. struc 阅读全文
posted @ 2022-09-20 13:35 salami_china 阅读(56) 评论(0) 推荐(0) 编辑
摘要:参考链接:https://blog.laoliu.eu.org/archives/e3c95af8.html 安装quagga: centos: yum install quagga -y 查看安装: [root@master ~]# rpm -qa | grep quagga quagga-0.9 阅读全文
posted @ 2022-06-08 13:45 salami_china 阅读(139) 评论(0) 推荐(0) 编辑
摘要:route scope,取值范围如下: RT_SCOPE_UNIVERSE:该选项用于所有通向非直连目的地的路由表项,即应用层创建的路由中包含via的路由 RT_SCOPE_LINK:该选项用于目的地址为本地网络的路由项 RT_SCOPE_HOST:该选项用于路由为本机接口 RT_SCOPE_NOW 阅读全文
posted @ 2022-06-06 19:17 salami_china 阅读(138) 评论(0) 推荐(0) 编辑
摘要:参考链接: http://blog.iis7.com/article/24048.html 什么是连接跟踪? 连接跟踪是Linux内核中引入的nf_conntrack 模块所实现的功能,同时支持IPv4 和 IPv6,取代只支持 IPv4 的 ip_connktrack,用于跟踪连接的状态,供其他模 阅读全文
posted @ 2022-06-02 15:56 salami_china 阅读(1698) 评论(0) 推荐(0) 编辑
摘要:测试UDP链接: nc -vuz x.x.x.x xxxx 测试TCP链接: nc -vz x.x.x.x xxxx -v 详细输出(用两个-v可得到更详细的内容) -u 使用UDP传输协议 -z 使用0输入/输出模式,只在扫描通信端口时使用。 阅读全文
posted @ 2022-06-02 15:51 salami_china 阅读(79) 评论(0) 推荐(0) 编辑
摘要:参考链接: https://www.cnblogs.com/hanyifeng/p/6723964.html 总结:回环lo接口上的 127.0.0.1 地址,不允许发到设备外部,sysctl -w net.ipv4.conf.eth0.route_localnet=1 开启route_localn 阅读全文
posted @ 2022-04-26 14:51 salami_china 阅读(840) 评论(0) 推荐(0) 编辑
摘要:参考链接: https://blog.csdn.net/qq_46402409/article/details/121945808 https://www.pianshen.com/article/72101945189/ https://blog.z0ukun.com/?p=3664 IPV4每次 阅读全文
posted @ 2022-04-19 13:30 salami_china 阅读(867) 评论(0) 推荐(0) 编辑
摘要:在 Linux 上可用以下语句看了一下服务器的TCP状态(连接状态数量统计): netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}' 返回结果范例如下: ESTABLISHED 1423 FIN_WAIT1 1 FI 阅读全文
posted @ 2022-03-03 19:00 salami_china 阅读(314) 评论(0) 推荐(0) 编辑
摘要:参考链接: https://www.cnblogs.com/mrwuzs/p/12793207.html #! /bin/sh interface=bond0 ip=10.10.10.10/16 delay=100ms loss=30% tc qdisc add dev $interface roo 阅读全文
posted @ 2022-02-21 19:46 salami_china 阅读(751) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示