我试图在两个子网之间configurationGRE over IPSec连接。 IPSec隧道已打开,现在我想在其上添加一个GRE隧道:
ip tunnel add GRE01 mode gre remote 10.244.0.1 local 10.244.245.32 ttl 255 ip link set GRE01 up ip addr add 10.244.248.126 dev GRE01 ip route add 10.244.248.125 dev GRE01
现在我有一个接口GRE01(ifconfig):
GRE10 Link encap:UNSPEC HWaddr <h_addr> inet addr:10.244.248.126 PtP:10.244.248.126 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MTU:1476 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
以下路由(ip route list):
10.244.248.125 dev GRE10 scope link <pub_subnet> dev eth0 proto kernel scope link src <pub_ip> default via <pub_gw> dev eth0 metric 100
作为最后一步,我现在需要将我的子网路由到隧道上:
ip route add 10.245.1.224/28 10.244.248.125
但是,我收到错误
Error: either "to" is duplicate, or "10.244.248.125" is a garbage.
所以,我不明白的是为什么我不能通过隧道路由我的子网,一旦我在那里的唯一路线说,它应该通过GRE01接口路由隧道IP。 任何提示? 谢谢。
您在路由命令中缺less通过的单词
ip route add 10.245.1.224/28 via 10.244.248.125