之前,介绍过通过搭建derp+tailscale组建VPN网络。最近,在新增一个节点的时候,该节点也加入了网络,但是无法ping通其他地址,也不能被别人ping通。
运行tailscale status。有异常。
# Health check:
# - router: 6 add route failures; first was: network is down
# - Some peers are advertising routes but --accept-routes is false
查看tailscaled服务,systemctl status tailscaled。看起来也没啥问题。
● tailscaled.service - Tailscale node agent
Loaded: loaded (/usr/lib/systemd/system/tailscaled.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2023-10-23 15:36:22 CST; 1 weeks 3 days ago
Docs: https://tailscale.com/kb/
Process: 9778 ExecStartPre=/usr/sbin/tailscaled --cleanup (code=exited, status=0/SUCCESS)
Main PID: 9820 (tailscaled)
Status: "Connected; jacky; fd7a:115c:a1e0::8 100.64.0.8"
Tasks: 11
Memory: 40.8M
CGroup: /system.slice/tailscaled.service
└─9820 /usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale...
查看tailscale0接口信息。该接口无法拿到ip地址。
51: tailscale0: <POINTOPOINT,MULTICAST,NOARP> mtu 1280 qdisc pfifo_fast state DOWN group default qlen 500
link/none
tcpdump抓从别处过来的包。能收到包,但是ping显示不通。
journalctl -xeu tailscaled -f
Nov 03 13:48:54 ecs-4508 tailscaled[9820]: Accept: ICMPv4{100.64.0.2:0 > 100.64.0.8:0} 84 icmp ok
Nov 03 13:49:04 ecs-4508 tailscaled[9820]: Accept: ICMPv4{100.64.0.2:0 > 100.64.0.8:0} 84 icmp ok
Nov 03 13:49:14 ecs-4508 tailscaled[9820]: Accept: ICMPv4{100.64.0.2:0 > 100.64.0.8:0} 84 icmp ok
Nov 03 13:49:24 ecs-4508 tailscaled[9820]: Accept: ICMPv4{100.64.0.2:0 > 100.64.0.8:0} 84 icmp ok
查看路由表。
ip route show table 52
空的
最终,通过重启tailscaled服务解决。
[root@ecs-4508 iproute2]# systemctl restart tailscaled
查看接口信息
96: tailscale0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc pfifo_fast state UNKNOWN group default qlen 500
link/none
inet 100.64.0.8/32 scope global tailscale0
valid_lft forever preferred_lft forever
查看路由表
[root@ecs-4508 iproute2]# ip route show table 52
100.64.0.2 dev tailscale0
100.100.100.100 dev tailscale0