服务器 一    隧道iptun1: 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
哪位大侠给解决一下。

解决方案 »

  1.   

    不好意思,刚刚没看清楚,先检查本身的路由情况,删除重复网段的路由,再用ip route 设置
      

  2.   

     和加同一段地址没关系, 我现在是路由加不进去, 网络不可达, 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  为什么添加不了路由,比较奇怪!!!!