关于tunnel的建立,问什么添加不了路由呢

baidu_41598605 2019-07-04 12:16:27
服务器 一 隧道ip

tun1: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1480
inet 10.10.30.10 netmask 255.255.255.255 destination 121.46.234.115
inet6 fe80::200:5efe:79c9:606f prefixlen 64 scopeid 0x20<link>
tunnel txqueuelen 1000 (IPIP Tunnel)
RX packets 149 bytes 35664 (35.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1358 bytes 188548 (188.5 KB)
TX errors 28 dropped 0 overruns 0 carrier 0 collisions 0

服务器二 隧道ip
tun1: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1480
inet 10.10.30.9 netmask 255.255.255.255 destination 121.201.96.111
inet6 fe80::200:5efe:792e:ea73 prefixlen 64 scopeid 0x20<link>
tunnel txqueuelen 1000 (IPIP Tunnel)
RX packets 1358 bytes 188548 (188.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 149 bytes 35664 (35.6 KB)
TX errors 28 dropped 0 overruns 0 carrier 0 collisions 0

互相能ping通
root@ubuntu:~# ping 10.10.30.9
PING 10.10.30.9 (10.10.30.9) 56(84) bytes of data.
64 bytes from 10.10.30.9: icmp_seq=1 ttl=64 time=33.1 ms
64 bytes from 10.10.30.9: icmp_seq=2 ttl=64 time=33.1 ms
64 bytes from 10.10.30.9: icmp_seq=3 ttl=64 time=33.0 ms
64 bytes from 10.10.30.9: icmp_seq=4 ttl=64 time=33.0 ms
64 bytes from 10.10.30.9: icmp_seq=5 ttl=64 time=33.1 ms
64 bytes from 10.10.30.9: icmp_seq=6 ttl=64 time=33.0 ms

服务器一上加路由没问题

root@ubuntu:~# /sbin/route add -net 193.57.218.0/24 gw 10.10.30.9
root@ubuntu:~#


服务器二上加路由报错
/sbin/route add -net 193.57.218.0/24 gw 10.10.30.10
SIOCADDRT: Network is unreachable


哪位大侠给解决一下。。。。。。。

...全文
242 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
baidu_41598605 2019-07-04
  • 打赏
  • 举报
回复
和加同一段地址没关系, 我现在是路由加不进去, 网络不可达, 10.10.30.9和10.10.30.10现在是互通的。

root@ubuntu:~# tracepath 10.10.30.9
1?: [LOCALHOST] pmtu 1480
1: 10.10.30.9 33.241ms reached
1: 10.10.30.9 33.470ms reached
Resume: pmtu 1480 hops 1 back 1

为什么添加不了路由,比较奇怪!!!!
cqyy725 2019-07-04
  • 打赏
  • 举报
回复
不好意思,刚刚没看清楚,先检查本身的路由情况,删除重复网段的路由,再用ip route 设置
cqyy725 2019-07-04
  • 打赏
  • 举报
回复
同一网段,走两个不同的网关?人格分裂吗

18,773

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧