随笔分类 - Network
摘要:默认网关: ip route show 0.0.0.0/0 | grep -oP 'via \K\S+' f 默认网卡: awk '$2==00000000{print $1}' /proc/net/route d 默认出口IP: ip route get 1.1.1.1 | grep -oP 's
阅读全文
摘要:ip -details link show type在第三行, loopback 物理 wifi等没有type ip -details -json link show | jq --join-output ' .[] | if .ifname != null then .ifname, " ", i
阅读全文
摘要:ip link add dev dummy0 type dummy 查看dummy的ARGS 添加IP ip addr add 192.168.8.99 dev dummy0 dummy 接口的工作方式和 loopback 接口类似,但是你可以创建任意多的 dummy 接口。它提供路由数据包的功能,
阅读全文
摘要:dnf install iproute-tc 需要额外安装 kernel-modules-extra dnf install kernel-modules-extra-$(name -r) 加载内核模块 modprobe sch_netem && lsmod | grep sch_netem How
阅读全文
摘要:Windows: Clear-DnsClientCache Linux: nscd (Name Server Caching Daemon) systemctl restart nscd systemd-resolved systemctl is-active systemd-resolved re
阅读全文
摘要:重命名网卡
阅读全文
摘要:/etc/sysconfig/network-scripts/route-eth0ip/prefix via ip /etc/rc.d/rc.local ip route add 10.1.1.0/24 via 192.168.1.1 dev eth0 proto static metric 100
阅读全文
摘要:现象:通过VPN client基于 L2TP/IPSEC 连接到内网后,访问内网服务器网页延迟很大solution:通过在防火墙进行报文分析,每次从WEB服务器过来的数据包大小为1500,再叠加L2TP/IPSEC包头后数据部均大于1500,而网络设备MTU几乎都为1500,因此需要对数据包进行分包
阅读全文
摘要:Cannot assign requested addressclient频繁连接server,每次都在很短时间内结束,产生大量TIME_WAIT,导致端口耗尽,新的连接无法绑定端口,出现 "Cannot assign requested address"解决方案 sysctl --write ne
阅读全文
摘要:自定义keyfile: 路径必须位于/etc/NetworkManager/system-connections/*.nmconnection This file must be owned by root and be readably only by root - otherwise Netwo
阅读全文
摘要:1。The first is the mangle table which is responsible for the alteration of quality of service bits in the TCP header.2。The second table is the filter
阅读全文
摘要:Example: 电信IP:1.1.1.2 Gateway:1.1.1.1 联通IP:2.2.2.2 Gateway:2.2.2.1 移动IP:3.3.3.2 Gateway:3.3.3.1 配置路由表字段 vim /etc/iproute2/rt_tables # # reserved value
阅读全文
摘要:tcp.port==8080 and ip.dst==172.16.1.1 and ip.src==172.16.1.2
阅读全文
摘要:iptables入门:规则及路由基础 数据包关卡 到来自服务器外的其他用户访问这台服务器时,防火墙软件对数据包设置了多个关卡,根据数据处理的逻辑,在逻辑顺序的某些关键节点,防火墙对数据进行监控,根据规则对数据包进行放行、丢弃、拒绝、修改。而这些关卡就是被人称为“链”的逻辑位置。 用关卡来形容这个过程
阅读全文
摘要:ip -d route proto字段的定义如下(部分): #define RTPROT_UNSPEC 0 #define RTPROT_REDIRECT 1 /* Route installed by ICMP redirects; not used by current IPv4 */ #def
阅读全文
摘要:路由的设计远比一般的理解要复杂的多。典型的路由条目包括了源IP,目的IP,网关IP,scope,dev和type六个要素。 网关IP就是在配置路由的时候指定的via后面的地址,在路由表中叫Gateway,这是说明这条路由的下一跳是这个IP地址。这个IP地址之所以出现,是因为目的地址不是当前自己出口可
阅读全文
摘要:nmcli [OPTIONS...] {help | general | networking | radio | connection | device | agent | monitor} [COMMAND] [ARGUMENTS...] 一:nmcli help 类似于ip,分成很多objec
阅读全文
摘要:# ATTRIBUTES TYPE=Ethernet | Bridge UUID=a4ac1ac1-1c91-3c5a-a00d-2a257f7c2761 HWADDR=00:0c:29:fd:80:90 NAME=ens33 DEVICE=ens33 BOOTPROTO=static | dhcp
阅读全文